0475efce1bddf6f29b5b928d998b696e9e79fc55
[WebKit-https.git] / WebCore / ChangeLog
1 2008-10-02  Darin Adler  <darin@apple.com>
2
3         Reviewed by Geoff Garen.
4
5         - https://bugs.webkit.org/show_bug.cgi?id=21321
6           Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData
7
8         * bindings/js/GCController.cpp:
9         (WebCore::collect): Use heap. instead of heap-> to work with the heap.
10         (WebCore::GCController::gcTimerFired): Ditto.
11         (WebCore::GCController::garbageCollectNow): Ditto.
12         * bindings/js/JSDOMWindowShell.cpp:
13         (WebCore::JSDOMWindowShell::operator new): Ditto.
14         * storage/Database.cpp:
15         (WebCore::Database::Database): Ditto.
16
17 2008-10-02  Dan Bernstein  <mitz@apple.com>
18
19         Reviewed by Alexey Proskuryakov.
20
21         - fix a Database leak that resulted in Document leaks
22
23         * storage/Database.cpp:
24         (WebCore::Database::openDatabase): Account for the fact that RefCounted 
25         objects start out with a ref count of 1.
26
27 2008-10-02  Sam Weinig  <sam@webkit.org>
28
29         Reviewed by Mr. Geoffrey Garen.
30
31         Always mark your parent before marking members.
32
33         * bindings/js/JSDOMWindowCustom.cpp:
34         (WebCore::JSDOMWindow::mark):
35
36 2008-10-02  David Hyatt  <hyatt@apple.com>
37
38         https://bugs.webkit.org/show_bug.cgi?id=21314
39         
40         Make scrollBackingStore cross-platform.
41
42         Reviewed by Sam Weinig
43
44         * loader/EmptyClients.h:
45         (WebCore::EmptyChromeClient::repaint):
46         (WebCore::EmptyChromeClient::scroll):
47         * page/Chrome.cpp:
48         (WebCore::Chrome::repaint):
49         (WebCore::Chrome::scroll):
50         * page/Chrome.h:
51         * page/ChromeClient.h:
52         * page/EventHandler.cpp:
53         (WebCore::EventHandler::handleAutoscroll):
54         * platform/HostWindow.h:
55         * platform/ScrollView.cpp:
56         (WebCore::ScrollView::scrollContents):
57         (WebCore::ScrollView::addPanScrollIcon):
58         (WebCore::ScrollView::removePanScrollIcon):
59         * platform/ScrollView.h:
60         * platform/gtk/ScrollViewGtk.cpp:
61         * platform/qt/ScrollViewQt.cpp:
62         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
63         (WebCore::ScrollView::~ScrollView):
64         * platform/win/ScrollViewWin.cpp:
65         (WebCore::ScrollView::ScrollView):
66         (WebCore::ScrollView::~ScrollView):
67
68 2008-10-02  Kevin Ollivier  <kevino@theolliviers.com>
69
70         wx build fixes after Frame/ScrollView changes.
71
72         * WebCoreSources.bkl:
73         * platform/wx/ScrollViewWx.cpp:
74         (WebCore::ScrollView::platformContentsToScreen):
75         (WebCore::ScrollView::platformScreenToContents):
76         (WebCore::ScrollView::platformIsOffscreen):
77
78 2008-10-02  Brett Wilson  <brettw@chromium.org>
79
80         Reviewed by Sam Weinig
81
82         https://bugs.webkit.org/show_bug.cgi?id=21292
83
84         Revert the changes to enclosingIntRect made in r12530 since the new code
85         doesn't round correctly.
86
87         * ChangeLog:
88         * platform/graphics/FloatRect.cpp:
89         (WebCore::enclosingIntRect):
90
91 2008-10-02  Dan Bernstein  <mitz@apple.com>
92
93         Reviewed by Anders Carlsson and Eric Seidel.
94
95         - fix HTMLCanvaseElement leak from -webkit-canvas() values
96
97         Changed the m_element member of CSSCanvasValue from a RefPtr to a plain
98         pointer, as the document owns the canvas elements. Added code to release
99         those elements in Document::removedLastRef() because they reference
100         the document.
101
102         * css/CSSCanvasValue.cpp:
103         (WebCore::CSSCanvasValue::element):
104         * css/CSSCanvasValue.h:
105         (WebCore::CSSCanvasValue::CSSCanvasValue):
106         * dom/Document.cpp:
107         (WebCore::Document::removedLastRef):
108
109 2008-10-02  Alexey Proskuryakov  <ap@webkit.org>
110
111         Reviewed by Maciej Stachowiak.
112
113         Build fix for platforms that don't implement WTF::ThreadSpecific.
114
115         * bindings/js/JSDOMBinding.cpp: (WebCore::wrapperSet):
116         Guard ThreadSpecific use with #if ENABLE(WORKERS). No platform defines this yet, but this
117         code is only needed for JS bindings in worker threads.
118
119 2008-10-01  David Hyatt  <hyatt@apple.com>
120
121         https://bugs.webkit.org/show_bug.cgi?id=21298
122         
123         Make updateScrollbars cross-platform.  For now a stubbed out scrollContents function is invoked to do the scrolling of the backing store.  Next patch
124         will make that cross-platform.  
125         
126         The ScrollView now implements ScrollbarClient, which means that there was a clash of windowClipRect methods from the
127         multiple inheritance.  For now I solved this by adding a Scrollbar* to the ScrollbarClient version of the method, but longer term
128         windowClipRect is going to be removed from ScrollbarClient (when Widget invalidation gets rewritten).
129         
130         Reviewed by Sam Weinig
131
132         * page/FrameView.cpp:
133         (WebCore::FrameView::windowClipRect):
134         (WebCore::FrameView::isActive):
135         * page/FrameView.h:
136         (WebCore::FrameView::visibleContentsResized):
137         * platform/PopupMenu.h:
138         * platform/ScrollView.cpp:
139         (WebCore::ScrollView::init):
140         (WebCore::ScrollView::destroy):
141         (WebCore::ScrollView::setHasHorizontalScrollbar):
142         (WebCore::ScrollView::setHasVerticalScrollbar):
143         (WebCore::ScrollView::valueChanged):
144         (WebCore::ScrollView::updateScrollbars):
145         (WebCore::ScrollView::scrollContents):
146         (WebCore::ScrollView::platformHandleHorizontalAdjustment):
147         (WebCore::ScrollView::platformHandleVerticalAdjustment):
148         * platform/ScrollView.h:
149         * platform/Scrollbar.cpp:
150         (WebCore::Scrollbar::windowClipRect):
151         * platform/ScrollbarClient.h:
152         * platform/gtk/ScrollViewGtk.cpp:
153         (WebCore::ScrollView::platformHandleHorizontalAdjustment):
154         (WebCore::ScrollView::platformHandleVerticalAdjustment):
155         * platform/qt/ScrollViewQt.cpp:
156         (WebCore::ScrollView::scrollContents):
157         * platform/win/PopupMenuWin.cpp:
158         (WebCore::PopupMenu::windowClipRect):
159         * platform/win/ScrollViewWin.cpp:
160         (WebCore::ScrollView::scrollContents):
161         * rendering/RenderLayer.cpp:
162         (WebCore::RenderLayer::windowClipRect):
163         * rendering/RenderLayer.h:
164         * rendering/RenderListBox.cpp:
165         (WebCore::RenderListBox::panScroll):
166         (WebCore::RenderListBox::windowClipRect):
167         * rendering/RenderListBox.h:
168
169 2008-10-02  Alexey Proskuryakov  <ap@webkit.org>
170
171         Reviewed by Darin Adler.
172
173         https://bugs.webkit.org/show_bug.cgi?id=21304
174         Stop using a static wrapper map for WebCore JS bindings
175
176         The static domObjects map was not thread safe.
177
178         * dom/Document.h:
179         (WebCore::Document::messagePorts): Added an accessor for JSDocument to iterate over message
180         ports.
181         (WebCore::Document::xmlHttpRequests): Ditto for XMLHttpRequests.
182
183         * dom/Document.cpp:
184         (WebCore::Document::createdXMLHttpRequest):
185         (WebCore::Document::destroyedXMLHttpRequest):
186         Moved XMLHttpRequest tracking from a global map to Document.
187
188         * GNUmakefile.am:
189         * WebCore.pro:
190         * WebCore.vcproj/WebCore.vcproj:
191         * WebCore.xcodeproj/project.pbxproj:
192         * WebCoreSources.bkl:
193         * webcore-base.bkl:
194         * bindings/DOMProtect.cpp: Removed.
195         * bindings/DOMProtect.h: Removed.
196         Removed gcProtect(Unprotect)DOMObject - its callers do not have a JSGlobalData reference,
197         so they can no longer protect bindings objects.
198
199         * dom/MessagePort.cpp:
200         (WebCore::CloseMessagePortTimer::CloseMessagePortTimer):
201         (WebCore::CloseMessagePortTimer::fired):
202         (WebCore::MessagePort::MessagePort):
203         (WebCore::MessagePort::queueCloseEvent):
204         (WebCore::MessagePort::setPendingActivity):
205         (WebCore::MessagePort::unsetPendingActivity):
206         * dom/MessagePort.h:
207         (WebCore::MessagePort::hasPendingActivity):
208         MessagePort now counts outstanding async events, so JSDocument::mark can decide whether
209         to protect it.
210
211         * xml/XMLHttpRequest.h:
212         (WebCore::XMLHttpRequest::hasPendingActivity):
213         * xml/XMLHttpRequest.cpp:
214         (WebCore::XMLHttpRequest::XMLHttpRequest):
215         (WebCore::XMLHttpRequest::~XMLHttpRequest):
216         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
217         (WebCore::XMLHttpRequest::dropProtection):
218         (WebCore::XMLHttpRequest::didFinishLoadingPreflight):
219         (WebCore::XMLHttpRequest::cancelRequests):
220         (WebCore::XMLHttpRequest::detachRequests):
221         (WebCore::XMLHttpRequest::setPendingActivity):
222         (WebCore::XMLHttpRequest::unsetPendingActivity):
223         Moved XMLHttpRequest tracking from a global map to Document. 
224
225         * bindings/js/JSDOMBinding.cpp:
226         (WebCore::wrapperSet):
227         (WebCore::DOMObjectWrapperMap::mapFor):
228         (WebCore::DOMObjectWrapperMap::get):
229         (WebCore::DOMObjectWrapperMap::set):
230         (WebCore::DOMObjectWrapperMap::remove):
231         (WebCore::getCachedDOMObjectWrapper):
232         (WebCore::cacheDOMObjectWrapper):
233         (WebCore::forgetDOMObject):
234         (WebCore::getCachedDOMNodeWrapper):
235         (WebCore::forgetDOMNode):
236         (WebCore::cacheDOMNodeWrapper):
237         (WebCore::markActiveObjectsForDocument):
238         * bindings/js/JSDOMBinding.h:
239         (WebCore::createDOMObjectWrapper):
240         (WebCore::getDOMObjectWrapper):
241         Wrapper map is now kept as JSGlobalData::clientData. Also changed debug-only wrapperSet
242         to be per-thread (this is slower than going to JSGlobalData, but fast enough for debug).
243         WebCore objects can never migrate between threads.
244
245         * bindings/js/JSDocumentCustom.cpp:
246         (WebCore::JSDocument::mark):
247         Call markActiveObjectsForDocument() from JSDOMBinding.
248
249         * bindings/js/JSCSSRuleCustom.cpp:
250         (WebCore::toJS):
251         * bindings/js/JSCSSValueCustom.cpp:
252         (WebCore::toJS):
253         * bindings/js/JSDOMWindowCustom.cpp:
254         (WebCore::markDOMObjectWrapper):
255         (WebCore::JSDOMWindow::mark):
256         * bindings/js/JSEventCustom.cpp:
257         (WebCore::toJS):
258         * bindings/js/JSEventTarget.cpp:
259         (WebCore::toJS):
260         * bindings/js/JSHTMLCollectionCustom.cpp:
261         (WebCore::toJS):
262         * bindings/js/JSImageDataCustom.cpp:
263         (WebCore::toJS):
264         * bindings/js/JSMessageChannelCustom.cpp:
265         (WebCore::JSMessageChannel::mark):
266         * bindings/js/JSMessagePortCustom.cpp:
267         (WebCore::JSMessagePort::mark):
268         * bindings/js/JSNodeCustom.cpp:
269         (WebCore::JSNode::mark):
270         * bindings/js/JSSVGPathSegCustom.cpp:
271         (WebCore::toJS):
272         * bindings/js/JSStyleSheetCustom.cpp:
273         (WebCore::toJS):
274         * bindings/js/JSXMLHttpRequestCustom.cpp:
275         (WebCore::JSXMLHttpRequest::mark):
276         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
277         (WebCore::JSXMLHttpRequestUpload::mark):
278         * bindings/js/ScriptController.cpp:
279         (WebCore::ScriptController::finishedWithEvent):
280         * bindings/scripts/CodeGeneratorJS.pm:
281         Pass a JSGlobalData reference to functions that track JS wrapper objects.
282
283 2008-10-02  Dan Bernstein  <mitz@apple.com>
284
285         - build fix
286
287         * page/JavaScriptCallFrame.idl:
288
289 2008-10-02  Oliver Hunt  <oliver@apple.com>
290
291         Reviewed by NOBODY (Build fix).
292
293         Add new file to project files
294
295         * GNUmakefile.am:
296         * WebCore.pro:
297         * WebCore.vcproj/WebCore.vcproj:
298
299 2008-10-02  Geoffrey Garen  <ggaren@apple.com>
300
301         Not reviewed.
302
303         Try to fix some more builds.
304
305         * GNUmakefile.am:
306         * WebCore.pro:
307
308 2008-10-02  Geoffrey Garen  <ggaren@apple.com>
309
310         Not reviewed.
311         
312         Try to fix Windows build.
313
314         * WebCore.vcproj/WebCore.vcproj:
315
316 2008-10-01  Geoffrey Garen  <ggaren@apple.com>
317
318         Reviewed by Darin Adler and Cameron Zwarich.
319
320         Updated for JavaScriptCore API changes: use a SourceCode instead of
321         broken out parameters; treat sourceId as intptr_t.
322
323         * ForwardingHeaders/kjs/SourceRange.h: Copied from ForwardingHeaders/kjs/SourceProvider.h.
324         * bindings/js/JSXMLHttpRequestCustom.cpp:
325         (WebCore::JSXMLHttpRequest::send):
326         * bindings/js/ScriptController.cpp:
327         (WebCore::ScriptController::evaluate):
328         * bindings/js/StringSourceProvider.h:
329         (WebCore::StringSourceProvider::create):
330         (WebCore::StringSourceProvider::StringSourceProvider):
331
332         (WebCore::makeSource): Added a makeSource function for convenience.
333
334         * bindings/objc/WebScriptObject.mm:
335         (-[WebScriptObject evaluateWebScript:]):
336         * bridge/NP_jsobject.cpp:
337         (_NPN_Evaluate):
338         * bridge/jni/jni_jsobject.mm:
339         (JavaJSObject::call):
340         (JavaJSObject::eval):
341         (JavaJSObject::getMember):
342         (JavaJSObject::setMember):
343         (JavaJSObject::removeMember):
344
345         * bridge/jni/jni_runtime.h:
346         (JSC::Bindings::JavaString::operator UString): Replaced the explicit
347         ustring() function with an implicit operator because this class already
348         holds a UString::rep.
349
350         * page/Console.cpp:
351         (WebCore::retrieveLastCaller):
352         (WebCore::Console::trace):
353         * page/InspectorController.cpp:
354         (WebCore::jsStringRef):
355         (WebCore::InspectorController::addBreakpoint):
356         (WebCore::InspectorController::removeBreakpoint):
357         (WebCore::InspectorController::didParseSource):
358         (WebCore::InspectorController::failedToParseSource):
359         * page/InspectorController.h:
360         * page/JavaScriptCallFrame.cpp:
361         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
362         * page/JavaScriptCallFrame.h:
363         (WebCore::JavaScriptCallFrame::create):
364         (WebCore::JavaScriptCallFrame::sourceIdentifier):
365         (WebCore::JavaScriptCallFrame::update):
366         * page/JavaScriptDebugListener.h:
367         * page/JavaScriptDebugServer.cpp:
368         (WebCore::JavaScriptDebugServer::addBreakpoint):
369         (WebCore::JavaScriptDebugServer::removeBreakpoint):
370         (WebCore::JavaScriptDebugServer::hasBreakpoint):
371         (WebCore::dispatchDidParseSource):
372         (WebCore::dispatchFailedToParseSource):
373         (WebCore::JavaScriptDebugServer::sourceParsed):
374         (WebCore::JavaScriptDebugServer::callEvent):
375         (WebCore::JavaScriptDebugServer::atStatement):
376         (WebCore::JavaScriptDebugServer::returnEvent):
377         (WebCore::JavaScriptDebugServer::exception):
378         (WebCore::JavaScriptDebugServer::willExecuteProgram):
379         (WebCore::JavaScriptDebugServer::didExecuteProgram):
380         (WebCore::JavaScriptDebugServer::didReachBreakpoint):
381         * page/JavaScriptDebugServer.h:
382         * page/inspector/ScriptsPanel.js: Renamed internal uses of sourceId and 
383         sourceIdentifier to sourceID.
384
385 2008-10-01  Dan Bernstein  <mitz@apple.com>
386
387         Reviewed by Geoffrey Garen.
388
389         - fix SVGFontFaceElement leak seen on svg/custom/acid3-test-77.html
390
391         Broke a ref cycle by changing the m_svgFontFaceElement members of
392         CSSFontFaceSource and CSSFontFaceSrcValue from RefPtrs to plain
393         pointers. Also made sure that the @font-face rule added by
394         SVGFontFaceElement to the document's mapped element sheet is removed
395         when the font-face element is deleted or moved to another document.
396
397         * css/CSSFontFaceSource.cpp:
398         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
399         (WebCore::CSSFontFaceSource::getFontData):
400         * css/CSSFontFaceSource.h:
401         (WebCore::CSSFontFaceSource::svgFontFaceElement):
402         * css/CSSFontFaceSrcValue.h:
403         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
404         (WebCore::CSSFontFaceSrcValue::CSSFontFaceSrcValue):
405         * svg/SVGFontFaceElement.cpp:
406         (WebCore::SVGFontFaceElement::~SVGFontFaceElement):
407         (WebCore::SVGFontFaceElement::willMoveToNewOwnerDocument):
408         (WebCore::SVGFontFaceElement::didMoveToNewOwnerDocument):
409         (WebCore::SVGFontFaceElement::removeFromMappedElementSheet):
410         * svg/SVGFontFaceElement.h:
411
412 2008-10-01  Oliver Hunt  <oliver@apple.com>
413
414         Reviewed by Maciej Stachowiak.
415
416         Bug 20315: Memory leak with Canvas getImageData
417         <https://bugs.webkit.org/show_bug.cgi?id=20315>
418
419         This wasn't a leak, the issue was that we were reporting the cost
420         of the CanvasPixelArray when creating the JSCanvasPixelArray wrapper
421         and we should have been reporting the cost when we create the
422         JSImageData wrapper.
423
424         * WebCore.xcodeproj/project.pbxproj:
425         * bindings/js/JSCanvasPixelArrayCustom.cpp: Removed.
426           This was only needed to report the extra memory cost
427           of the CPA.
428         * bindings/js/JSImageDataCustom.cpp:
429         (WebCore::toJS):
430           We need a custom toJS function now so that we can report
431           the extra memory cost.
432         * bindings/scripts/CodeGeneratorJS.pm:
433           Need to replace the reference to CanvasPixelArray with ImageData
434           to be able to create the custom toJS implementation.
435         * html/CanvasPixelArray.idl:
436         * html/ImageData.idl:
437
438 2008-10-01  Dan Bernstein  <mitz@apple.com>
439
440         Reviewed by Mark Rowe.
441
442         - https://bugs.webkit.org/show_bug.cgi?id=21293
443           REGRESSION: Crash beneath RenderSVGViewportContainer::viewportTransform() during SVGSVGElement destruction
444
445         * svg/SVGMarkerElement.cpp:
446         (WebCore::SVGMarkerElement::~SVGMarkerElement): Call detach() here so
447         that renderer destruction happens before the SVGMarkerElement is
448         destroyed.
449         * svg/SVGSVGElement.cpp:
450         (WebCore::SVGSVGElement::~SVGSVGElement): Ditto for SVGSVGElement.
451
452 2008-10-01  Evan Martin  <evan@chromium.org>
453
454         Reviewed by Eric Seidel.
455         
456         https://bugs.webkit.org/show_bug.cgi?id=20669
457
458         * css/makeprop.pl:
459         Die if gperf fails.
460
461 2008-10-01  Evan Martin  <evan@chromium.org>
462
463         Reviewed by Eric Seidel.
464
465         * loader/icon/IconDatabase.h:
466         IconDatabase uses HashMap, so it needs to #include the header.
467
468 2008-10-01  Dan Bernstein  <mitz@apple.com>
469
470         Reviewed by Mark Rowe.
471
472         - fix an assertion failure in http/tests/security/canvas-remote-read-svg-image.html due to re-entry into Cache::pruneDeadResources()
473
474         * loader/Cache.cpp:
475         (WebCore::Cache::remove): Disable pruning temporarily during 
476         CachedResource deletion.
477
478 2008-10-01  Dan Bernstein  <mitz@apple.com>
479
480         Reviewed by Mark Rowe.
481
482         - fix SVGFontElement leaks seen on buildbot by breaking a ref cycle
483
484         * svg/SVGFontFaceElement.cpp:
485         (WebCore::SVGFontFaceElement::rebuildFontFace):
486         * svg/SVGFontFaceElement.h:
487         (WebCore::SVGFontFaceElement::associatedFontElement):
488
489 2008-10-01  Brett Wilson  <brettw@chromium.org>
490
491         Reviewed by Maciej Stachowiak.
492
493         Document the rounding behavior of the mapRect(IntRect) function in
494         AffineTransform.h.
495
496         * platform/graphics/AffineTransform.h:
497
498 2008-10-01  David Hyatt  <hyatt@apple.com>
499
500         Move prohibitsScrolling from the Frame to the ScrollView.
501
502         Reviewed by Sam Weinig
503
504         * WebCore.base.exp:
505         * page/Frame.cpp:
506         (WebCore::FramePrivate::FramePrivate):
507         * page/Frame.h:
508         * page/FramePrivate.h:
509         * page/FrameView.cpp:
510         (WebCore::FrameView::scrollRectIntoViewRecursively):
511         (WebCore::FrameView::setScrollPosition):
512         * platform/ScrollView.cpp:
513         (WebCore::ScrollView::init):
514         (WebCore::ScrollView::scrollRectIntoViewRecursively):
515         (WebCore::ScrollView::setScrollPosition):
516         * platform/ScrollView.h:
517         (WebCore::ScrollView::setProhibitsScrolling):
518         (WebCore::ScrollView::prohibitsScrolling):
519         * platform/gtk/ScrollViewGtk.cpp:
520         (WebCore::ScrollView::updateScrollbars):
521         * platform/qt/ScrollViewQt.cpp:
522         (WebCore::ScrollView::updateScrollbars):
523         * platform/win/ScrollViewWin.cpp:
524         (WebCore::ScrollView::updateScrollbars):
525
526 2008-10-01  Mark Rowe  <mrowe@apple.com>
527
528         Reviewed by Geoff Garen.
529
530         Fix leaks seen during http/tests/xmlhttprequest/access-control-basic-non-simple-allow.html.
531
532         * xml/XMLHttpRequest.cpp:
533         (WebCore::XMLHttpRequest::didFinishLoadingPreflight): Balance the ref and GC protect
534         that we do during the loadRequestAsynchronously of the preflight request with a deref and
535         GC unprotect.
536
537 2008-10-01  David Hyatt  <hyatt@apple.com>
538
539         Rename allowsScrolling/setAllowsScrolling to canHaveScrollbars/setCanHaveScrollbars to make it more
540         clear that the boolean doesn't actually stop all scrolling.  It just gets rid of scrollbars.
541
542         Reviewed by Tim Hatcher
543
544         * WebCore.base.exp:
545         * page/FrameView.cpp:
546         (WebCore::FrameView::setCanHaveScrollbars):
547         * page/FrameView.h:
548         * platform/ScrollView.cpp:
549         (WebCore::ScrollView::setCanHaveScrollbars):
550         (WebCore::ScrollView::wheelEvent):
551         * platform/ScrollView.h:
552         (WebCore::ScrollView::canHaveScrollbars):
553
554 2008-10-01  Dan Bernstein  <mitz@apple.com>
555
556         Reviewed by Mark Rowe.
557
558         - fix some CachedResource leaks seen on buildbot
559
560         The issue here was that emptying the cache was a no-op when it only
561         contained resources with no data. Changed to go after those
562         resources when the desired cache capacity is zero.
563
564         * loader/Cache.cpp:
565         (WebCore::Cache::pruneLiveResources):
566         (WebCore::Cache::pruneDeadResources):
567         * loader/Cache.h:
568         (WebCore::Cache::prune):
569
570 2008-10-01  David Hyatt  <hyatt@apple.com>
571
572         Make isOffscreen cross-platform.  Only Mac implements this method, so hold off on adding API to the
573         HostWindow object until other platforms decide they want this method.  (We need it for Win though at some point.)
574
575         Reviewed by Adam Roben
576
577         * platform/ScrollView.cpp:
578         (WebCore::ScrollView::isOffscreen):
579         (WebCore::ScrollView::platformIsOffscreen):
580         * platform/ScrollView.h:
581         * platform/gtk/ScrollViewGtk.cpp:
582         * platform/mac/ScrollViewMac.mm:
583         (WebCore::ScrollView::platformIsOffscreen):
584         * platform/qt/ScrollViewQt.cpp:
585         * platform/wx/ScrollViewWx.cpp:
586
587 2008-10-01  David Hyatt  <hyatt@apple.com>
588
589         Make show/hide/setParentVisible cross-platform on ScrollView.
590
591         Reviewed by Adam Roben
592
593         * platform/ScrollView.cpp:
594         (WebCore::ScrollView::setParentVisible):
595         (WebCore::ScrollView::show):
596         (WebCore::ScrollView::hide):
597         * platform/ScrollView.h:
598         * platform/win/ScrollViewWin.cpp:
599
600 2008-10-01  Kevin McCullough  <kmccullough@apple.com>
601
602         Reviewed by Dan Bernstein.
603
604         https://bugs.webkit.org/show_bug.cgi?id=21284
605         Bug 21284: Max height affects max width
606         - Looks like a cut and paste bug
607         - Added layout test fast/css/max-height-and-max-width.html
608
609         * css/CSSComputedStyleDeclaration.cpp:
610         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
611
612 2008-10-01  David Hyatt  <hyatt@apple.com>
613
614         https://bugs.webkit.org/show_bug.cgi?id=21282
615         
616         Make contentsToScreen/screenToContents cross-platform.  Only implemented by Mac/Win right now.
617         
618         Reviewed by Adam Roben
619
620         * loader/EmptyClients.h:
621         (WebCore::EmptyChromeClient::screenToWindow):
622         (WebCore::EmptyChromeClient::windowToScreen):
623         * page/Chrome.cpp:
624         (WebCore::Chrome::screenToWindow):
625         (WebCore::Chrome::windowToScreen):
626         * page/Chrome.h:
627         * page/ChromeClient.h:
628         * platform/HostWindow.h:
629         * platform/ScrollView.cpp:
630         (WebCore::ScrollView::contentsToScreen):
631         (WebCore::ScrollView::screenToContents):
632         (WebCore::ScrollView::platformContentsToScreen):
633         (WebCore::ScrollView::platformScreenToContents):
634         * platform/ScrollView.h:
635         * platform/mac/ScrollViewMac.mm:
636         (WebCore::ScrollView::platformContentsToScreen):
637         (WebCore::ScrollView::platformScreenToContents):
638         * platform/win/ScrollViewWin.cpp:
639
640 2008-10-01  Dan Bernstein  <mitz@apple.com>
641
642         Reviewed by Darin Adler.
643
644         - fix <rdar://problem/6255862> domfuzz: null deref in WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks(WebCore::HTMLStackElem*)
645
646         Test: fast/parser/residual-style-close-across-removed-block.html
647
648         * html/HTMLParser.cpp:
649         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Removed
650         an assertion that turned out to be wrong in this case, and changed to
651         terminate the algorithm at the first empty block.
652
653 2008-10-01  David Hyatt  <hyatt@apple.com>
654
655         Make setFrameRect on ScrollView cross-platform.
656
657         Reviewed by Sam Weinig
658
659         * page/FrameView.h:
660         (WebCore::FrameView::contentsResized):
661         * platform/ScrollView.cpp:
662         (WebCore::ScrollView::setFrameRect):
663         * platform/ScrollView.h:
664         * platform/gtk/ScrollViewGtk.cpp:
665         * platform/qt/ScrollViewQt.cpp:
666         * platform/win/ScrollViewWin.cpp:
667
668 2008-10-01  Sam Weinig  <sam@webkit.org>
669
670         Reviewed by Adele Peterson.
671
672         Move setTimeout, clearTimeout, setInterval, clearInterval, atob and btoa
673         to JSDOMWindow from JSDOMWindowBase.
674
675         * WebCore.xcodeproj/project.pbxproj:
676         * bindings/js/JSDOMWindowBase.cpp:
677         (WebCore::JSDOMWindowBase::removeTimeout):
678         * bindings/js/JSDOMWindowBase.h:
679         * bindings/js/JSDOMWindowCustom.cpp:
680         (WebCore::setTimeoutOrInterval):
681         (WebCore::JSDOMWindow::setTimeout):
682         (WebCore::JSDOMWindow::clearTimeout):
683         (WebCore::JSDOMWindow::setInterval):
684         (WebCore::JSDOMWindow::clearInterval):
685         (WebCore::JSDOMWindow::atob):
686         (WebCore::JSDOMWindow::btoa):
687         * page/DOMWindow.idl:
688
689 2008-10-01  Dan Bernstein  <mitz@apple.com>
690
691         - Mac build fix
692
693         * WebCore.base.exp:
694
695 2008-10-01  Timothy Hatcher  <timothy@apple.com>
696
697         Prevent stealing focus from the search field when focusing a DOM node.
698
699         https://bugs.webkit.org/show_bug.cgi?id=21275
700
701         Reviewed by Kevin McCullough.
702
703         * page/inspector/ElementsPanel.js:
704         (WebInspector.ElementsPanel.treeOutline.focusedNodeChanged):
705         Don't steal focus if the current focus element is the search field.
706
707 2008-09-30  Sam Weinig  <sam@webkit.org>
708
709         Reviewed by Nikolas Zimmermann and Alexey Proskuryakov.
710
711         Final patch for https://bugs.webkit.org/show_bug.cgi?id=21122
712         Autogenerate JS event listeners
713
714         - Generate getting/setting of EventListeners.
715
716         - Adding a new named EventListener now has the same process as adding any other DOM
717           attribute. (Add a method with the same name in the c++ file).
718
719         (The EventListeners for MessagePort have been intentionally left custom so that we
720         can continue to experiment with making those EventListeners work in a frame-less world.)
721
722         * bindings/js/JSDOMApplicationCacheCustom.cpp: Remove custom methods.
723         * bindings/js/JSDOMWindowCustom.cpp: ditto.
724         * bindings/js/JSEventTargetNodeCustom.cpp: ditto.
725         * bindings/js/JSXMLHttpRequestCustom.cpp: ditto.
726         * bindings/js/JSXMLHttpRequestUploadCustom.cpp: ditto.
727         * bindings/scripts/CodeGeneratorJS.pm: Add code to generate EventListener
728         getter/setters
729         * dom/EventTargetNode.cpp: Add getter/setters for named EventListener.
730         * dom/EventTargetNode.h: ditto.
731         * dom/EventTargetNode.idl: Mark EventListeners as Protected so that the codegenerator
732         will use JSEventListerner instead of JSUnprotectedEventListener.
733         * loader/appcache/DOMApplicationCache.idl: Remove custom attributes..
734         * page/DOMWindow.cpp: Add getter/setters for named EventListener
735         * page/DOMWindow.h: ditto.
736         * page/DOMWindow.idl: Mark EventListeners as Protected so that the codegenerator
737         will use JSEventListerner instead of JSUnprotectedEventListener.
738         * xml/XMLHttpRequest.idl: Remove custom attributes.
739         * xml/XMLHttpRequestUpload.idl: ditto.
740
741 2008-09-30  Mark Rowe  <mrowe@apple.com>
742
743         Reviewed by Dan Bernstein.
744
745         Add a leak counter for CachedResources since we've had two recent leaks involving them.
746
747         * loader/CachedResource.cpp:
748         (WebCore::CachedResource::CachedResource):
749         (WebCore::CachedResource::~CachedResource):
750
751 2008-09-30  Dan Bernstein  <mitz@apple.com>
752
753         Reviewed by Dave Hyatt.
754
755         - fix https://bugs.webkit.org/show_bug.cgi?id=21127
756           <rdar://problem/6259134> REGRESSION: CFF format fonts fail to load
757
758         If TTLoadEmbeddedFont fails, use AddFontMemResourceEx after changing
759         the font name in memory.
760
761         * WebCore.vcproj/WebCore.vcproj: Renamed GetEOTHeader.* to
762         OpenTypeUtilities.*.
763
764         * platform/graphics/win/FontCustomPlatformData.cpp:
765         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added a call
766         to RemoveFontMemResourceEx to match AddFontMemResourceEx when it is
767         used.
768         (WebCore::FontCustomPlatformData::fontPlatformData): Added a code path
769         for fonts loaded using AddFontMemResourceEx.
770         (WebCore::createFontCustomPlatformData): Added a call to
771         renameAndActivateFont() if TTLoadEmbeddedFont fails. If
772         TTLoadEmbeddedFont succeeds, set the font name to the null string, as
773         fontPlatformData() will retrieve the name from the font reference.
774
775         * platform/graphics/win/FontCustomPlatformData.h:
776         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Added a
777         font name member.
778
779         * platform/graphics/win/GetEOTHeader.cpp: Renamed.
780         * platform/graphics/win/GetEOTHeader.h: Renamed.
781
782         * platform/graphics/win/OpenTypeUtilities.cpp: Copied from platform/graphics/win/GetEOTHeader.cpp.
783         (WebCore::BigEndianUShort::BigEndianUShort): Added a constructor.
784         (WebCore::BigEndianULong::BigEndianULong): Ditto.
785         (WebCore::renameAndActivateFont): Added. Creates an in-memory copy of
786         the font data and modifies it to have the given name, then activates
787         it using AddFontMemResourceEx.
788
789         * platform/graphics/win/OpenTypeUtilities.h: Copied from platform/graphics/win/GetEOTHeader.h.
790
791 2008-09-30  Mark Rowe  <mrowe@apple.com>
792
793         Reviewed by Dan Bernstein.
794
795         Fix many leaks seen on fast/backgrounds/svg-as-mask.html.
796
797         * rendering/RenderObject.cpp:
798         (WebCore::RenderObject::arenaDelete): Balance the calls to addClient on maskLayer's images
799         with calls to removeClient when we're being destroyed.
800
801 2008-09-30  Eric Carlson  <eric.carlson@apple.com>
802
803         Reviewed by Antti Koivisto.
804
805         https://bugs.webkit.org/show_bug.cgi?id=21243
806
807         Fix loopstart and loopend default values.
808
809         Tests: media/loopend-limits.html
810                media/loopstart-limits.html
811
812         * html/HTMLMediaElement.cpp:
813         (WebCore::HTMLMediaElement::loopStart): the spec says start() is the default value
814         (WebCore::HTMLMediaElement::loopEnd): the spec says end() is the default value
815
816 2008-09-30  Kevin Ollivier  <kevino@theolliviers.com>
817
818         wx build fixes. Add file to build and remove call to (now gone) ScrollView::update.
819
820         * WebCoreSources.bkl:
821         * platform/wx/ScrollViewWx.cpp:
822         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
823
824 2008-09-30  Dan Bernstein  <mitz@apple.com>
825
826         Reviewed by Sam Weinig.
827
828         - fix HTMLViewSourceDocument leaks by breaking a ref cycle which
829           was fixed in r17249 and re-introduced in r31435. 
830
831         * html/HTMLViewSourceDocument.cpp:
832         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
833         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
834         (WebCore::HTMLViewSourceDocument::addLine):
835         (WebCore::HTMLViewSourceDocument::addLink):
836         * html/HTMLViewSourceDocument.h:
837
838 2008-09-30  Sam Weinig  <sam@webkit.org>
839
840         Reviewed by Eric Seidel.
841
842         More for https://bugs.webkit.org/show_bug.cgi?id=21122
843         Autogenerate JS event listeners
844
845         - Make EventListener getter/setters names in c++ files match those in 
846           JS (ie. onLoadListener -> onload).
847         - Add standard way to access the frame associated with the EventTarget
848           for EventListener lookup.
849         - Autogenerate dispatchEvent, it wasn't doing anything custom.
850
851         * bindings/js/JSDOMApplicationCacheCustom.cpp:
852         (WebCore::JSDOMApplicationCache::mark):
853         (WebCore::JSDOMApplicationCache::addEventListener):
854         (WebCore::JSDOMApplicationCache::removeEventListener):
855         (WebCore::JSDOMApplicationCache::setOnchecking):
856         (WebCore::JSDOMApplicationCache::onchecking):
857         (WebCore::JSDOMApplicationCache::setOnerror):
858         (WebCore::JSDOMApplicationCache::onerror):
859         (WebCore::JSDOMApplicationCache::setOnnoupdate):
860         (WebCore::JSDOMApplicationCache::onnoupdate):
861         (WebCore::JSDOMApplicationCache::setOndownloading):
862         (WebCore::JSDOMApplicationCache::ondownloading):
863         (WebCore::JSDOMApplicationCache::setOnprogress):
864         (WebCore::JSDOMApplicationCache::onprogress):
865         (WebCore::JSDOMApplicationCache::setOnupdateready):
866         (WebCore::JSDOMApplicationCache::onupdateready):
867         (WebCore::JSDOMApplicationCache::setOncached):
868         (WebCore::JSDOMApplicationCache::oncached):
869         * bindings/js/JSEventTargetNodeCustom.cpp:
870         (WebCore::JSEventTargetNode::addEventListener):
871         (WebCore::JSEventTargetNode::removeEventListener):
872         (WebCore::JSEventTargetNode::getListener):
873         (WebCore::JSEventTargetNode::setListener):
874         * bindings/js/JSMessagePortCustom.cpp:
875         (WebCore::JSMessagePort::mark):
876         (WebCore::JSMessagePort::addEventListener):
877         (WebCore::JSMessagePort::removeEventListener):
878         (WebCore::JSMessagePort::setOnmessage):
879         (WebCore::JSMessagePort::onmessage):
880         (WebCore::JSMessagePort::setOnclose):
881         (WebCore::JSMessagePort::onclose):
882         * bindings/js/JSXMLHttpRequestCustom.cpp:
883         (WebCore::JSXMLHttpRequest::mark):
884         (WebCore::JSXMLHttpRequest::onreadystatechange):
885         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
886         (WebCore::JSXMLHttpRequest::onabort):
887         (WebCore::JSXMLHttpRequest::setOnabort):
888         (WebCore::JSXMLHttpRequest::onerror):
889         (WebCore::JSXMLHttpRequest::setOnerror):
890         (WebCore::JSXMLHttpRequest::onload):
891         (WebCore::JSXMLHttpRequest::setOnload):
892         (WebCore::JSXMLHttpRequest::onloadstart):
893         (WebCore::JSXMLHttpRequest::setOnloadstart):
894         (WebCore::JSXMLHttpRequest::onprogress):
895         (WebCore::JSXMLHttpRequest::setOnprogress):
896         (WebCore::JSXMLHttpRequest::addEventListener):
897         (WebCore::JSXMLHttpRequest::removeEventListener):
898         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
899         (WebCore::JSXMLHttpRequestUpload::mark):
900         (WebCore::JSXMLHttpRequestUpload::onabort):
901         (WebCore::JSXMLHttpRequestUpload::setOnabort):
902         (WebCore::JSXMLHttpRequestUpload::onerror):
903         (WebCore::JSXMLHttpRequestUpload::setOnerror):
904         (WebCore::JSXMLHttpRequestUpload::onload):
905         (WebCore::JSXMLHttpRequestUpload::setOnload):
906         (WebCore::JSXMLHttpRequestUpload::onloadstart):
907         (WebCore::JSXMLHttpRequestUpload::setOnloadstart):
908         (WebCore::JSXMLHttpRequestUpload::onprogress):
909         (WebCore::JSXMLHttpRequestUpload::setOnprogress):
910         (WebCore::JSXMLHttpRequestUpload::addEventListener):
911         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
912         * bindings/scripts/CodeGeneratorJS.pm:
913         * dom/EventTarget.h:
914         * dom/EventTargetNode.cpp:
915         (WebCore::EventTargetNode::associatedFrame):
916         * dom/EventTargetNode.h:
917         * dom/EventTargetNode.idl:
918         * dom/MessagePort.cpp:
919         (WebCore::MessagePort::associatedFrame):
920         * dom/MessagePort.h:
921         (WebCore::MessagePort::setOnmessage):
922         (WebCore::MessagePort::onmessage):
923         (WebCore::MessagePort::setOnclose):
924         (WebCore::MessagePort::onclose):
925         * dom/MessagePort.idl:
926         * loader/appcache/DOMApplicationCache.h:
927         (WebCore::DOMApplicationCache::setOnchecking):
928         (WebCore::DOMApplicationCache::onchecking):
929         (WebCore::DOMApplicationCache::setOnerror):
930         (WebCore::DOMApplicationCache::onerror):
931         (WebCore::DOMApplicationCache::setOnnoupdate):
932         (WebCore::DOMApplicationCache::onnoupdate):
933         (WebCore::DOMApplicationCache::setOndownloading):
934         (WebCore::DOMApplicationCache::ondownloading):
935         (WebCore::DOMApplicationCache::setOnprogress):
936         (WebCore::DOMApplicationCache::onprogress):
937         (WebCore::DOMApplicationCache::setOnupdateready):
938         (WebCore::DOMApplicationCache::onupdateready):
939         (WebCore::DOMApplicationCache::setOncached):
940         (WebCore::DOMApplicationCache::oncached):
941         (WebCore::DOMApplicationCache::associatedFrame):
942         * loader/appcache/DOMApplicationCache.idl:
943         * svg/EventTargetSVGElementInstance.cpp:
944         (WebCore::EventTargetSVGElementInstance::associatedFrame):
945         (WebCore::EventTargetSVGElementInstance::addEventListener):
946         (WebCore::EventTargetSVGElementInstance::removeEventListener):
947         (WebCore::EventTargetSVGElementInstance::dispatchEvent):
948         * svg/EventTargetSVGElementInstance.h:
949         * xml/XMLHttpRequest.cpp:
950         (WebCore::XMLHttpRequest::associatedFrame):
951         * xml/XMLHttpRequest.h:
952         (WebCore::XMLHttpRequest::setOnreadystatechange):
953         (WebCore::XMLHttpRequest::onreadystatechange):
954         (WebCore::XMLHttpRequest::setOnabort):
955         (WebCore::XMLHttpRequest::onabort):
956         (WebCore::XMLHttpRequest::setOnerror):
957         (WebCore::XMLHttpRequest::onerror):
958         (WebCore::XMLHttpRequest::setOnload):
959         (WebCore::XMLHttpRequest::onload):
960         (WebCore::XMLHttpRequest::setOnloadstart):
961         (WebCore::XMLHttpRequest::onloadstart):
962         (WebCore::XMLHttpRequest::setOnprogress):
963         (WebCore::XMLHttpRequest::onprogress):
964         * xml/XMLHttpRequest.idl:
965         * xml/XMLHttpRequestUpload.cpp:
966         (WebCore::XMLHttpRequestUpload::associatedFrame):
967         * xml/XMLHttpRequestUpload.h:
968         (WebCore::XMLHttpRequestUpload::setOnabort):
969         (WebCore::XMLHttpRequestUpload::onabort):
970         (WebCore::XMLHttpRequestUpload::setOnerror):
971         (WebCore::XMLHttpRequestUpload::onerror):
972         (WebCore::XMLHttpRequestUpload::setOnload):
973         (WebCore::XMLHttpRequestUpload::onload):
974         (WebCore::XMLHttpRequestUpload::setOnloadstart):
975         (WebCore::XMLHttpRequestUpload::onloadstart):
976         (WebCore::XMLHttpRequestUpload::setOnprogress):
977         (WebCore::XMLHttpRequestUpload::onprogress):
978         * xml/XMLHttpRequestUpload.idl:
979
980 2008-09-30  Darin Adler  <darin@apple.com>
981
982         - roll out assertion breaking regression tests
983
984         * platform/ScrollView.cpp:
985         (WebCore::ScrollView::repaintContentRectangle): Temporarily remove assertion
986         that fires in regression tests. Hyatt can add it back later. The assertion
987         fires in the regression test because of layout that triggers repaint occuring
988         during the process of removing a frame.
989
990 2008-09-30  Adele Peterson  <adele@apple.com>
991
992         Reviewed by Darin Adler.
993
994         Fix for https://bugs.webkit.org/show_bug.cgi?id=21227
995         <rdar://problem/6222134> add a way to set color for input placeholder text
996
997         Test: fast/forms/placeholder-pseudo-style.html
998
999         This change adds "-webkit-input-placeholder-mode" as a pseudo class that can be used to style
1000         input elements when they are displaying the placeholder text.
1001
1002         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Add case for inputPlaceholderMode.
1003         * css/CSSSelector.h: (WebCore::CSSSelector::): Add PseudoInputPlaceholderMode.
1004         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
1005         Add check for PseudoInputPlaceholderMode that asks the node if placeholderShouldBeVisible is true.
1006         * css/html4.css: Add rule to make placeholder text default to darkGray.
1007
1008         * html/HTMLInputElement.cpp:
1009         (WebCore::HTMLInputElement::init): Initialize m_placeholderShouldBeVisible.
1010         (WebCore::HTMLInputElement::dispatchFocusEvent): Call updatePlaceholderVisibility.
1011         (WebCore::HTMLInputElement::dispatchBlurEvent): ditto.
1012         (WebCore::HTMLInputElement::parseMappedAttribute): ditto.
1013         (WebCore::HTMLInputElement::setValue): ditto.
1014         (WebCore::HTMLInputElement::setValueFromRenderer): ditto.
1015         (WebCore::HTMLInputElement::updatePlaceholderVisibility): Sets m_placeholderShouldBeVisible based on the current value and the focus state.
1016          This calculation used to be done in the renderer, but since the node knows everything about the state, it can make that decision, and the
1017          renderer will just ask the node if it should draw the placeholder.
1018         * html/HTMLInputElement.h: (WebCore::HTMLInputElement::placeholderShouldBeVisible):
1019
1020         * rendering/RenderTextControl.cpp:
1021         (WebCore::disabledTextColor): Moved to the top of the file.  If there's not very much contrast between the disabled color and the background color,
1022         just leave the text color alone.  We don't want to change a good contrast color scheme so that it has really bad contrast.
1023         If the the contrast was already poor, then it doesn't do any good to change it to a different poor contrast color scheme.
1024         (WebCore::RenderTextControl::createInnerTextStyle): If the node says the placeholder should be visible, prepare by overriding the text security to be "none".
1025         This can only happen as a result of either a setStyle call (which will be followed by a call to updateFromElement) or from createSubtreeIfNeeded, which
1026         is called directly from updateFromElement.  updateFromElement will immediately update the text displayed.
1027         (WebCore::RenderTextControl::updateFromElement): If the placeholder visibility has changed, update the text that is displayed.
1028         (WebCore::RenderTextControl::forwardEvent): Remove calls to update the placeholder state.  This is now done in HTMLInputElement.
1029         * rendering/RenderTextControl.h:
1030
1031 2008-09-30  Beth Dakin  <bdakin@apple.com>
1032
1033         Reviewed by Darin Adler.
1034
1035         Fix for https://bugs.webkit.org/show_bug.cgi?id=20396 Abort caused 
1036         by failed allocation due to invalid counter/attr
1037         and corresponding: <rdar://problem/6152371>
1038
1039         * css/CSSParser.cpp:
1040         (WebCore::CSSParser::parseCounterContent): The spec indicates that 
1041         only identifiers should be accepted here.
1042
1043 2008-09-30  Kevin McCullough  <kmccullough@apple.com>
1044
1045         Reviewed by Oliver Hunt.
1046
1047         Bug 21255: console.profileEnd() without a console.profile() crashes the
1048         web inspector
1049
1050         * page/Console.cpp:
1051         (WebCore::Console::profileEnd):
1052
1053 2008-09-30  Kevin McCullough  <kmccullough@apple.com>
1054
1055         Reviewed by Tim Hatcher.
1056
1057         Bug 21252: calling console.profile() with a title that is 2 chars or
1058         shorter does not linkify it
1059
1060         - Previously we tried to not linkify very short URLs but since profile
1061         titles can be any length this is not always true.
1062
1063         * page/inspector/inspector.js:
1064
1065 2008-09-30  Dave Hyatt  <hyatt@apple.com>
1066
1067         Remove the update() method on ScrollView.  This method was only called in one place, and its purpose
1068         was to cause a display/flush to happen.  Here is a breakdown of the method use on each platform:
1069         (1) Not used on Mac
1070         (2) Used on Windows
1071         (3) Used on Qt, but implemented incorrectly to cause a full repaint for no reason.
1072         (4) Used on Gtk, but implemented incorrectly to cause a full repaint for no reason.
1073         (5) Used on wx, but probably not needed (since wx has platform widgets like Mac).
1074         
1075         There is now a paint method on HostWindow that does an immediate mode repaint of an empty rect to
1076         cause the display/flush to happen if needed (thus saving an extra method on ChromeClient).
1077         With the changes to this method, the new behavior is as follows:
1078         (1) Not used on Mac
1079         (2) Used on Windows
1080         (3) Nothing happens on Qt, but only because they have not implemented immediate mode updating.
1081         (4) Gtk now behaves like Windows and will process updates but not do any incorrect additional invalidation.
1082         (5) Not used on wx
1083         
1084         This method was originally added for Windows. It's not clear the display/flush is really even necessary on the other
1085         platforms.  At the very least stopping unnecessary full invalidations on Qt/Gtk is a good thing. :)
1086         
1087         Reviewed by Sam Weinig
1088
1089         * ChangeLog:
1090         * dom/Document.cpp:
1091         (WebCore::Document::implicitClose):
1092         * platform/HostWindow.h:
1093         (WebCore::HostWindow::paint):
1094         * platform/ScrollView.h:
1095         * platform/gtk/ScrollViewGtk.cpp:
1096         * platform/mac/ScrollViewMac.mm:
1097         * platform/qt/ScrollViewQt.cpp:
1098         * platform/win/ScrollViewWin.cpp:
1099         * platform/wx/ScrollViewWx.cpp:
1100
1101 2008-09-30  Timothy Hatcher  <timothy@apple.com>
1102
1103         Focus the DOM tree in the Web Inspector when a node is inspected.
1104         So when the search field has focus, the focus moves to the tree,
1105         allowing the arrow keys work. This can happen when using the new
1106         find in page feature.
1107
1108         https://bugs.webkit.org/show_bug.cgi?id=21251
1109
1110         Reviewed by Geoff Garen.
1111
1112         * page/inspector/ElementsPanel.js:
1113         (WebInspector.ElementsPanel): Set currentFocusElement to
1114         the main-panels element if the panel is visible.
1115         (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
1116         Remove a set of currentFocusElement since this moved.
1117         * page/inspector/inspector.js:
1118         (WebInspector.set currentFocusElement): Always focus the element.
1119         This ensures that when focus changes in the page and we don't
1120         catch it, we will still focus the elements even if we think it
1121         was already focused.
1122
1123 2008-09-30  Timothy Hatcher  <timothy@apple.com>
1124
1125         Make the Web Inspector's toolbar icons darker when the mouse is
1126         pressed on them. This matches the standard NSToolbar look.
1127
1128         https://bugs.webkit.org/show_bug.cgi?id=21249
1129         rdar://problem/6033752
1130
1131         Reviewed by Adam Roben.
1132
1133         * page/inspector/Images/databasesIcon.png:
1134         * page/inspector/Images/elementsIcon.png:
1135         * page/inspector/Images/profilesIcon.png:
1136         * page/inspector/Images/resourcesIcon.png:
1137         * page/inspector/Images/scriptsIcon.png:
1138         * page/inspector/Panel.js:
1139         * page/inspector/inspector.css:
1140
1141 2008-09-30  Kevin McCullough  <kmccullough@apple.com>
1142
1143         Reviewed by Tim Hatcher.
1144
1145         Bug 21139: Profiler log message is wrong
1146         - Correctly fix =(
1147         Don't call _format twice.
1148
1149         * page/Page.h:
1150         * page/inspector/Console.js:
1151         * page/inspector/ProfilesPanel.js:
1152         * page/inspector/inspector.js:
1153
1154 2008-09-30  Dave Hyatt  <hyatt@apple.com>
1155
1156         http://bugs.webkit.org/show_bug.cgi?id=21250
1157         
1158         Rename updateContents to repaintContentRectangle and make it cross-platform by always sending
1159         repaints up through the ChromeClient.
1160
1161         Reviewed by Darin Adler
1162
1163         * loader/EmptyClients.h:
1164         (WebCore::EmptyChromeClient::repaint):
1165         * page/Chrome.cpp:
1166         (WebCore::Chrome::repaint):
1167         * page/Chrome.h:
1168         * page/ChromeClient.h:
1169         * page/FrameView.cpp:
1170         (WebCore::FrameView::hostWindow):
1171         (WebCore::FrameView::repaintContentRectangle):
1172         * page/FrameView.h:
1173         * platform/HostWindow.h:
1174         * platform/ScrollView.cpp:
1175         (WebCore::ScrollView::repaintContentRectangle):
1176         (WebCore::ScrollView::platformRepaintContentRectangle):
1177         * platform/ScrollView.h:
1178         * platform/gtk/ScrollViewGtk.cpp:
1179         * platform/mac/ScrollViewMac.mm:
1180         (WebCore::ScrollView::platformRepaintContentRectangle):
1181         * platform/qt/ScrollViewQt.cpp:
1182         * platform/win/ScrollViewWin.cpp:
1183         * platform/wx/ScrollViewWx.cpp:
1184         (WebCore::ScrollView::platformRepaintContentRectangle):
1185
1186 2008-09-30  Alexey Proskuryakov  <ap@webkit.org>
1187
1188         Non-Mac build fixes.
1189
1190         * GNUmakefile.am:
1191         * WebCore.pro:
1192         * WebCore.vcproj/WebCore.vcproj:
1193         * WebCoreSources.bkl:
1194         * webcore-base.bkl:
1195         Added DOMProtect.{cpp,h}.
1196
1197 2008-09-39  Kevin Decker  <kdecker@apple.com>
1198
1199         Reviewed by John Sullivan.
1200
1201         * bridge/npapi.h: Added skeleton for a new plug-in drawing model, the NPCoreAnimationDrawingModel. This model will eventually pave the way
1202         for hardware accelerated drawing in plug-ins and out of process plug-in rendering.
1203
1204 2008-09-29  Julien Chaffraix  <jchaffraix@webkit.org>
1205
1206         Reviewed by Maciej Stachowiak.
1207
1208         Bug 21106: .in format discussed changes
1209         https://bugs.webkit.org/show_bug.cgi?id=21106
1210
1211         - Removed "cppNamespace" global parameter and hard-coded "WebCore" as it
1212         is the only namespace used.
1213
1214         - Removed "generateFactory" and "generateWrapperFactory" parameters and
1215         re-introduced the command line options.
1216
1217         - Cleaned up the output of make_names.pl (removed unneeded new line).
1218
1219         * DerivedSources.make: Added factories command line options.
1220         * GNUmakefile.am: Ditto.
1221         * WebCore.pro: Ditto and removed some arguments that were migrated to
1222         the .in files.
1223
1224         * dom/make_names.pl: Clean up (see above).
1225
1226         * html/HTMLAttributeNames.in: Removed "cppNamespace", "generateFactory"
1227         and "generateWrapperFactory" occurences.
1228         * html/HTMLTagNames.in: Ditto.
1229         * svg/svgattrs.in: Ditto.
1230         * svg/svgtags.in: Ditto.
1231         * svg/xlinkattrs.in: Ditto.
1232         * xml/xmlattrs.in: Ditto.
1233
1234 2008-09-29  Chris Fleizach  <cfleizach@apple.com>
1235
1236         Reviewed by John Sullivan.
1237
1238         <rdar://problem/6255456> AX: <file> input button shouldn't have children exposed
1239         Make sure that certain types of elements do not return children and, moreover, do not waste their
1240         energy trying to return children
1241
1242         Test: accessibility/nochildren-elements.html
1243
1244         * page/AccessibilityObject.h:
1245         (WebCore::AccessibilityObject::canHaveChildren):
1246         * page/AccessibilityRenderObject.cpp:
1247         (WebCore::AccessibilityRenderObject::canHaveChildren):
1248         (WebCore::AccessibilityRenderObject::addChildren):
1249         * page/AccessibilityRenderObject.h:
1250
1251 2008-09-30  Alexey Proskuryakov  <ap@webkit.org>
1252
1253         Reviewed by Sam Weinig.
1254
1255         https://bugs.webkit.org/show_bug.cgi?id=21213
1256         MessagePort crash when GC collects an object with a pending close event
1257
1258         Test: fast/events/message-channel-gc-2.html
1259               fast/events/message-channel-listener-circular-ownership.html
1260
1261         * bindings/DOMProtect.cpp: Added.
1262         (WebCore::gcProtectDOMObject):
1263         (WebCore::gcUnprotectDOMObject):
1264         * bindings/DOMProtect.h: Added.
1265         Added an abstraction for GC protection to avoid the need to call JS bindings code from
1266         DOM objects directly.
1267
1268         * dom/MessagePort.cpp:
1269         (WebCore::CloseMessagePortTimer::fired):
1270         (WebCore::MessagePort::queueCloseEvent):
1271         GC protect MessagePort wrapper while there is a pending close event.
1272         This may be necessary for message events, too, but that case is not a crasher, and actually
1273         behaves to the letter of the current HTML5 text, so I'll consider it later.
1274
1275         * xml/XMLHttpRequest.cpp:
1276         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
1277         (WebCore::XMLHttpRequest::dropProtection):
1278         Use gcProtectDOMObject here, too. Unfortunately, XMLHttpRequest has more dependencies on JSC.
1279
1280         * bindings/js/JSMessagePortCustom.cpp:
1281         (WebCore::JSMessagePort::addEventListener):
1282         (WebCore::JSMessagePort::removeEventListener):
1283         (WebCore::JSMessagePort::setOnmessage):
1284         (WebCore::JSMessagePort::setOnclose):
1285         Don't tell DOMWindowBase that MessagePort is a NodeEventTarget, this is not true. I do not
1286         know if this was causing any real issues, but we shouldn't lie to DOMWindowBase.
1287
1288         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1289         (WebCore::JSXMLHttpRequestUpload::mark):
1290         While at it, changed to use a typedef for event listeners from XMLHttpRequestUpload, not
1291         from XMLHttpRequest.
1292
1293 2008-09-30  Adam Roben  <aroben@apple.com>
1294
1295         Windows build fix
1296
1297         * DerivedSources.cpp: Add JSEventTargetNode.cpp.
1298
1299 2008-09-29  Sam Weinig  <sam@webkit.org>
1300
1301         Reviewed by Tim Hatcher.
1302
1303         Patch for https://bugs.webkit.org/show_bug.cgi?id=21122
1304         Autogenerate JS event listeners
1305
1306         - Generate EventTargetNode.
1307
1308         * DerivedSources.make:
1309         * GNUmakefile.am:
1310         * WebCore.pro:
1311         * WebCore.vcproj/WebCore.vcproj:
1312         * WebCore.xcodeproj/project.pbxproj:
1313         * WebCoreSources.bkl:
1314         * bindings/js/JSEventListener.cpp:
1315         * bindings/js/JSEventTarget.cpp: Added.
1316         (WebCore::toJS):
1317         * bindings/js/JSEventTarget.h: Added.
1318         * bindings/js/JSEventTargetBase.cpp: Removed.
1319         * bindings/js/JSEventTargetBase.h:
1320         * bindings/js/JSEventTargetNode.cpp: Removed.
1321         * bindings/js/JSEventTargetNode.h: Removed.
1322         * bindings/js/JSEventTargetNodeCustom.cpp: Added.
1323         (WebCore::JSEventTargetNode::addEventListener):
1324         (WebCore::JSEventTargetNode::removeEventListener):
1325         (WebCore::JSEventTargetNode::dispatchEvent):
1326         (WebCore::JSEventTargetNode::getListener):
1327         (WebCore::JSEventTargetNode::setListener):
1328         (WebCore::JSEventTargetNode::pushEventHandlerScope):
1329         * bindings/js/JSEventTargetSVGElementInstance.cpp:
1330         (WebCore::):
1331         (WebCore::JSEventTargetSVGElementInstancePrototype::self):
1332         (WebCore::JSEventTargetSVGElementInstancePrototype::getOwnPropertySlot):
1333         (jsEventTargetAddEventListener):
1334         (jsEventTargetRemoveEventListener):
1335         (jsEventTargetDispatchEvent):
1336         * bindings/js/JSEventTargetSVGElementInstance.h:
1337         (WebCore::JSEventTargetSVGElementInstancePrototype::JSEventTargetSVGElementInstancePrototype):
1338         (WebCore::JSEventTargetSVGElementInstancePrototype::classInfo):
1339         * bindings/scripts/CodeGeneratorJS.pm:
1340         * dom/EventTargetNode.idl: Added.
1341
1342 2008-09-29  Darin Adler  <darin@apple.com>
1343
1344         Reviewed by Sam Weinig.
1345
1346         - https://bugs.webkit.org/show_bug.cgi?id=21214
1347           work on getting rid of ExecState
1348
1349         * bindings/js/JSDOMWindowBase.cpp:
1350         (WebCore::JSDOMWindowBase::JSDOMWindowBase): Removed globalThisValue argument
1351         for base class constructor.
1352
1353 2008-09-29  David Hyatt  <hyatt@apple.com>
1354
1355         Add the new HostWindow base class.  A HostWindow hosts a hierarchy of Widgets.  The Chrome object on Page
1356         now subclasses from HostWindow.  The new class will allow objects in platform/ like Widgets, Scrollbars
1357         and ScrollViews to talk to the HostWindow object in order to do backing store operations and invalidations.
1358         (Right now the platform layering is simply being violated by ScrollViews going directly to the ChromeClient.)
1359
1360         Reviewed by Sam Weinig
1361
1362         * WebCore.xcodeproj/project.pbxproj:
1363         * page/Chrome.h:
1364         * platform/HostWindow.h: Added.
1365         (WebCore::HostWindow::HostWindow):
1366         (WebCore::HostWindow::~HostWindow):
1367
1368 2008-09-29  Kevin Decker  <kdecker@apple.com>
1369
1370         Reviewed by Anders Carlsson.
1371
1372         * bridge/npapi.h: Tweaked NPNVariable enum. NPNVsupportsCocoaBool,  NPNVsupportsCarbonBool are now in the 3000 range instead of 
1373         2000. 
1374
1375 2008-09-29  Dan Bernstein  <mitz@apple.com>
1376
1377         Reviewed by Adam Roben.
1378
1379         - WebCore part of fixing <rdar://problem/6247906> REGRESSION (r19500): Crash on quit beneath CloseThemeData
1380
1381         * rendering/RenderThemeWin.cpp:
1382         (WebCore::RenderThemeWin::setWebKitIsBeingUnloaded): Added.
1383         (WebCore::RenderThemeWin::~RenderThemeWin): Check if WebKit is being
1384         unloaded, to avoid calling uxtheme.dll functions after that library has
1385         been unloaded.
1386         * rendering/RenderThemeWin.h:
1387
1388 2008-09-29  Chris Fleizach  <cfleizach@apple.com>
1389
1390         Reviewed by John Sullivan
1391
1392         <rdar://problem/6240743> AXLoadComplete is sent for non-top level web areas and bogus web areas
1393
1394         Sends AXLoadComplete only when the top level web area is finished loading
1395
1396         * dom/Document.cpp:
1397         (WebCore::Document::implicitClose):
1398
1399 2008-09-29  Timothy Hatcher  <timothy@apple.com>
1400
1401         Makes the node highlight always show up when hovering a node in
1402         the Web Inspector now that the highlight does not scroll to reveal
1403         the node. Also adds a hover effect in the inspector when hovering
1404         causes a highlight in the page. This ties the user hovering action
1405         to the highlight so it is clear what causes the highlight to appear.
1406
1407         Also the highlight now temporarily shows up for 2 seconds after
1408         selecting a node in the DOM tree. So arrowing around in the tree
1409         will show the node on the page, providing feedback to the user.
1410
1411         Plus fixes an issue where quickly moving away from hovering
1412         a node would keep showing the page highlight. This was happening
1413         in breadcrumbs and the DOM tree.
1414
1415         https://bugs.webkit.org/show_bug.cgi?id=21220
1416
1417         Reviewed by Kevin McCullough.
1418
1419         * page/inspector/Console.js:
1420         (WebInspector.Console.prototype._mouseOverNode): Added. Used for
1421         hovering DOM nodes in the console.
1422         (WebInspector.Console.prototype._mouseOutOfNode): Ditto.
1423         (WebInspector.Console.prototype._formatnode): Use the new event
1424         listeners and add a class name to the anchor element.
1425         * page/inspector/ElementsPanel.js:
1426         (WebInspector.ElementsPanel): Add new event listeners to the
1427         crumbs element to do the node hovering highlight.
1428         (WebInspector.ElementsPanel.prototype.hide):
1429         (WebInspector.ElementsPanel.prototype.reset):
1430         (WebInspector.ElementsPanel.prototype._mouseMovedInCrumbs):
1431         (WebInspector.ElementsPanel.prototype._mouseMovedOutOfCrumbs):
1432         (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
1433         * page/inspector/ElementsTreeOutline.js:
1434         (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode):
1435         Show the node hishlight for 2 seconds then restore the highlight
1436         to the current hovered node.
1437         (WebInspector.ElementsTreeOutline.prototype._onmousemove): Set the
1438         hovered node and set the hovered state on the tree element.
1439         (WebInspector.ElementsTreeOutline.prototype._onmouseout): Set the
1440         hovered node to null and removed the hovered state from the previous
1441         hovered tree element.
1442         (WebInspector.ElementsTreeElement.prototype.set/get hovered): Adds
1443         the hovered class to the list item.
1444         (WebInspector.ElementsTreeElement.prototype.onattach): Ditto.
1445         * page/inspector/inspector.css:
1446         * page/inspector/inspector.js:
1447         (WebInspector.set hoveredDOMNode): Pass a delay to _updateHoverHighlightSoon
1448         based on the showingDOMNodeHighlight property of 50ms or 500ms. This
1449         causes the highlight to change sooner if there is one already showing
1450         and appear later if there isn't one showing. This is like tooltips,
1451         hovering a node for 500ms will cause highlight then mousing between nodes
1452         will keep the highlight and change to the new node.
1453         (WebInspector._updateHoverHighlightSoon): Take a delay being passed in and
1454         always reset the timeout so continuous mousing does not keep flasshing
1455         the highlight on the screen.
1456         (WebInspector._updateHoverHighlight): Removed the alt key check and added
1457         the showingDOMNodeHighlight property.
1458         (WebInspector.documentKeyDown): Removed the alt key check.
1459         (WebInspector.documentKeyUp): Ditto.
1460         (WebInspector.reset): Clear the hoveredDOMNode.
1461
1462 2008-09-29  Simon Fraser  <simon.fraser@apple.com>
1463
1464         Reviewed by Anders Carlsson
1465
1466         Fix RenderStyle leak in animation code, and assert that 
1467         keyframe resolution in CSSStyleSelector is not going to clobber
1468         m_style.
1469
1470         * css/CSSStyleSelector.cpp:
1471         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
1472         * page/animation/KeyframeAnimation.cpp:
1473         (WebCore::KeyframeAnimation::~KeyframeAnimation):
1474
1475 2008-09-29  Chris Marrin  <cmarrin@apple.com>
1476
1477         Reviewed by Dave Hyatt
1478
1479         Fixed https://bugs.webkit.org/show_bug.cgi?id=20995
1480         Rewrite keyframe resolution to be like styleForElement()
1481         
1482         Test: animations/lineheight-animation.html
1483
1484         * css/CSSStyleSelector.cpp:
1485         (WebCore::CSSStyleSelector::addKeyframeStyle):
1486         (WebCore::CSSStyleSelector::~CSSStyleSelector):
1487         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
1488         (WebCore::CSSRuleSet::addRulesFromSheet):
1489         (WebCore::CSSStyleSelector::mapAnimationName):
1490         * css/CSSStyleSelector.h:
1491         * page/animation/CompositeAnimation.cpp:
1492         (WebCore::CompositeAnimation::updateKeyframeAnimations):
1493         * page/animation/KeyframeAnimation.cpp:
1494         (WebCore::KeyframeAnimation::KeyframeAnimation):
1495         (WebCore::KeyframeAnimation::animate):
1496         (WebCore::KeyframeAnimation::hasAnimationForProperty):
1497         (WebCore::KeyframeAnimation::sendAnimationEvent):
1498         (WebCore::KeyframeAnimation::overrideAnimations):
1499         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
1500         (WebCore::KeyframeAnimation::affectsProperty):
1501         (WebCore::KeyframeAnimation::validateTransformFunctionList):
1502         * page/animation/KeyframeAnimation.h:
1503         * rendering/style/Animation.cpp:
1504         (WebCore::Animation::animationsMatch):
1505         * rendering/style/Animation.h:
1506         * rendering/style/KeyframeList.cpp:
1507         (WebCore::KeyframeList::~KeyframeList):
1508         (WebCore::KeyframeList::clear):
1509         (WebCore::KeyframeList::insert):
1510         * rendering/style/KeyframeList.h:
1511         (WebCore::KeyframeValue::KeyframeValue):
1512         (WebCore::KeyframeList::KeyframeList):
1513         (WebCore::KeyframeList::operator!=):
1514         (WebCore::KeyframeList::animationName):
1515         (WebCore::KeyframeList::addProperty):
1516         (WebCore::KeyframeList::containsProperty):
1517         (WebCore::KeyframeList::beginProperties):
1518         (WebCore::KeyframeList::endProperties):
1519         (WebCore::KeyframeList::isEmpty):
1520         (WebCore::KeyframeList::size):
1521         (WebCore::KeyframeList::beginKeyframes):
1522         (WebCore::KeyframeList::endKeyframes):
1523         * rendering/style/RenderStyle.h:
1524         * rendering/style/StyleRareNonInheritedData.cpp:
1525         * rendering/style/StyleRareNonInheritedData.h:
1526
1527 2008-09-29  Chris Marrin  <cmarrin@apple.com>
1528
1529         Reviewed by Eric Seidel
1530
1531         Clean up fix in PropertyWrapperGetter::equals
1532         https://bugs.webkit.org/show_bug.cgi?id=21011
1533         
1534         Test: transitions/override-transition-crash.html
1535
1536         * page/animation/AnimationBase.cpp:
1537         (WebCore::PropertyWrapperGetter::equals):
1538         * page/animation/CompositeAnimation.cpp:
1539         (WebCore::CompositeAnimation::updateTransitions):
1540
1541 2008-09-29  Chris Marrin  <cmarrin@apple.com>
1542
1543         Reviewed by Eric Seidel
1544
1545         https://bugs.webkit.org/show_bug.cgi?id=21001
1546         Starting transition after animation, when animation
1547         is finished, transition is wrong.
1548
1549         Test: animations/transition-and-animation-2.html
1550
1551         * page/animation/AnimationBase.h:
1552         * page/animation/CompositeAnimation.cpp:
1553         (WebCore::CompositeAnimation::updateTransitions):
1554         (WebCore::CompositeAnimation::updateKeyframeAnimations):
1555         (WebCore::CompositeAnimation::resetTransitions):
1556         (WebCore::CompositeAnimation::cleanupFinishedAnimations):
1557         * page/animation/ImplicitAnimation.cpp:
1558         (WebCore::ImplicitAnimation::ImplicitAnimation):
1559         (WebCore::ImplicitAnimation::~ImplicitAnimation):
1560         (WebCore::ImplicitAnimation::animate):
1561         (WebCore::ImplicitAnimation::reset):
1562         * page/animation/ImplicitAnimation.h:
1563
1564 2008-09-29  Chris Marrin  <cmarrin@apple.com>
1565
1566         Reviewed by Sam Weinig
1567
1568         https://bugs.webkit.org/show_bug.cgi?id=20921
1569         -webkit-animation-timing-function: inside of keyframes is ignored
1570
1571         Test: animations/keyframe-timing-functions.html
1572
1573         * page/animation/AnimationBase.cpp:
1574         (WebCore::AnimationBase::progress):
1575         * page/animation/AnimationBase.h:
1576         * page/animation/ImplicitAnimation.cpp:
1577         (WebCore::ImplicitAnimation::animate):
1578         * page/animation/KeyframeAnimation.cpp:
1579         (WebCore::KeyframeAnimation::animate):
1580
1581 2008-09-29  Dan Bernstein  <mitz@apple.com>
1582
1583         - Windows build fix
1584
1585         * platform/ScrollView.cpp:
1586         (WebCore::ScrollView::platformScroll):
1587
1588 2008-09-29  Dan Bernstein  <mitz@apple.com>
1589
1590         - another attempt at a Windows build fix
1591
1592         * platform/ScrollView.cpp:
1593         (WebCore::platformScroll):
1594
1595 2008-09-29  Dan Bernstein  <mitz@apple.com>
1596
1597         - Windows build fix
1598
1599         * platform/ScrollView.cpp:
1600         (WebCore::ScrollView::platformSetScrollPosition):
1601
1602 2008-09-29  David Hyatt  <hyatt@apple.com>
1603
1604         https://bugs.webkit.org/show_bug.cgi?id=21218
1605
1606         Accidentally removed a check to see if the scrollbar modes were equal.  This caused a crash on Windows.
1607         It's silly that the code was this fragile, but for now just put the check back in.
1608
1609         Reviewed by Dan Bernstein
1610
1611         * platform/ScrollView.cpp:
1612         (WebCore::ScrollView::setScrollbarModes):
1613
1614 2008-09-29  David Hyatt  <hyatt@apple.com>
1615
1616         https://bugs.webkit.org/show_bug.cgi?id=21216
1617
1618         Make setScrollPosition and scroll() cross-platform.
1619
1620         Reviewed by Anders
1621
1622         * platform/ScrollView.cpp:
1623         (WebCore::ScrollView::setScrollPosition):
1624         (WebCore::ScrollView::scroll):
1625         * platform/ScrollView.h:
1626         * platform/gtk/ScrollViewGtk.cpp:
1627         * platform/mac/ScrollViewMac.mm:
1628         (WebCore::ScrollView::platformSetScrollPosition):
1629         (WebCore::ScrollView::platformScroll):
1630         * platform/qt/ScrollViewQt.cpp:
1631         * platform/win/ScrollViewWin.cpp:
1632         * platform/wx/ScrollViewWx.cpp:
1633         (WebCore::ScrollView::platformSetScrollPosition):
1634         (WebCore::ScrollView::platformScroll):
1635
1636 2008-09-29  Kevin McCullough  <kmccullough@apple.com>
1637
1638         Reviewed by Oliver.
1639
1640         Bug 21139: Profiler log message is wrong
1641         - Because _format was called twice the number in the log was incremented
1642         too many times, but we were passing it around in the link the whole time
1643
1644         * page/inspector/ProfilesPanel.js:
1645         * page/inspector/inspector.js:
1646
1647 2008-09-29  Sam Weinig  <sam@webkit.org>
1648
1649         Reviewed by Cameron Zwarich.
1650
1651         Autogenerate EventListeners, addEventListener and removeEventListener
1652         for JSDOMWindow.
1653
1654         * bindings/js/JSDOMWindowBase.cpp:
1655         * bindings/js/JSDOMWindowBase.h:
1656         * bindings/js/JSDOMWindowCustom.cpp:
1657         (WebCore::JSDOMWindow::onwebkitanimationstart):
1658         (WebCore::JSDOMWindow::setOnwebkitanimationstart):
1659         (WebCore::JSDOMWindow::onwebkitanimationiteration):
1660         (WebCore::JSDOMWindow::setOnwebkitanimationiteration):
1661         (WebCore::JSDOMWindow::onwebkitanimationend):
1662         (WebCore::JSDOMWindow::setOnwebkitanimationend):
1663         (WebCore::JSDOMWindow::onwebkittransitionend):
1664         (WebCore::JSDOMWindow::setOnwebkittransitionend):
1665         (WebCore::JSDOMWindow::addEventListener):
1666         (WebCore::JSDOMWindow::removeEventListener):
1667         (WebCore::JSDOMWindow::setListener):
1668         (WebCore::JSDOMWindow::getListener):
1669         * bindings/scripts/CodeGeneratorJS.pm:
1670         * page/DOMWindow.idl:
1671
1672 2008-09-29  Thiago Macieira  <thiago.macieira@nokia.com>
1673
1674         Reviewed by Simon.
1675
1676         Changed copyright from Trolltech ASA to Nokia.
1677
1678         Nokia acquired Trolltech ASA, assets were transferred on September 26th 2008.
1679
1680         * bindings/js/JSMimeTypeArrayCustom.cpp:
1681         * bindings/js/JSNavigatorCustom.cpp:
1682         * bindings/js/JSPluginArrayCustom.cpp:
1683         * bindings/js/JSPluginCustom.cpp:
1684         * bindings/js/ScriptControllerMac.mm:
1685         * bindings/js/ScriptControllerQt.cpp:
1686         * bridge/qt/qt_class.cpp:
1687         * bridge/qt/qt_class.h:
1688         * bridge/qt/qt_instance.cpp:
1689         * bridge/qt/qt_instance.h:
1690         * bridge/qt/qt_runtime.cpp:
1691         * bridge/qt/qt_runtime.h:
1692         * bridge/testqtbindings.cpp:
1693         * css/makegrammar.pl:
1694         * css/makeprop.pl:
1695         * css/makevalues.pl:
1696         * dom/Node.cpp:
1697         * dom/TagNodeList.cpp:
1698         * dom/TagNodeList.h:
1699         * dom/XMLTokenizer.cpp:
1700         * dom/XMLTokenizer.h:
1701         * dom/XMLTokenizerLibxml2.cpp:
1702         * dom/XMLTokenizerQt.cpp:
1703         * editing/Editor.cpp:
1704         * editing/EditorCommand.cpp:
1705         * html/CanvasRenderingContext2D.cpp:
1706         * html/CanvasStyle.cpp:
1707         * html/HTMLAppletElement.cpp:
1708         * html/HTMLEmbedElement.cpp:
1709         * html/HTMLObjectElement.cpp:
1710         * loader/FrameLoader.cpp:
1711         * page/Chrome.cpp:
1712         * page/EditorClient.h:
1713         * page/Frame.cpp:
1714         * page/Frame.h:
1715         * page/FramePrivate.h:
1716         * page/Navigator.cpp:
1717         * page/Navigator.h:
1718         * page/Navigator.idl:
1719         * page/mac/FrameMac.mm:
1720         * page/qt/EventHandlerQt.cpp:
1721         * platform/graphics/qt/FontCacheQt.cpp:
1722         * platform/graphics/qt/FontCustomPlatformData.cpp:
1723         * platform/graphics/qt/FontCustomPlatformData.h:
1724         * platform/graphics/qt/FontPlatformData.h:
1725         * platform/graphics/qt/FontQt.cpp:
1726         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
1727         * platform/graphics/qt/GraphicsContextQt.cpp:
1728         * platform/graphics/qt/ImageDecoderQt.cpp:
1729         * platform/graphics/qt/ImageDecoderQt.h:
1730         * platform/graphics/qt/ImageSourceQt.cpp:
1731         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1732         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
1733         * platform/graphics/qt/SimpleFontDataQt.cpp:
1734         * platform/gtk/MIMETypeRegistryGtk.cpp:
1735         * platform/mac/MIMETypeRegistryMac.mm:
1736         * platform/network/qt/QNetworkReplyHandler.cpp:
1737         * platform/network/qt/QNetworkReplyHandler.h:
1738         * platform/network/qt/ResourceHandleQt.cpp:
1739         * platform/network/qt/ResourceRequestQt.cpp:
1740         * platform/qt/ClipboardQt.cpp:
1741         * platform/qt/EventLoopQt.cpp:
1742         * platform/qt/KURLQt.cpp:
1743         * platform/qt/LoggingQt.cpp:
1744         * platform/qt/MIMETypeRegistryQt.cpp:
1745         * platform/qt/PasteboardQt.cpp:
1746         * platform/qt/PlatformScreenQt.cpp:
1747         * platform/qt/PopupMenuQt.cpp:
1748         * platform/qt/QWebPopup.cpp:
1749         * platform/qt/QWebPopup.h:
1750         * platform/qt/RenderThemeQt.cpp:
1751         * platform/qt/ScrollbarQt.cpp:
1752         * platform/qt/ScrollbarThemeQt.cpp:
1753         * platform/qt/WheelEventQt.cpp:
1754         * platform/qt/html4-adjustments-qt.css:
1755         * platform/wx/MimeTypeRegistryWx.cpp:
1756         * plugins/MimeType.cpp:
1757         * plugins/MimeType.h:
1758         * plugins/MimeType.idl:
1759         * plugins/MimeTypeArray.cpp:
1760         * plugins/MimeTypeArray.h:
1761         * plugins/MimeTypeArray.idl:
1762         * plugins/Plugin.cpp:
1763         * plugins/Plugin.h:
1764         * plugins/Plugin.idl:
1765         * plugins/PluginArray.cpp:
1766         * plugins/PluginArray.h:
1767         * plugins/PluginArray.idl:
1768         * plugins/PluginData.cpp:
1769         * plugins/PluginData.h:
1770         * plugins/gtk/PluginDataGtk.cpp:
1771         * plugins/mac/PluginDataMac.mm:
1772         * plugins/qt/PluginDataQt.cpp:
1773         * plugins/win/PluginDataWin.cpp:
1774         * rendering/RenderTableCol.cpp:
1775         * rendering/RenderTableCol.h:
1776
1777 2008-09-29  Thiago Macieira  <thiago.macieira@trolltech.com>
1778
1779         Reviewed by Simon
1780
1781         Fix compilation with gcc 4.3
1782
1783          gcc 4.3 is stricter and ctype.h isn't getting included
1784         automatically here by dependencies. So do it directly.
1785
1786         * platform/qt/PlatformKeyboardEventQt.cpp:
1787
1788 2008-09-29  Morten Sørvig  <msorvig@trolltech.com>
1789
1790         Reviewed by Simon.
1791
1792         Fix compilation with Qt/Mac without plugins.
1793
1794         * platform/qt/TemporaryLinkStubs.cpp:
1795
1796 2008-09-29  Mark Rowe  <mrowe@apple.com>
1797
1798         Reviewed by Sam Weinig.
1799
1800         Apply the ASCII fast path optimization from StringImpl::lower to StringImpl::upper.
1801         In the few places that we call .upper() in WebCore the strings represent things like
1802         tag and attribute names, which are nearly always going to be ASCII.
1803
1804         * platform/text/StringImpl.cpp:
1805         (WebCore::StringImpl::lower): If we have to resize the buffer, be sure to pass the new length
1806         in to Unicode::toLower the second time.
1807         (WebCore::StringImpl::upper):
1808
1809 2008-09-28  Mark Rowe  <mrowe@apple.com>
1810
1811         Reviewed by Sam Weinig.
1812
1813         Speed up getPropertyValue('clip') by 25% by using a Vector<UChar> for building a string,
1814         rather than String::operator+=.
1815
1816         * css/CSSPrimitiveValue.cpp:
1817         (WebCore::CSSPrimitiveValue::cssText):
1818
1819 2008-09-28  Mark Rowe  <mrowe@apple.com>
1820
1821         Reviewed by Oliver Hunt.
1822
1823         Speed up computedStyle.getPropertyValue('color') by 4.5x.
1824
1825         Using a Vector<UChar> while building up the property's cssText is substantially cheaper than using String::operator+=
1826         as it avoids many memory reallocations.
1827
1828         This also speeds up the jQuery .offset() benchmark at <http://dev.jquery.com/~john/speed/1.2.6/offset-1.2.6.html>
1829         by 20% due to jQuery's strange need to call getPropertyValue('color') when retrieving the computed styles for
1830         unrelated properties on an element.
1831
1832         * css/CSSPrimitiveValue.cpp:
1833         (WebCore::CSSPrimitiveValue::cssText): Build the result for the color types into a Vector<UChar>
1834         and use appendNumber rather than the String::number in order to cut down on memory allocations.
1835         * platform/text/PlatformString.h:
1836         (WebCore::appendNumber): A helper function for formatting an unsigned character as a number
1837         into a Vector<UChar>.
1838
1839 2008-09-28  Sam Weinig  <sam@webkit.org>
1840
1841         Reviewed by Anders Carlsson.
1842
1843         Remove spurious call to lower().
1844
1845         * css/MediaQueryEvaluator.cpp:
1846         (WebCore::MediaQueryEvaluator):
1847
1848 2008-09-28  Sam Weinig  <sam@webkit.org>
1849
1850         Reviewed by Dan Bernstein.
1851
1852         Use a CaseFoldingHash instead of calling lower on family strings.
1853
1854         * css/CSSFontSelector.cpp:
1855         (WebCore::CSSFontSelector::addFontFaceRule):
1856         (WebCore::CSSFontSelector::getFontData):
1857         * css/CSSFontSelector.h:
1858
1859 2008-09-28  Timothy Hatcher  <timothy@apple.com>
1860
1861         Remove the scrollIntoViewIfNeeded() call when drawing the
1862         Inspector node highlight.
1863
1864         <rdar://problem/6115804> Don't scroll when highlighting (21000)
1865         https://bugs.webkit.org/show_bug.cgi?id=21000
1866
1867         Reviewed by Dan Bernstein.
1868
1869         * page/InspectorController.cpp:
1870         (WebCore::InspectorController::drawNodeHighlight):
1871
1872 2008-09-28  David Hyatt  <hyatt@apple.com>
1873
1874         Fix crash when WebKit has no instantiated Scrollbars and the appearance prefs for scrollbars are
1875         changed.
1876
1877         Reviewed by Dan Bernstein
1878
1879         * platform/mac/ScrollbarThemeMac.mm:
1880         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
1881
1882 2008-09-28  Timothy Hatcher  <timothy@apple.com>
1883
1884         Clear the current search results in the Inspector when
1885         the search query is less than 3 characters long. Incremental
1886         searches only occur for 3 characters or longer, but deleting
1887         under this limit would not clear the results unless the whole
1888         query was deleted.
1889
1890         https://bugs.webkit.org/show_bug.cgi?id=21196
1891
1892         Reviewed by Dan Bernstein.
1893
1894         * page/inspector/inspector.js:
1895         (WebInspector.performSearch): Check for short queries in the
1896         if statement that triggers the clear.
1897
1898 2008-09-28  Dan Bernstein  <mitz@apple.com>
1899
1900         Reviewed by Dave Hyatt.
1901
1902         - fix <rdar://problem/6202962> "Tibetan Machine Uni" font does not work as a web font on Windows because TTLoadEmbeddedFont fails with E_NAMECHANGEFAILED
1903
1904         * platform/graphics/win/FontCustomPlatformData.cpp:
1905         (WebCore::EOTStream::EOTStream): Added overlayDst, overlaySrc and
1906         overlayLength parameters.
1907         (WebCore::EOTStream::read): Added code to overlay the
1908         m_overlayLength bytes starting at m_overlayDst with the same number of
1909         bytes from m_overlaySrc.
1910         (WebCore::createFontCustomPlatformData): Changed to get overlay
1911         parameters from getEOTHeader.
1912         * platform/graphics/win/GetEOTHeader.cpp:
1913         (WebCore::getEOTHeader): Added code to specify overlaying of the
1914         family name with the prefix of the full name if they differ, because
1915         that such a difference causes TTLoadEmbeddedFont to fail.
1916         * platform/graphics/win/GetEOTHeader.h:
1917
1918 2008-09-28  Alexey Proskuryakov  <ap@webkit.org>
1919
1920         Reviewed by Eric Seidel.
1921
1922         https://bugs.webkit.org/show_bug.cgi?id=20366
1923         Reproducible test failure for editing/undo/undo-iframe-location-change.html
1924
1925         * ChangeLog-2006-05-10: Added bug URLs for a fix that included this test.
1926
1927 2008-09-28  Darin Adler  <darin@apple.com>
1928
1929         Reviewed by Sam Weinig (except for a few comment and header tweaks).
1930
1931         - https://bugs.webkit.org/show_bug.cgi?id=21158
1932           reduce use of virtual functions in Node for speed
1933
1934         Speeds up Dromaeo a bit less than 1%.
1935
1936         * bindings/js/JSNamedNodesCollection.cpp: Include Element.h instead of
1937         Node.h now that some inlines are in there.
1938
1939         * dom/Attr.h: Override both the virtual and non-virtual name functions.
1940
1941         * dom/ChildNodeList.cpp:
1942         (WebCore::ChildNodeList::nodeMatches): Updated to take an Element.
1943         * dom/ChildNodeList.h: Ditto.
1944         * dom/ClassNodeList.cpp:
1945         (WebCore::ClassNodeList::nodeMatches): Ditto.
1946         * dom/ClassNodeList.h: Ditto.
1947
1948         * dom/Document.h: Put the Node::isDocumentNode() function's inline
1949         definition here where it can see the Document class definition.
1950
1951         * dom/DynamicNodeList.cpp:
1952         (WebCore::DynamicNodeList::length): Changed to pass an Element.
1953         (WebCore::DynamicNodeList::itemForwardsFromCurrent): Ditto.
1954         (WebCore::DynamicNodeList::itemBackwardsFromCurrent): Ditto.
1955         (WebCore::DynamicNodeList::itemWithName): Ditto.
1956         * dom/DynamicNodeList.h: Ditto.
1957
1958         * dom/Element.cpp: Removed virtualHasTagName.
1959         * dom/Element.h: Made localName, prefix, namespaceURI, and
1960         styleForRenderer non-virtual. Added virtualPrefix, virtualLocalName,
1961         virtualNamespaceURI, and removed virtualHasTagName. Put the
1962         Node::hasTagName, Node::hasAttributes, and Node::attributes
1963         functions' inline definitions here where they can see the Element
1964         class definition.
1965
1966         * dom/NameNodeList.cpp:
1967         (WebCore::NameNodeList::nodeMatches): Updated to take an Element.
1968         * dom/NameNodeList.h: Ditto.
1969
1970         * dom/Node.cpp:
1971         (WebCore::Node::virtualPrefix): Renamed from prefix.
1972         (WebCore::Node::virtualLocalName): Renamed from localName.
1973         (WebCore::Node::virtualNamespaceURI): Renamed from namespaceURI.
1974         (WebCore::Node::styleForRenderer): Handle the Element case here.
1975
1976         * dom/Node.h: Removed definition of hasTagName that calls virtual,
1977         since we now have a non-virtual version. Made hasAttributes,
1978         attributes, remove, localName, namespaceURI, prefix, isDocumentNode,
1979         and styleForRenderer non-virtual. Added virtualPrefix,
1980         virtualLocalName, and virtualNamespaceURI. Removed isMalformed
1981         and setMalformed, which are used only on HTMLFormElement objects.
1982
1983         * dom/TagNodeList.cpp:
1984         (WebCore::TagNodeList::nodeMatches): Updated to take an Element.
1985         * dom/TagNodeList.h: Ditto.
1986
1987         * html/HTMLAnchorElement.cpp: Added a comment.
1988         * html/HTMLFormControlElement.cpp: Ditto.
1989
1990         * html/HTMLAnchorElement.h: Removed unused, unimplemented setTabIndex
1991         function. Marked tabIndex function virtual explicitly for clarity.
1992
1993         * html/HTMLAreaElement.h: Removed unused, unimplemented setTabIndex
1994         function. Marked isFocusable function virtual explicitly for clarity.
1995
1996         * html/HTMLElement.h: Marked tabIndex function virtual explicitly for
1997         clarity.
1998         * html/HTMLFormControlElement.h: Ditto.
1999
2000         * html/HTMLFormElement.h: Made isMalformed non-virtual.
2001
2002         * html/HTMLParser.cpp:
2003         (WebCore::HTMLParser::handleError): Use the already-cast-to-HTMLElement
2004         pointer to call localName since that one does not need to call a virtual
2005         function.
2006
2007         * rendering/RenderBlock.cpp:
2008         (WebCore::RenderBlock::layoutBlock): Cast to HTMLFormElement before
2009         calling isMalformed. We already did a tag name check so we know it's
2010         an HTMLFormELement.
2011
2012         * xml/XPathUtil.cpp:
2013         (WebCore::XPath::isValidContextNode): Rewrote to not make so many calls
2014         to nodeType(), since it's a virtual function.
2015
2016 2008-09-28  David Hyatt  <hyatt@apple.com>
2017
2018         Make frameRectsChanged() cross-platform on ScrollView.
2019
2020         Reviewed by Oliver Hunt
2021
2022         * platform/ScrollView.cpp:
2023         (WebCore::ScrollView::frameRectsChanged):
2024         * platform/ScrollView.h:
2025         * platform/gtk/ScrollViewGtk.cpp:
2026         * platform/qt/ScrollViewQt.cpp:
2027         * platform/win/ScrollViewWin.cpp:
2028         * platform/wx/ScrollViewWx.cpp:
2029
2030 2008-09-28  Oliver Hunt  <oliver@apple.com>
2031
2032         Reviewed by Maciej Stachowiak.
2033
2034         Bug 21141: REGRESSION: Exception messages for user entered commands are poor
2035         <https://bugs.webkit.org/show_bug.cgi?id=21141>
2036
2037         The bug repsonsible for this was the the JSInspectedObjectWrapper instances
2038         were not initialising their StructureID's to indicate that the wrapper
2039         overrides hasInstance, etc.  The solution is simply to use the createStructureID
2040         helper on JSQuarantinedObjectWrapper to create a correct StructureID.
2041
2042         * bindings/js/JSInspectedObjectWrapper.cpp:
2043         (WebCore::JSInspectedObjectWrapper::wrap):
2044
2045 2008-09-28  David Hyatt  <hyatt@apple.com>
2046
2047         Make sure pixel wheel scrolls (formerly "continuous" wheel events) send deltas to DOM wheel events in
2048         terms of lines.
2049
2050         Reviewed by Oliver Hunt
2051
2052         * dom/EventTargetNode.cpp:
2053         (WebCore::EventTargetNode::dispatchWheelEvent):
2054
2055 2008-09-28  David Hyatt  <hyatt@apple.com>
2056
2057         https://bugs.webkit.org/show_bug.cgi?id=21191
2058
2059         Rework mouse wheeling significantly to make the platform event less messy and to enable wheelEvent
2060         on ScrollView to be cross-platform.
2061
2062         Give the wheel event a concept of granularity (pixel, line or page).  What used to be called continuous
2063         events are now pixel wheel events.
2064
2065         Page scrolling as implemented in bug 17589 was completely broken.  It had the following problems:
2066         (1) Page scrolling has been corrected to be properly detected (on Windows
2067         page wheeling is only done in the vertical direction and it is keyed off a special return value of -1).  The
2068         old code had some bizarre incorrect heuristic for "guessing" that you should page scroll and also thought
2069         you could page scroll horizontally.
2070         (2) Page scrolling a layer used the enclosing ScrollView's width/height instead of the layer's width/height.
2071         This caused the scroll amount for page scrolling to be way too large on layers.
2072
2073         Bug 17589 got the default horizontal scrolling value wrong.  It assumed 1, when the Vista default is 3.
2074
2075         Incorporate WebCore's line multiplier right into the deltas of the event.  This eliminates the need
2076         for separate multiplier fields (or for the need to ask if you're looking for line sensitivity).
2077
2078         Reviewed by Oliver Hunt
2079
2080         * editing/EditorCommand.cpp:
2081         (WebCore::verticalScrollDistance):
2082         * page/EventHandler.cpp:
2083         (WebCore::scrollAndAcceptEvent):
2084         (WebCore::EventHandler::handleWheelEvent):
2085         * platform/PlatformWheelEvent.h:
2086         (WebCore::):
2087         (WebCore::PlatformWheelEvent::pos):
2088         (WebCore::PlatformWheelEvent::globalPos):
2089         (WebCore::PlatformWheelEvent::deltaX):
2090         (WebCore::PlatformWheelEvent::deltaY):
2091         (WebCore::PlatformWheelEvent::granularity):
2092         (WebCore::PlatformWheelEvent::x):
2093         (WebCore::PlatformWheelEvent::globalX):
2094         (WebCore::PlatformWheelEvent::ignore):
2095         (WebCore::PlatformWheelEvent::horizontalLineMultiplier):
2096         (WebCore::PlatformWheelEvent::verticalLineMultiplier):
2097         * platform/ScrollView.cpp:
2098         (WebCore::ScrollView::wheelEvent):
2099         * platform/Scrollbar.h:
2100         * platform/gtk/ScrollViewGtk.cpp:
2101         (WebCore::ScrollView::updateScrollbars):
2102         * platform/gtk/WheelEventGtk.cpp:
2103         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2104         * platform/mac/ScrollViewMac.mm:
2105         * platform/mac/WheelEventMac.mm:
2106         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2107         * platform/qt/ScrollViewQt.cpp:
2108         (WebCore::ScrollView::updateScrollbars):
2109         * platform/qt/WheelEventQt.cpp:
2110         * platform/win/ScrollViewWin.cpp:
2111         (WebCore::ScrollView::updateScrollbars):
2112         * platform/win/WheelEventWin.cpp:
2113         (WebCore::PlatformWheelEvent::horizontalLineMultiplier):
2114         (WebCore::PlatformWheelEvent::verticalLineMultiplier):
2115         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2116         * platform/wx/ScrollViewWx.cpp:
2117         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
2118         (WebCore::ScrollView::wheelEvent):
2119         * rendering/RenderLayer.cpp:
2120         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2121
2122 2008-09-27  Eric Carlson  <eric.carlson@apple.com>
2123
2124         Reviewed by Sam Weinig.
2125
2126         fix https://bugs.webkit.org/show_bug.cgi?id=20994
2127         <rdar://problem/6171023> HTMLVideoElement width and height attributes are now unsigned
2128         
2129         HTML5 spec says HTMLVideoElement width and height attributes should be unsigned. Convert
2130         all unsigned media attributes from string with toUInt() instead of toInt().
2131         
2132         * html/HTMLMediaElement.cpp:
2133         (WebCore::HTMLMediaElement::playCount): convert from attribute with toUInt().
2134
2135         * html/HTMLVideoElement.cpp:
2136         (WebCore::HTMLVideoElement::videoWidth):
2137         (WebCore::HTMLVideoElement::videoHeight): return unsigned to match idl.
2138         (WebCore::HTMLVideoElement::width): convert from attribute with toUInt() and return
2139           unsigned value.
2140         (WebCore::HTMLVideoElement::height): Ditto.
2141         (WebCore::HTMLVideoElement::setWidth): take unsigned value.
2142         (WebCore::HTMLVideoElement::setHeight): Ditto.
2143
2144         * html/HTMLVideoElement.h: width, height, videoWidth, and videoHeight are unsigned.
2145
2146         * html/HTMLVideoElement.idl: make width and height unsigned to match HTML5 spec.
2147
2148 2008-09-27  Timothy Hatcher  <timothy@apple.com>
2149
2150         Fixes an exception when typing a command in the Console.
2151
2152         Reviewed by Oliver Hunt.
2153
2154         * page/inspector/Console.js:
2155         (WebInspector.Console.prototype.addMessage): Null check
2156         this.previosMessage.
2157
2158 2008-09-27  Timothy Hatcher  <timothy@apple.com>
2159
2160         Fixes a bug where the Profiles panel sidebar would be empty
2161         after closing and reopening the Web Inspector.
2162
2163         https://bugs.webkit.org/show_bug.cgi?id=21179
2164
2165         Reviewed by Sam Weinig.
2166
2167         * page/inspector/ProfilesPanel.js:
2168         (WebInspector.ProfilesPanel.prototype.reset): Don't call
2169         populateInterface, it is called automatically.
2170         (WebInspector.ProfilesPanel.prototype._populateProfiles):
2171         Return early if the sidebar is already populated.
2172
2173 2008-09-27  Dave Hyatt  <hyatt@apple.com>
2174
2175         Bug 21190.  The line scroll amount on Windows is way too small.  A patch for bug 17589 for wheel sensitivity
2176         incorrectly applied the tinier wheel step delta (unmultiplied) to line scrolling.  Line scrolling with the
2177         scrollbar has nothing to do with mouse wheeling.  This patch reverts the scrollbars to use the same line
2178         step as other platforms while leaving the wheel delta alone for use with wheel scrolling.
2179
2180         There was a lot wrong with 17589, so more patches will be coming to deal with the fallout of this patch
2181         (which should never have landed in the first place).
2182        
2183         Reviewed by Tim Hatcher, Sam Weinig
2184
2185         * platform/win/ScrollViewWin.cpp:
2186         (WebCore::adjustDeltaForPageScrollMode):
2187         (WebCore::ScrollView::updateScrollbars):
2188         (WebCore::ScrollView::wheelEvent):
2189
2190 2008-09-27  David Hyatt  <hyatt@apple.com>
2191
2192         Make the scrollbarUnderMouse method cross-platform.
2193
2194         Reviewed by Sam Weinig
2195
2196         * platform/ScrollView.cpp:
2197         (WebCore::ScrollView::scrollbarUnderMouse):
2198         * platform/gtk/ScrollViewGtk.cpp:
2199         * platform/mac/ScrollViewMac.mm:
2200         * platform/qt/ScrollViewQt.cpp:
2201         * platform/win/ScrollViewWin.cpp:
2202         * platform/wx/ScrollViewWx.cpp:
2203
2204 2008-09-27  Holger Hans Peter Freyther  <zecke@selfish.org>
2205
2206         Gtk+ build fix.
2207
2208         * platform/gtk/ScrollViewGtk.cpp:
2209         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2210
2211 2008-09-27  Jan Michael Alonzo  <jmalonzo@webkit.org>
2212
2213         Reviewed by Holger Freyther.
2214
2215         https://bugs.webkit.org/show_bug.cgi?id=20287
2216         [Gtk] disable plugins for gtk/directfb target
2217
2218         Introduce WTF_PLATFORM_X11 for X11 builds.
2219         Also use target-specific packages when building the port
2220
2221         * platform/gtk/PlatformScreenGtk.cpp:
2222         * plugins/gtk/PluginViewGtk.cpp:
2223         (WebCore::PluginView::updatePluginWidget):
2224         (WebCore::PluginView::getValueStatic):
2225         (WebCore::PluginView::getValue):
2226         (WebCore::PluginView::init):
2227
2228 2008-09-27  David Hyatt  <hyatt@apple.com>
2229
2230         https://bugs.webkit.org/show_bug.cgi?id=21188
2231
2232         Make scrollbar suppression and resizer avoidance cross-platform.
2233
2234         Reviewed by Anders
2235
2236         * loader/FrameLoader.cpp:
2237         (WebCore::FrameLoader::transitionToCommitted):
2238         * page/FrameView.cpp:
2239         (WebCore::FrameView::resetScrollbars):
2240         (WebCore::FrameView::clear):
2241         (WebCore::FrameView::layout):
2242         (WebCore::FrameView::restoreScrollbar):
2243         (WebCore::FrameView::windowResizerRect):
2244         * page/FrameView.h:
2245         * platform/ScrollView.cpp:
2246         (WebCore::ScrollView::init):
2247         (WebCore::ScrollView::resizerOverlapsContent):
2248         (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount):
2249         (WebCore::ScrollView::setParent):
2250         (WebCore::ScrollView::setScrollbarsSuppressed):
2251         (WebCore::ScrollView::platformSetScrollbarsSuppressed):
2252         * platform/ScrollView.h:
2253         (WebCore::ScrollView::scrollbarsSuppressed):
2254         (WebCore::ScrollView::windowResizerRect):
2255         * platform/Scrollbar.cpp:
2256         (WebCore::Scrollbar::setFrameRect):
2257         (WebCore::Scrollbar::setParent):
2258         * platform/gtk/ScrollViewGtk.cpp:
2259         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2260         (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
2261         (WebCore::ScrollView::updateScrollbars):
2262         (WebCore::ScrollView::paint):
2263         * platform/mac/ScrollViewMac.mm:
2264         (WebCore::ScrollView::ScrollView):
2265         (WebCore::ScrollView::~ScrollView):
2266         (WebCore::ScrollView::platformSetScrollbarsSuppressed):
2267         (WebCore::ScrollView::setScrollPosition):
2268         * platform/qt/ScrollViewQt.cpp:
2269         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2270         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2271         (WebCore::ScrollView::frameRectsChanged):
2272         (WebCore::ScrollView::updateScrollbars):
2273         (WebCore::ScrollView::paint):
2274         * platform/win/ScrollViewWin.cpp:
2275         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2276         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2277         (WebCore::ScrollView::updateScrollbars):
2278         (WebCore::ScrollView::paint):
2279         * platform/wx/ScrollViewWx.cpp:
2280         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2281
2282 2008-09-27  Holger Hans Peter Freyther  <zecke@selfish.org>
2283
2284         Rubber-stamped by Anders Carlsson.
2285
2286         Compile fix.
2287
2288         * plugins/PluginView.cpp:
2289         (WebCore::PluginView::load):
2290
2291 2008-09-27  Mark Rowe  <mrowe@apple.com>
2292
2293         Rubber-stamped by Sam Weinig.
2294
2295         Fix <https://bugs.webkit.org/show_bug.cgi?id=21184>.
2296         Bug 21184: REGRESSION: Reproducible crash below StringImpl::hash while running editing/deleting/5408255.html
2297
2298         Remove an assertion that was incorrect and that if made correct would have duplicated a check that occurred earlier in the function.
2299
2300         * loader/CachedResource.cpp:
2301         (WebCore::CachedResource::~CachedResource):
2302
2303 2008-09-27  Holger Hans Peter Freyther  <zecke@selfish.org>
2304
2305         Reviewed by Simon Hausmann.
2306
2307         [qt] Use QImageReader to figure out which image formats are supported
2308         - Qt can have many different plugins for different image formats. Instead
2309         of checking only for a few in WebCore use Qt to determine if this data
2310         can be treated as an image.
2311
2312         * platform/graphics/qt/ImageSourceQt.cpp:
2313         (WebCore::canHandleImage):
2314         (WebCore::createDecoder):
2315
2316 2008-09-27  Holger Hans Peter Freyther  <zecke@selfish.org>
2317
2318
2319         [qt] Clean the pattern code
2320         - Use save/restore on the painter after manipulating the
2321         pen/brush
2322         - Make the context and object null checking consistent. CG is using
2323         the object unconditionally so the Qt webkit platform can do the
2324         same.
2325         - Move code below the early exit. Only use the m_ownerElement before
2326         the early exit as the CG code is doing it.
2327
2328         * svg/graphics/SVGPaintServerPattern.h:
2329         * svg/graphics/qt/SVGPaintServerPatternQt.cpp:
2330         (WebCore::SVGPaintServerPattern::setup):
2331         (WebCore::SVGPaintServerPattern::teardown):
2332
2333 2008-09-27  Keishi Hattori  <casey.hattori@gmail.com>
2334
2335         Added support for console.trace.
2336
2337         https://bugs.webkit.org/show_bug.cgi?id=19157
2338
2339         Reviewed by Kevin McCullough and Tim Hatcher.
2340
2341         * bindings/js/JSConsoleCustom.cpp:
2342         (WebCore::JSConsole::trace):
2343         * page/Console.cpp:
2344         (WebCore::Console::trace): Calls Machine::retrieveCaller to
2345         get a stack trace.
2346         * page/Console.h:
2347         (WebCore::): Added TraceMessageLevel.
2348         * page/Console.idl: Added console.trace.
2349         * page/inspector/Console.js:
2350         (ConsoleMessage): Added case for TraceMessageLevel.
2351
2352 2008-09-27  Anders Carlsson  <andersca@apple.com>
2353
2354         Reviewed by Sam Weinig.
2355
2356         https://bugs.webkit.org/show_bug.cgi?id=21178
2357         <rdar://problem/6248651>
2358
2359         Check if the plug-in is allowed to load the resource. This matches Firefox.
2360
2361         Test: http/tests/plugins/local-geturl-from-remote.html
2362
2363         * plugins/PluginView.cpp:
2364         (WebCore::PluginView::load):
2365
2366 2008-09-22  Dirk Schulze  <vbs85@gmx.de>
2367
2368         Reviewed by Eric Seidel.
2369
2370         Added SVG pattern support to Qt.
2371
2372         [Qt] SVG patterns are missing
2373         https://bugs.webkit.org/show_bug.cgi?id=20973
2374
2375         * svg/graphics/qt/SVGPaintServerPatternQt.cpp:
2376         (WebCore::SVGPaintServerPattern::setup):
2377
2378 2008-09-27  Keishi Hattori  <casey.hattori@gmail.com>
2379
2380         Fixed a bug in the JS syntax highlighter with multiple line tokens.
2381
2382         https://bugs.webkit.org/show_bug.cgi?id=21171
2383
2384         Reviewed by Tim Hatcher.
2385
2386         * page/inspector/SourceFrame.js:
2387         (syntaxHighlightJavascriptLine): Initialize previousMatchLength.
2388
2389 2008-09-27  Timothy Hatcher  <timothy@apple.com>
2390
2391         Change searching in the Profiles panel to not match the
2392         Self and Total columns when there are no units. The only
2393         column that is matched for unitless number searches is
2394         now the Calls column.
2395
2396         https://bugs.webkit.org/show_bug.cgi?id=21169
2397
2398         Reviewed by Sam Weinig.
2399
2400         * page/inspector/ProfileView.js:
2401         (WebInspector.ProfileView.prototype.performSearch):
2402
2403 2008-09-27  David Hyatt  <hyatt@apple.com>
2404
2405         Rename boundsGeometry -> boundsRect.  Rename geometryChanged -> frameRectsChanged.
2406
2407         Reviewed by Sam Weinig
2408
2409         * platform/ScrollView.h:
2410         * platform/Widget.h:
2411         (WebCore::Widget::boundsRect):
2412         (WebCore::Widget::invalidate):
2413         (WebCore::Widget::frameRectsChanged):
2414         * platform/gtk/ScrollViewGtk.cpp:
2415         (WebCore::ScrollViewScrollbar::frameRectsChanged):
2416         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
2417         (WebCore::ScrollView::setFrameRect):
2418         (WebCore::ScrollView::updateScrollbars):
2419         (WebCore::ScrollView::frameRectsChanged):
2420         * platform/gtk/ScrollbarGtk.cpp:
2421         (ScrollbarGtk::setFrameRect):
2422         (ScrollbarGtk::frameRectsChanged):
2423         * platform/gtk/ScrollbarGtk.h:
2424         * platform/gtk/WidgetGtk.cpp:
2425         * platform/qt/ScrollViewQt.cpp:
2426         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
2427         (WebCore::ScrollView::setFrameRect):
2428         (WebCore::ScrollView::frameRectsChanged):
2429         (WebCore::ScrollView::updateScrollbars):
2430         * platform/win/ScrollViewWin.cpp:
2431         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
2432         (WebCore::ScrollView::setFrameRect):
2433         (WebCore::ScrollView::updateScrollbars):
2434         (WebCore::ScrollView::frameRectsChanged):
2435         * plugins/PluginView.cpp:
2436         (WebCore::PluginView::frameRectsChanged):
2437         * plugins/PluginView.h:
2438
2439 2008-09-27  Simon Hausmann  <hausmann@webkit.org>
2440
2441         Refix the previous build fix to compile on non-Qt platforms, too.
2442
2443         * WebCore.pro: Don't pass -i to create_hashtable, added missing -n
2444         WebCore to generate the PrototypeTable in the WebCore namespace
2445         * bindings/js/JSEventTargetBase.h: Revert previous fix, the Prototype
2446         table remains in the Webcore namespace
2447         (WebCore::JSEventTargetBasePrototype::getOwnPropertySlot):
2448
2449 2008-09-27  Simon Hausmann  <hausmann@webkit.org>
2450
2451         Fix compilation with gcc 4.3 (probably > 4.0)
2452
2453         * bindings/js/JSDOMWindowBase.cpp: Don't define static property
2454         get/put functions inside the WebCore namespace.
2455         * bindings/js/JSEventTargetBase.cpp: Ditto.
2456         * bindings/js/JSEventTargetNode.cpp: Ditto.
2457         * bindings/js/JSEventTargetSVGElementInstance.cpp: Ditto.
2458         * bindings/js/JSEventTargetBase.h: Forward declare
2459         JSEventTargetPrototypeTable in the JSC namespace as the lut.h file
2460         defines it in the JSC namespace.
2461         (WebCore::JSEventTargetBasePrototype::getOwnPropertySlot): Add JSC::
2462         prefix for PrototypeTable symbol.
2463
2464 2008-09-27  David Hyatt  <hyatt@apple.com>
2465
2466         Rename frameGeometry to frameRect.  Rename setFrameGeometry to setFrameRect.
2467
2468         Reviewed by Dan Bernstein
2469
2470         * WebCore.base.exp:
2471         * page/FrameView.cpp:
2472         (WebCore::FrameView::FrameView):
2473         (WebCore::FrameView::updateControlTints):
2474         * platform/ScrollView.h:
2475         * platform/Scrollbar.cpp:
2476         (WebCore::Scrollbar::Scrollbar):
2477         (WebCore::Scrollbar::paint):
2478         (WebCore::Scrollbar::setFrameRect):
2479         * platform/Scrollbar.h:
2480         * platform/ScrollbarThemeComposite.cpp:
2481         (WebCore::ScrollbarThemeComposite::paint):
2482         * platform/Widget.h:
2483         (WebCore::Widget::x):
2484         (WebCore::Widget::y):
2485         (WebCore::Widget::width):
2486         (WebCore::Widget::height):
2487         (WebCore::Widget::size):
2488         (WebCore::Widget::pos):
2489         (WebCore::Widget::resize):
2490         (WebCore::Widget::move):
2491         * platform/gtk/ScrollViewGtk.cpp:
2492         (WebCore::ScrollViewScrollbar::geometryChanged):
2493         (WebCore::ScrollView::update):
2494         (WebCore::ScrollView::setFrameRect):
2495         (WebCore::ScrollView::updateScrollbars):
2496         (WebCore::ScrollView::scrollbarUnderMouse):
2497         (WebCore::ScrollView::paint):
2498         * platform/gtk/ScrollbarGtk.cpp:
2499         (ScrollbarGtk::setFrameRect):
2500         (ScrollbarGtk::geometryChanged):
2501         * platform/gtk/ScrollbarGtk.h:
2502         * platform/gtk/WidgetGtk.cpp:
2503         (WebCore::Widget::frameRect):
2504         (WebCore::Widget::setFrameRect):
2505         * platform/mac/ScrollbarThemeMac.mm:
2506         (WebCore::ScrollbarThemeMac::trackRect):
2507         (WebCore::ScrollbarThemeMac::paint):
2508         * platform/mac/WidgetMac.mm:
2509         (WebCore::Widget::frameRect):
2510         (WebCore::Widget::setFrameRect):
2511         * platform/qt/ScrollViewQt.cpp:
2512         (WebCore::ScrollView::setFrameRect):
2513         (WebCore::ScrollView::updateScrollbars):
2514         (WebCore::ScrollView::scrollbarUnderMouse):
2515         (WebCore::ScrollView::paint):
2516         * platform/qt/ScrollbarThemeQt.cpp:
2517         (WebCore::styleOptionSlider):
2518         * platform/qt/WidgetQt.cpp:
2519         (WebCore::Widget::frameRect):
2520         (WebCore::Widget::setFrameRect):
2521         * platform/win/PopupMenuWin.cpp:
2522         (WebCore::PopupMenu::invalidateItem):
2523         (WebCore::PopupMenu::valueChanged):
2524         (WebCore::PopupWndProc):
2525         * platform/win/ScrollViewWin.cpp:
2526         (WebCore::ScrollView::setFrameRect):
2527         (WebCore::ScrollView::updateScrollbars):
2528         (WebCore::ScrollView::scrollbarUnderMouse):
2529         (WebCore::ScrollView::paint):
2530         * platform/win/ScrollbarThemeSafari.cpp:
2531         (WebCore::ScrollbarThemeSafari::trackRect):
2532         * platform/win/WidgetWin.cpp:
2533         (WebCore::Widget::frameRect):
2534         (WebCore::Widget::setFrameRect):
2535         * platform/wx/WidgetWx.cpp:
2536         (WebCore::Widget::frameRect):
2537         (WebCore::Widget::setFrameRect):
2538         * plugins/PluginView.cpp:
2539         (WebCore::PluginView::setFrameRect):
2540         * plugins/PluginView.h:
2541         * plugins/gtk/PluginViewGtk.cpp:
2542         (WebCore::PluginView::updatePluginWidget):
2543         (WebCore::PluginView::paint):
2544         (WebCore::PluginView::init):
2545         * plugins/qt/PluginViewQt.cpp:
2546         (WebCore::PluginView::updatePluginWidget):
2547         (WebCore::PluginView::init):
2548         * plugins/win/PluginViewWin.cpp:
2549         (WebCore::PluginView::updatePluginWidget):
2550         (WebCore::PluginView::paintMissingPluginIcon):
2551         (WebCore::PluginView::paint):
2552         (WebCore::PluginView::init):
2553         * rendering/RenderLayer.cpp:
2554         (WebCore::RenderLayer::positionOverflowControls):
2555         * rendering/RenderListBox.cpp:
2556         (WebCore::RenderListBox::paintScrollbar):
2557         * rendering/RenderPart.cpp:
2558         (WebCore::RenderPart::updateWidgetPosition):
2559         * rendering/RenderWidget.cpp:
2560         (WebCore::RenderWidget::setWidgetGeometry):
2561         (WebCore::RenderWidget::updateWidgetPosition):
2562
2563 2008-09-27  David Hyatt  <hyatt@apple.com>
2564
2565         <rdar://problem/6252041> REGRESSION (4dp-TOT): Crash in Widget::platformWidget() when closing a PDF
2566
2567         This crash was lurking for a while and basically got exposed by my changes to visibleContentRect() to
2568         access an actual member variable.
2569
2570         Reviewed by Dan Bernstein
2571
2572         * page/FocusController.cpp:
2573         (WebCore::FocusController::setFocusedFrame):
2574
2575 2008-09-27  Jan Michael Alonzo  <jmalonzo@webkit.org>
2576
2577         Attempt to fix QT Build. Not reviewed.
2578
2579         * WebCore.pro: add -n WebCore parameter to create_hash_table
2580
2581 2008-09-26  Gwenole Beauchesne  <gbeauchesne@splitted-desktop.org>
2582
2583         Reviewed by Eric Seidel.
2584
2585         http://bugs.webkit.org/show_bug.cgi?id=18905
2586         [GTK] Fix build with older pango (1.14.8)
2587
2588         * platform/graphics/gtk/FontGtk.cpp:
2589         * platform/gtk/Language.cpp:
2590         (_pango_get_lc_ctype):
2591         (pango_language_get_default):
2592
2593 2008-09-26  David Hyatt  <hyatt@apple.com>
2594
2595         https://bugs.webkit.org/show_bug.cgi?id=21168
2596
2597         Make contentsToWindow/windowToContents cross-platform.
2598
2599         Reviewed by Oliver Hunt
2600
2601         * platform/ScrollView.cpp:
2602         (WebCore::ScrollView::windowToContents):
2603         (WebCore::ScrollView::contentsToWindow):
2604         * platform/ScrollView.h:
2605         * platform/gtk/ScrollViewGtk.cpp:
2606         * platform/mac/ScrollViewMac.mm:
2607         * platform/qt/ScrollViewQt.cpp:
2608         * platform/win/ScrollViewWin.cpp:
2609         * platform/wx/ScrollViewWx.cpp:
2610
2611 2008-09-26  Sam Weinig  <sam@webkit.org>
2612
2613         GTK build fix.
2614
2615         * GNUmakefile.am:
2616
2617 2008-09-26  David Hyatt  <hyatt@apple.com>
2618
2619         Eliminate shouldUpdateWhileOffscreen from ScrollView.  Make the concept of not invalidating while
2620         offscreen cross-platform.  Rename the inWindow method to isOffscreen (which flips the boolean), since that
2621         more clearly conveys the intent of the method.  Make isOffscreen also check NSWindow visibility on Mac.
2622
2623         Reviewed by Oliver Hunt
2624
2625         * page/FrameView.cpp:
2626         (WebCore::FrameView::repaintContentRectangle):
2627         * page/FrameView.h:
2628         * platform/ScrollView.h:
2629         * platform/gtk/ScrollViewGtk.cpp:
2630         (WebCore::ScrollView::isOffscreen):
2631         * platform/mac/ScrollViewMac.mm:
2632         (WebCore::ScrollView::updateContents):
2633         (WebCore::ScrollView::isOffscreen):
2634         * platform/qt/ScrollViewQt.cpp:
2635         (WebCore::ScrollView::isOffscreen):
2636         * platform/win/ScrollViewWin.cpp:
2637         (WebCore::ScrollView::isOffscreen):
2638         * platform/wx/ScrollViewWx.cpp:
2639         (WebCore::ScrollView::isOffscreen):
2640         * rendering/RenderObject.cpp:
2641         (WebCore::RenderObject::willRenderImage):
2642
2643 2008-09-26  David Hyatt  <hyatt@apple.com>
2644
2645         https://bugs.webkit.org/show_bug.cgi?id=21164
2646
2647         Rework concept of allowsScrolling/setAllowsScrolling to be cross-platform.
2648
2649         Reviewed by Sam Weinig
2650
2651         * WebCore.base.exp:
2652         * page/FrameView.cpp:
2653         (WebCore::FrameView::setAllowsScrolling):
2654         * page/FrameView.h:
2655         * platform/ScrollView.cpp:
2656         (WebCore::ScrollView::setAllowsScrolling):
2657         * platform/ScrollView.h:
2658         (WebCore::ScrollView::allowsScrolling):
2659         * platform/win/ScrollViewWin.cpp:
2660         (WebCore::ScrollView::wheelEvent):
2661
2662 2008-09-26  Kevin Ollivier  <kevino@theolliviers.com>
2663
2664         wx build fixes after Widget/ScrollView changes.
2665
2666         * platform/wx/PopupMenuWx.cpp:
2667         (WebCore::PopupMenu::show):
2668         * platform/wx/ScrollViewWx.cpp:
2669         (WebCore::ScrollView::platformSetContentsSize):
2670         (WebCore::ScrollView::platformSetScrollbarModes):
2671         (WebCore::ScrollView::wheelEvent):
2672         * platform/wx/TemporaryLinkStubs.cpp:
2673         * platform/wx/WidgetWx.cpp:
2674         (WebCore::Widget::containingWindow):
2675
2676 2008-09-26  Timothy Hatcher  <timothy@apple.com>
2677
2678         Allow searching for paths by always performing the
2679         three search methods in the Elements panel and not
2680         assume a search with a "/" is a XPath query.
2681
2682         https://bugs.webkit.org/show_bug.cgi?id=21159
2683
2684         Reviewed by Geoff Garen.
2685
2686         * page/inspector/ElementsPanel.js:
2687         (WebInspector.ElementsPanel.prototype.performSearch):
2688
2689 2008-09-26  Sam Weinig  <sam@webkit.org>
2690
2691         Reviewed by Darin Adler.
2692
2693         Patch for https://bugs.webkit.org/show_bug.cgi?id=21152
2694         Speedup static property get/put
2695
2696         * DerivedSources.make:
2697         * GNUmakefile.am:
2698         * WebCore.pro:
2699         * WebCore.vcproj/WebCore.vcproj:
2700         * WebCore.xcodeproj/project.pbxproj:
2701         * bindings/js/JSDOMBinding.cpp:
2702         * bindings/js/JSDOMBinding.h:
2703         * bindings/js/JSDOMWindowBase.cpp:
2704         (WebCore::getDOMConstructor):
2705         (WebCore::jsDOMWindowBaseCrypto):
2706         (WebCore::jsDOMWindowBaseEvent):
2707         (WebCore::jsDOMWindowBaseImage):
2708         (WebCore::jsDOMWindowBaseMessageChannel):
2709         (WebCore::jsDOMWindowBaseOption):
2710         (WebCore::jsDOMWindowBaseXMLHttpRequest):
2711         (WebCore::jsDOMWindowBaseAudio):
2712         (WebCore::jsDOMWindowBaseXSLTProcessor):
2713         (WebCore::jsDOMWindowBaseOnabort):
2714         (WebCore::jsDOMWindowBaseOnblur):
2715         (WebCore::jsDOMWindowBaseOnchange):
2716         (WebCore::jsDOMWindowBaseOnclick):
2717         (WebCore::jsDOMWindowBaseOndblclick):
2718         (WebCore::jsDOMWindowBaseOnerror):
2719         (WebCore::jsDOMWindowBaseOnfocus):
2720         (WebCore::jsDOMWindowBaseOnkeydown):
2721         (WebCore::jsDOMWindowBaseOnkeypress):
2722         (WebCore::jsDOMWindowBaseOnkeyup):
2723         (WebCore::jsDOMWindowBaseOnload):
2724         (WebCore::jsDOMWindowBaseOnmousedown):
2725         (WebCore::jsDOMWindowBaseOnmousemove):
2726         (WebCore::jsDOMWindowBaseOnmouseout):
2727         (WebCore::jsDOMWindowBaseOnmouseover):
2728         (WebCore::jsDOMWindowBaseOnmouseup):
2729         (WebCore::jsDOMWindowBaseOnMouseWheel):
2730         (WebCore::jsDOMWindowBaseOnreset):
2731         (WebCore::jsDOMWindowBaseOnresize):
2732         (WebCore::jsDOMWindowBaseOnscroll):
2733         (WebCore::jsDOMWindowBaseOnsearch):
2734         (WebCore::jsDOMWindowBaseOnselect):
2735         (WebCore::jsDOMWindowBaseOnsubmit):
2736         (WebCore::jsDOMWindowBaseOnbeforeunload):
2737         (WebCore::jsDOMWindowBaseOnunload):
2738         (WebCore::jsDOMWindowBaseOnWebKitAnimationStart):
2739         (WebCore::jsDOMWindowBaseOnWebKitAnimationIteration):
2740         (WebCore::jsDOMWindowBaseOnWebKitAnimationEnd):
2741         (WebCore::jsDOMWindowBaseOnWebKitTransitionEnd):
2742         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
2743         (WebCore::JSDOMWindowBase::put):
2744         (WebCore::setJSDOMWindowBaseOnabort):
2745         (WebCore::setJSDOMWindowBaseOnblur):
2746         (WebCore::setJSDOMWindowBaseOnchange):
2747         (WebCore::setJSDOMWindowBaseOnclick):
2748         (WebCore::setJSDOMWindowBaseOndblclick):
2749         (WebCore::setJSDOMWindowBaseOnerror):
2750         (WebCore::setJSDOMWindowBaseOnfocus):
2751         (WebCore::setJSDOMWindowBaseOnkeydown):
2752         (WebCore::setJSDOMWindowBaseOnkeypress):
2753         (WebCore::setJSDOMWindowBaseOnkeyup):
2754         (WebCore::setJSDOMWindowBaseOnload):
2755         (WebCore::setJSDOMWindowBaseOnmousedown):
2756         (WebCore::setJSDOMWindowBaseOnmousemove):
2757         (WebCore::setJSDOMWindowBaseOnmouseout):
2758         (WebCore::setJSDOMWindowBaseOnmouseover):
2759         (WebCore::setJSDOMWindowBaseOnmouseup):
2760         (WebCore::setJSDOMWindowBaseOnMouseWheel):
2761         (WebCore::setJSDOMWindowBaseOnreset):
2762         (WebCore::setJSDOMWindowBaseOnresize):
2763         (WebCore::setJSDOMWindowBaseOnscroll):
2764         (WebCore::setJSDOMWindowBaseOnsearch):
2765         (WebCore::setJSDOMWindowBaseOnselect):
2766         (WebCore::setJSDOMWindowBaseOnsubmit):
2767         (WebCore::setJSDOMWindowBaseOnbeforeunload):
2768         (WebCore::setJSDOMWindowBaseOnunload):
2769         (WebCore::setJSDOMWindowBaseOnWebKitAnimationStart):
2770         (WebCore::setJSDOMWindowBaseOnWebKitAnimationIteration):
2771         (WebCore::setJSDOMWindowBaseOnWebKitAnimationEnd):
2772         (WebCore::setJSDOMWindowBaseOnWebKitTransitionEnd):
2773         (WebCore::setJSDOMWindowBaseEvent):
2774         (WebCore::setJSDOMWindowBaseAudio):
2775         (WebCore::setJSDOMWindowBaseImage):
2776         (WebCore::setJSDOMWindowBaseMessageChannel):
2777         (WebCore::setJSDOMWindowBaseOption):
2778         (WebCore::setJSDOMWindowBaseXMLHttpRequest):
2779         (WebCore::setJSDOMWindowBaseXSLTProcessor):
2780         * bindings/js/JSDOMWindowBase.h:
2781         * bindings/js/JSDOMWindowCustom.cpp:
2782         (WebCore::nonCachingStaticCloseFunctionGetter):
2783         (WebCore::nonCachingStaticBlurFunctionGetter):
2784         (WebCore::nonCachingStaticFocusFunctionGetter):
2785         (WebCore::nonCachingStaticPostMessageFunctionGetter):
2786         * bindings/js/JSDOMWindowCustom.h:
2787         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2788         * bindings/js/JSEventTargetBase.cpp:
2789         * bindings/js/JSEventTargetBase.h:
2790         (WebCore::JSEventTargetBasePrototype::getOwnPropertySlot):
2791         (WebCore::JSEventTargetBasePrototype::classInfo):
2792         * bindings/js/JSEventTargetNode.cpp:
2793         (WebCore::):
2794         (WebCore::JSEventTargetNode::getOwnPropertySlot):
2795         (WebCore::JSEventTargetNode::put):
2796         * bindings/js/JSEventTargetNode.h:
2797         (WebCore::JSEventTargetNode::classInfo):
2798         (WebCore::JSEventTargetNode::prototypeClassName):
2799         * bindings/js/JSEventTargetSVGElementInstance.cpp:
2800         (WebCore::):
2801         (WebCore::JSEventTargetSVGElementInstance::getOwnPropertySlot):
2802         (WebCore::JSEventTargetSVGElementInstance::put):
2803         * bindings/js/JSEventTargetSVGElementInstance.h:
2804         (WebCore::JSEventTargetSVGElementInstance::classInfo):
2805         (WebCore::JSEventTargetSVGElementInstance::prototypeClassName):
2806         * bindings/js/JSHTMLInputElementCustom.cpp:
2807         (WebCore::JSHTMLInputElement::customGetOwnPropertySlot):
2808         * bindings/js/JSHistoryCustom.cpp:
2809         (WebCore::nonCachingStaticBackFunctionGetter):
2810         (WebCore::nonCachingStaticForwardFunctionGetter):
2811         (WebCore::nonCachingStaticGoFunctionGetter):
2812         (WebCore::JSHistory::customGetOwnPropertySlot):
2813         * bindings/js/JSLocationCustom.cpp:
2814         (WebCore::nonCachingStaticReplaceFunctionGetter):
2815         (WebCore::nonCachingStaticReloadFunctionGetter):
2816         (WebCore::nonCachingStaticAssignFunctionGetter):
2817         (WebCore::JSLocation::customGetOwnPropertySlot):
2818         (WebCore::JSLocation::customPut):
2819         * bindings/scripts/CodeGeneratorJS.pm:
2820
2821 2008-09-26  David Hyatt  <hyatt@apple.com>
2822
2823         https://bugs.webkit.org/show_bug.cgi?id=21149
2824
2825         Make the concept of scroll modes cross-platform.  Move the scrollbars up into ScrollView as well.
2826         Eliminate the unused isScrollable() method.
2827
2828         Reviewed by Sam Weinig
2829
2830         * WebCore.base.exp:
2831         * page/FrameView.cpp:
2832         (WebCore::FrameView::resetScrollbars):
2833         (WebCore::FrameView::initScrollbars):
2834         (WebCore::FrameView::layout):
2835         * page/FrameView.h:
2836         * page/mac/WebCoreFrameView.h:
2837         * platform/ScrollView.cpp:
2838         (WebCore::ScrollView::init):
2839         (WebCore::ScrollView::setScrollbarModes):
2840         (WebCore::ScrollView::scrollbarModes):
2841         (WebCore::ScrollView::platformSetScrollbarModes):
2842         (WebCore::ScrollView::platformScrollbarModes):
2843         * platform/ScrollView.h:
2844         (WebCore::ScrollView::horizontalScrollbar):
2845         (WebCore::ScrollView::verticalScrollbar):
2846         (WebCore::ScrollView::isScrollViewScrollbar):
2847         (WebCore::ScrollView::setHorizontalScrollbarMode):
2848         (WebCore::ScrollView::setVerticalScrollbarMode):
2849         (WebCore::ScrollView::horizontalScrollbarMode):
2850         (WebCore::ScrollView::verticalScrollbarMode):
2851         (WebCore::ScrollView::convertSelfToChild):
2852         * platform/gtk/ScrollViewGtk.cpp:
2853         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2854         (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
2855         (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
2856         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2857         (WebCore::ScrollView::updateScrollbars):
2858         (WebCore::ScrollView::scrollbarUnderMouse):
2859         (WebCore::ScrollView::isScrollViewScrollbar):
2860         (WebCore::ScrollView::paint):
2861         (WebCore::ScrollView::scroll):
2862         * platform/mac/ScrollViewMac.mm:
2863         (WebCore::ScrollView::platformSetScrollbarModes):
2864         (WebCore::ScrollView::platformScrollbarModes):
2865         * platform/qt/ScrollViewQt.cpp:
2866         (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
2867         (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
2868         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2869         (WebCore::ScrollView::horizontalScrollbar):
2870         (WebCore::ScrollView::verticalScrollbar):
2871         (WebCore::ScrollView::invalidateScrollbars):
2872         (WebCore::ScrollView::updateScrollbars):
2873         (WebCore::ScrollView::scrollbarUnderMouse):
2874         (WebCore::ScrollView::paint):
2875         (WebCore::ScrollView::scroll):
2876         * platform/win/ScrollViewWin.cpp:
2877         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2878         (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
2879         (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
2880         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2881         (WebCore::ScrollView::ScrollViewPrivate::setAllowsScrolling):
2882         (WebCore::ScrollView::ScrollViewPrivate::allowsScrolling):
2883         (WebCore::ScrollView::suppressScrollbars):
2884         (WebCore::ScrollView::updateScrollbars):
2885         (WebCore::ScrollView::scrollbarUnderMouse):
2886         (WebCore::ScrollView::paint):
2887         (WebCore::ScrollView::scroll):
2888         * platform/wx/ScrollViewWx.cpp:
2889         (WebCore::ScrollView::platformSetScrollbarModes):
2890         (WebCore::ScrollView::platformScrollbarModes):
2891
2892 2008-09-26  David Kilzer  <ddkilzer@apple.com>
2893
2894         Fix Mac build with XPATH and XSLT disabled
2895
2896         Reviewed by Alexey.
2897
2898         * bindings/objc/DOMUtility.mm:
2899         (JSC::createDOMWrapper): Conditionalize code with ENABLE(XPATH).
2900         * dom/XMLTokenizerLibxml2.cpp:
2901         (WebCore::errorFunc): Conditionalize method with ENABLE(XSLT) to
2902         prevent an unused code warning.
2903
2904 2008-09-26  Kevin McCullough  <kmccullough@apple.com>
2905
2906         Rubber stamped by Tim Hatcher.
2907
2908         Bug 21098: Crashing under Console::log
2909         - Speculative ASSERT to help find the problem.
2910
2911         * page/InspectorController.cpp:
2912         (WebCore::ConsoleMessage::isEqual):
2913
2914 2008-09-26  Holger Hans Peter Freyther  <zecke@selfish.org>
2915
2916         [gtk+] Build fix for the latest ScrollView changes
2917
2918         * platform/gtk/ScrollViewGtk.cpp:
2919         (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
2920         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2921
2922 2008-09-26  Timothy Hatcher  <timothy@apple.com>
2923
2924         Fixes a bug where the console message repeat count would be wrong
2925         when typing commands in between repeated messages.
2926
2927         https://bugs.webkit.org/show_bug.cgi?id=21145
2928
2929         Reviewed by Kevin McCullough.
2930
2931         * page/InspectorController.cpp:
2932         (WebCore::InspectorController::clearConsoleMessages): Reset m_groupLevel.
2933         (WebCore::InspectorController::didCommitLoad): Call clearConsoleMessages.
2934         * page/inspector/Console.js:
2935         (WebInspector.Console.prototype.addMessage): Remember the original repeat count
2936         for each message as totalRepeatCount, since we now modify repeatCount to mean
2937         repeats since previous console command. If repeatCountBeforeCommand is a number,
2938         subtract that value from the repeatCount.
2939         (WebInspector.Console.prototype.clearMessages): Delete the repeatCountBeforeCommand
2940         and commandSincePreviousMessage properties.
2941
2942 2008-09-26  Eric Carlson  <eric.carlson@apple.com>
2943
2944         Reviewed by Antti
2945
2946         https://bugs.webkit.org/show_bug.cgi?id=21116
2947         <rdar://problem/5726325> Audio from <video> can still be heard after navigating 
2948         back to page with <video>, then closing tab
2949
2950         Rename willSaveToCache/didRestoreFromCache callbacks to documentWillBecomeInactive/
2951         documentDidBecomeActive, and post documentWillBecomeInactive when a page is marked for
2952         deletion.
2953
2954         * dom/Document.cpp:
2955         (WebCore::Document::documentWillBecomeInactive):
2956         (WebCore::Document::documentDidBecomeActive):
2957         (WebCore::Document::registerForDocumentActivationCallbacks):
2958         (WebCore::Document::unregisterForDocumentActivationCallbacks):
2959         * dom/Document.h:
2960         * dom/Element.h:
2961         (WebCore::Element::documentWillBecomeInactive):
2962         (WebCore::Element::documentDidBecomeActive):
2963         * history/CachedPage.cpp:
2964         (WebCore::CachedPage::CachedPage):
2965         * html/HTMLFormElement.cpp:
2966         (WebCore::HTMLFormElement::~HTMLFormElement):
2967         (WebCore::HTMLFormElement::parseMappedAttribute):
2968         (WebCore::HTMLFormElement::documentDidBecomeActive):
2969         (WebCore::HTMLFormElement::willMoveToNewOwnerDocument):
2970         (WebCore::HTMLFormElement::didMoveToNewOwnerDocument):
2971         * html/HTMLFormElement.h:
2972         * html/HTMLInputElement.cpp:
2973         (WebCore::HTMLInputElement::~HTMLInputElement):
2974         (WebCore::HTMLInputElement::setInputType):
2975         (WebCore::HTMLInputElement::parseMappedAttribute):
2976         (WebCore::HTMLInputElement::needsActivationCallback):
2977         (WebCore::HTMLInputElement::registerForActivationCallbackIfNeeded):
2978         (WebCore::HTMLInputElement::unregisterForActivationCallbackIfNeeded):
2979         (WebCore::HTMLInputElement::documentDidBecomeActive):
2980         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
2981         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
2982         * html/HTMLInputElement.h:
2983         * html/HTMLMediaElement.cpp:
2984         (WebCore::HTMLMediaElement::HTMLMediaElement):
2985         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2986         (WebCore::HTMLMediaElement::documentWillBecomeInactive):
2987         (WebCore::HTMLMediaElement::documentDidBecomeActive):
2988         * html/HTMLMediaElement.h:
2989         (WebCore::HTMLMediaElement::inActiveDocument):
2990         * loader/FrameLoader.cpp:
2991         (WebCore::FrameLoader::opened):
2992         * page/Page.cpp:
2993         (WebCore::Page::~Page):
2994         * rendering/RenderMedia.cpp:
2995         (WebCore::RenderMedia::updateControls):
2996         * rendering/RenderVideo.cpp:
2997         (WebCore::RenderVideo::updatePlayer):
2998         * svg/SVGSVGElement.cpp:
2999         (WebCore::SVGSVGElement::SVGSVGElement):
3000         (WebCore::SVGSVGElement::~SVGSVGElement):
3001         (WebCore::SVGSVGElement::documentWillBecomeInactive):
3002         (WebCore::SVGSVGElement::documentDidBecomeActive):
3003         * svg/SVGSVGElement.h:
3004
3005 2008-09-26  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3006
3007         Reviewed by Simon
3008
3009         Fix the build inside Qt, don't create faulty prl files for now.
3010
3011         * WebCore.pro:
3012
3013 2008-09-26  Simon Hausmann  <hausmann@webkit.org>
3014
3015         Fix compilation on Qt/Windows
3016
3017         * Add WebCore/ to the include path so that config.h is found that enables JSC
3018         * Link against winmm for the multimedia timer functions
3019         * Include DateMath.h instead of JavaScriptCore/DateMath.h as file is in the kjs/
3020         subdirectory
3021         * In PluginViewWin.cpp don't use setPlatformWidget with the HWND for the Qt/Windows port
3022         but set m_window directly as setPlatformWidget takes a QWidget*.
3023
3024         * WebCore.pro:
3025         * platform/win/SystemTimeWin.cpp:
3026         * plugins/win/PluginViewWin.cpp:
3027         (WebCore::PluginView::init):
3028
3029 2008-09-26  Oliver Hunt  <oliver@apple.com>
3030
3031         Reviewed by Maciej Stachowiak.
3032
3033         Bug 21054: Construction of certain DOM objects is heavily regressed by r36675
3034         <https://bugs.webkit.org/show_bug.cgi?id=21054>
3035
3036         This performance regression is actually just a symptom of a correctness
3037         bug.  The constructor objects for a number of properties that have security
3038         checks on access were returning new objects each time.  The most obvious
3039         symptom of this bug is that window.Image != window.Image, etc.
3040
3041         The solution to this is to make sure we cache these constructors
3042         in the same way as all the other DOM constructors.  To achieve this
3043         without causing any refcount cycles it is necessary to replace the
3044         refcounted document pointer in the Image, MessageChannel, Option, 
3045         XMLHttpRequest, and Audio constructor objects with a reference to 
3046         the document's JS wrapper.
3047
3048         Tests: fast/dom/constructors-cached-navigate.html
3049                fast/dom/constructors-cached.html
3050
3051         * WebCore.xcodeproj/project.pbxproj:
3052         * bindings/js/JSAudioConstructor.cpp:
3053         (WebCore::JSAudioConstructor::mark):
3054         * bindings/js/JSAudioConstructor.h:
3055         (WebCore::JSAudioConstructor::document):
3056         * bindings/js/JSDOMWindowBase.cpp:
3057         (WebCore::getDOMConstructor):
3058         (WebCore::JSDOMWindowBase::getValueProperty):
3059         * bindings/js/JSDOMWindowBase.h:
3060         * bindings/js/JSHTMLOptionElementConstructor.cpp:
3061         (WebCore::JSHTMLOptionElementConstructor::mark):
3062         * bindings/js/JSHTMLOptionElementConstructor.h:
3063         (WebCore::JSHTMLOptionElementConstructor::document):
3064         * bindings/js/JSImageConstructor.cpp:
3065         (WebCore::JSImageConstructor::mark):
3066         * bindings/js/JSImageConstructor.h:
3067         (WebCore::JSImageConstructor::document):
3068         * bindings/js/JSXMLHttpRequestConstructor.cpp:
3069         (WebCore::JSXMLHttpRequestConstructor::mark):
3070         * bindings/js/JSXMLHttpRequestConstructor.h:
3071         (WebCore::JSXMLHttpRequestConstructor::document):
3072
3073 2008-09-26  Simon Hausmann  <hausmann@webkit.org>
3074
3075         Unreviewed one-liner build fix for the Qt/Windows build.
3076
3077         The build requires NPAPI support to be enabled, fix the condition in
3078         the .pro file for that.
3079
3080         * WebCore.pro:
3081
3082 2008-09-26  Trenton Schulz <twschulz@trolltech.com>
3083
3084         Reviewed by Simon.
3085
3086         Fix compilation with the Qt/Cocoa port.
3087
3088         * platform/qt/ScrollViewQt.cpp:
3089         (WebCore::ScrollView::updateScrollbars):
3090
3091 2008-09-26  Simon Hausmann  <hausmann@webkit.org>
3092
3093         Reviewed by Holger.
3094
3095         Fix compilation with VC9SP1, work around bug in TR1 library by
3096         disabling it.
3097
3098         * WebCore.pro:
3099
3100 2008-09-26  Simon Hausmann  <hausmann@webkit.org>
3101
3102         Reviewed by Holger.
3103
3104         Fix an lupdate() warning.
3105
3106         Don't use tr() in a class that is not a QObject, use
3107         QCoreApplication::translate() directly.
3108
3109         * platform/qt/ScrollbarQt.cpp:
3110         (WebCore::Scrollbar::handleContextMenuEvent):
3111
3112 2008-09-25  David Hyatt  <hyatt@apple.com>
3113
3114         Remove the scrollTo() method from FrameView, since it is not used by anyone.
3115
3116         Reviewed by Oliver Hunt
3117
3118         * page/FrameView.cpp:
3119         * page/FrameView.h:
3120
3121 2008-09-25  David Hyatt  <hyatt@apple.com>
3122
3123         Make scrollRectIntoViewRecursively cross-platform.
3124
3125         Reviewed by Oliver Hunt
3126
3127         * platform/ScrollView.cpp:
3128         (WebCore::ScrollView::scrollRectIntoViewRecursively):
3129         * platform/gtk/ScrollViewGtk.cpp:
3130         * platform/mac/ScrollViewMac.mm:
3131         * platform/qt/ScrollViewQt.cpp:
3132         * platform/win/ScrollViewWin.cpp:
3133         * platform/wx/ScrollViewWx.cpp:
3134
3135 2008-09-25  David Hyatt  <hyatt@apple.com>
3136
3137         https://bugs.webkit.org/show_bug.cgi?id=21133
3138         
3139         Rename resizeContents method on ScrollView to setContentsSize (to match contentsSize()).  Make it
3140         cross-platform.
3141
3142         Reviewed by Oliver Hunt
3143
3144         * loader/FrameLoader.cpp:
3145         (WebCore::FrameLoader::begin):
3146         * page/FrameView.cpp:
3147         (WebCore::FrameView::adjustViewSize):
3148         * platform/ScrollView.cpp:
3149         (WebCore::ScrollView::setContentsSize):
3150         * platform/ScrollView.h:
3151         (WebCore::ScrollView::updateScrollbars):
3152         * platform/gtk/ScrollViewGtk.cpp:
3153         * platform/mac/ScrollViewMac.mm:
3154         (WebCore::ScrollView::platformSetContentsSize):
3155         * platform/qt/ScrollViewQt.cpp:
3156         * platform/win/ScrollViewWin.cpp:
3157         * platform/wx/ScrollViewWx.cpp:
3158         (WebCore::ScrollView::platformSetContentsSize):
3159
3160 2008-09-25  David Hyatt  <hyatt@apple.com>
3161
3162         https://bugs.webkit.org/show_bug.cgi?id=21132
3163
3164         Clean up the methods that actually do the scrolling in ScrollView.
3165
3166         Reviewed by Oliver Hunt
3167
3168         * html/HTMLBodyElement.cpp:
3169         (WebCore::HTMLBodyElement::setScrollLeft):
3170         (WebCore::HTMLBodyElement::setScrollTop):
3171         * loader/FrameLoader.cpp:
3172         (WebCore::FrameLoader::restoreScrollPositionAndViewState):
3173         * loader/ImageDocument.cpp:
3174         (WebCore::ImageDocument::imageClicked):
3175         * page/DOMWindow.cpp:
3176         (WebCore::DOMWindow::scrollBy):
3177         (WebCore::DOMWindow::scrollTo):
3178         * page/FrameView.cpp:
3179         (WebCore::FrameView::scrollTo):
3180         (WebCore::FrameView::setScrollPosition):
3181         * page/FrameView.h:
3182         * platform/ScrollView.cpp:
3183         (WebCore::ScrollView::maximumScrollPosition):
3184         * platform/ScrollView.h:
3185         (WebCore::ScrollView::contentsWidth):
3186         (WebCore::ScrollView::contentsHeight):
3187         (WebCore::ScrollView::scrollBy):
3188         * platform/gtk/ScrollViewGtk.cpp:
3189         (WebCore::ScrollView::setScrollPosition):
3190         * platform/mac/ScrollViewMac.mm:
3191         (WebCore::ScrollView::setScrollPosition):
3192         * platform/qt/ScrollViewQt.cpp:
3193         (WebCore::ScrollView::setScrollPosition):
3194         (WebCore::ScrollView::scrollRectIntoViewRecursively):
3195         * platform/win/ScrollViewWin.cpp:
3196         (WebCore::ScrollView::setScrollPosition):
3197         (WebCore::ScrollView::scrollRectIntoViewRecursively):
3198         * platform/wx/ScrollViewWx.cpp:
3199         (WebCore::ScrollView::setScrollPosition):
3200         * rendering/RenderLayer.cpp:
3201         (WebCore::RenderLayer::scrollByRecursively):
3202         (WebCore::RenderLayer::scrollRectToVisible):
3203
3204 2008-09-25  Dan Bernstein  <mitz@apple.com>
3205
3206         - attempted Windows build fix
3207
3208         * platform/win/ScrollViewWin.cpp:
3209         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
3210         (WebCore::ScrollView::setContentsPos):
3211         (WebCore::ScrollView::paint):
3212
3213 2008-09-25  Timothy Hatcher  <timothy@apple.com>
3214
3215         Revert the padding changes done in r36905 to prevent the
3216         scrollbar from overlapping the URLs in the Console.
3217
3218         https://bugs.webkit.org/show_bug.cgi?id=21126
3219
3220         * page/inspector/inspector.css:
3221
3222 2008-09-25  David Hyatt  <hyatt@apple.com>
3223
3224         https://bugs.webkit.org/show_bug.cgi?id=21129
3225
3226         Refactor contents size and scroll offset to be cross-platform.  Reduce further the number
3227         of platform-specific methods required of ScrollView implementations.
3228
3229         Reviewed by Tim Hatcher
3230
3231         * dom/MouseRelatedEvent.cpp:
3232         (WebCore::contentsX):
3233         (WebCore::contentsY):
3234         * html/HTMLBodyElement.cpp:
3235         (WebCore::HTMLBodyElement::scrollLeft):
3236         (WebCore::HTMLBodyElement::setScrollLeft):
3237         (WebCore::HTMLBodyElement::scrollTop):
3238         (WebCore::HTMLBodyElement::setScrollTop):
3239         * loader/FrameLoader.cpp:
3240         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem):
3241         * page/DOMWindow.cpp:
3242         (WebCore::DOMWindow::scrollX):
3243         (WebCore::DOMWindow::scrollY):
3244         * page/EventHandler.cpp:
3245         (WebCore::EventHandler::hitTestResultAtPoint):
3246         * page/FrameView.cpp:
3247         (WebCore::FrameView::scrollTo):
3248         (WebCore::FrameView::windowClipRect):
3249         * platform/ScrollView.cpp:
3250         (WebCore::ScrollView::visibleContentRect):
3251         (WebCore::ScrollView::contentsSize):
3252         (WebCore::ScrollView::platformContentsSize):
3253         * platform/ScrollView.h:
3254         (WebCore::ScrollView::scrollPosition):
3255         (WebCore::ScrollView::scrollOffset):
3256         (WebCore::ScrollView::scrollX):
3257         (WebCore::ScrollView::scrollY):
3258         (WebCore::ScrollView::contentsWidth):
3259         (WebCore::ScrollView::contentsHeight):
3260         * platform/gtk/ScrollViewGtk.cpp:
3261         (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
3262         (WebCore::ScrollView::setGtkAdjustments):
3263         (WebCore::ScrollView::resizeContents):
3264         (WebCore::ScrollView::contentsWidth):
3265         (WebCore::ScrollView::contentsHeight):
3266         (WebCore::ScrollView::scrollOffset):
3267         (WebCore::ScrollView::maximumScroll):
3268         (WebCore::ScrollView::scrollBy):
3269         (WebCore::ScrollView::suppressScrollbars):
3270         (WebCore::ScrollView::setHScrollbarMode):
3271         (WebCore::ScrollView::setVScrollbarMode):
3272         (WebCore::ScrollView::setScrollbarsMode):
3273         (WebCore::ScrollView::setFrameGeometry):
3274         (WebCore::ScrollView::updateScrollbars):
3275         * platform/mac/ScrollViewMac.mm:
3276         (WebCore::ScrollView::platformContentsSize):
3277         (WebCore::ScrollView::scrollBy):
3278         * platform/mac/WidgetMac.mm:
3279         (WebCore::Widget::convertFromContainingWindow):
3280         (WebCore::Widget::convertToContainingWindow):
3281         * platform/qt/ScrollViewQt.cpp:
3282         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
3283         (WebCore::ScrollView::resizeContents):
3284         (WebCore::ScrollView::setFrameGeometry):
3285         (WebCore::ScrollView::scrollOffset):
3286         (WebCore::ScrollView::maximumScroll):
3287         (WebCore::ScrollView::scrollBy):
3288         (WebCore::ScrollView::setHScrollbarMode):
3289         (WebCore::ScrollView::setVScrollbarMode):
3290         (WebCore::ScrollView::setScrollbarsMode):
3291         (WebCore::ScrollView::updateScrollbars):
3292         * platform/win/ScrollViewWin.cpp:
3293         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
3294         (WebCore::ScrollView::ScrollViewPrivate::setAllowsScrolling):
3295         (WebCore::ScrollView::resizeContents):
3296         (WebCore::ScrollView::setFrameGeometry):
3297         (WebCore::ScrollView::scrollOffset):
3298         (WebCore::ScrollView::maximumScroll):
3299         (WebCore::ScrollView::scrollBy):
3300         (WebCore::ScrollView::setHScrollbarMode):
3301         (WebCore::ScrollView::setVScrollbarMode):
3302         (WebCore::ScrollView::setScrollbarsMode):
3303         (WebCore::ScrollView::updateScrollbars):
3304         * platform/wx/ScrollViewWx.cpp:
3305         (WebCore::ScrollView::platformVisibleContentRect):
3306         (WebCore::ScrollView::platformContentsSize):
3307         * rendering/RenderBlock.cpp:
3308         (WebCore::RenderBlock::nodeAtPoint):
3309         * rendering/RenderLayer.cpp:
3310         (WebCore::RenderLayer::scrollRectToVisible):
3311         (WebCore::RenderLayer::calculateClipRects):
3312         (WebCore::RenderLayer::calculateRects):
3313         * rendering/RenderView.cpp:
3314         (WebCore::RenderView::absolutePosition):
3315         (WebCore::RenderView::computeAbsoluteRepaintRect):
3316
3317 2008-09-25  David Smith  <catfish.man@gmail.com>
3318
3319         Reviewed by Dave Hyatt.
3320
3321         Fix a nasty regression I introduced in the previous commit, which caused infinite recursion on facebook.
3322
3323         * dom/Element.cpp:
3324         (WebCore::Element::rareData):
3325         * dom/Element.h:
3326         * dom/Node.cpp:
3327         (WebCore::Node::rareData):
3328         * dom/Node.h:
3329
3330 2008-09-25  David Smith  <catfish.man@gmail.com>
3331
3332         Reviewed by Darin Adler.
3333         
3334         https://bugs.webkit.org/show_bug.cgi?id=20980
3335         Split off uncommonly used data from Node similar to ElementRareData
3336         
3337         Saves an OwnPtr and a short on Node, as well as providing room for an isContainer bit,
3338         which in turn allows inlining firstChild(), lastChild(), childNodeCount(), and childNode()
3339         for a 5-10+% performance win on SlickSpeed and assorted speedups on other tests.
3340
3341         * WebCore.base.exp: 
3342         * WebCore.xcodeproj/project.pbxproj:
3343         * dom/ChildNodeList.cpp: Include ContainerNode to pick up its definitions for childNodeCount(), etc...
3344         * dom/ContainerNode.cpp: Set isContainer to true
3345         (WebCore::ContainerNode::ContainerNode):
3346         * dom/ContainerNode.h: These Node inlines are here to avoid including ContainerNode.h in Node.h
3347         (WebCore::Node::containerChildNodeCount): Use ContainerNode's definition, having proved that the Node is a container
3348         (WebCore::Node::containerChildNode): ditto
3349         (WebCore::Node::containerFirstChild): ditto
3350         (WebCore::Node::containerLastChild): ditto
3351         * dom/Element.cpp: Most of the changes here are moving ElementRareData to ElementRareData.h and NodeRareData.h
3352         (WebCore::Element::Element): 
3353         (WebCore::Element::~Element):
3354         (WebCore::Element::rareData):
3355         (WebCore::Element::ensureRareData): Renamed from createRareData
3356         (WebCore::Element::createRareData): Used by ensureRareData to get the correct rareData type
3357         (WebCore::Element::attach): Check hasRareData rather than null-checking rareData()
3358         (WebCore::Element::detach): ditto
3359         (WebCore::Element::recalcStyle): ditto
3360         (WebCore::Element::focus):
3361         (WebCore::Element::minimumSizeForResizing): ditto
3362         (WebCore::Element::setMinimumSizeForResizing): ditto
3363         (WebCore::Element::computedStyle):
3364         (WebCore::Element::cancelFocusAppearanceUpdate): ditto
3365         * dom/Element.h:
3366         * dom/ElementRareData.h: Added; everything copied from Element.cpp
3367         (WebCore::defaultMinimumSizeForResizing):
3368         (WebCore::ElementRareData::ElementRareData):
3369         (WebCore::ElementRareData::resetComputedStyle):
3370         * dom/EventTargetNode.cpp:
3371         (WebCore::EventTargetNode::EventTargetNode): Pass the isContainer flag up the chain
3372         * dom/EventTargetNode.h:
3373         * dom/Node.cpp:
3374         (WebCore::Node::Node):
3375         (WebCore::Node::~Node): rareData cleanup code moved from Element and changed to use hasRareData
3376         (WebCore::Node::rareData):
3377         (WebCore::Node::ensureRareData):
3378         (WebCore::Node::createRareData):
3379         (WebCore::Node::tabIndex): nonzero tab indexes are now in rareData
3380         (WebCore::Node::setTabIndexExplicitly):
3381         (WebCore::Node::childNodes): NodeLists are now in rareData
3382         (WebCore::Node::setFocus):
3383         (WebCore::Node::rareDataFocused):
3384         (WebCore::Node::isFocusable):
3385         (WebCore::Node::isKeyboardFocusable):
3386         (WebCore::Node::registerDynamicNodeList): NodeLists are now in rareData
3387         (WebCore::Node::unregisterDynamicNodeList): ditto
3388         (WebCore::Node::notifyLocalNodeListsAttributeChanged): ditto
3389         (WebCore::Node::notifyLocalNodeListsChildrenChanged): ditto
3390         (WebCore::Node::getElementsByName): ditto
3391         (WebCore::Node::getElementsByClassName): ditto
3392         * dom/Node.h:
3393         (WebCore::Node::firstChild): Use isContainerNode() to devirtualize
3394         (WebCore::Node::lastChild): ditto
3395         (WebCore::Node::isContainerNode): Take advantage of a newly freed bit to store whether we're a container
3396         (WebCore::Node::focused): focus is in rareData if set
3397         (WebCore::Node::childTypeAllowed):
3398         (WebCore::Node::childNodeCount): Use isContainerNode() to devirtualize
3399         (WebCore::Node::childNode): ditto
3400         (WebCore::Node::hasRareData): Use another newly freed bit to store whether we have rare data; avoids doing hash lookups in the common case
3401         * dom/NodeRareData.h: Added. Most of this is just properties moved from Node
3402         (WebCore::NodeListsNodeData::~NodeListsNodeData): Moved from Node.cpp since we NodeRareData needs to put them in a HashTable :(
3403         (WebCore::NodeRareData::NodeRareData):
3404         (WebCore::NodeRareData::rareDataMap):
3405         (WebCore::NodeRareData::rareDataFromMap):
3406         (WebCore::NodeRareData::clearNodeLists):
3407         (WebCore::NodeRareData::setNodeLists):
3408         (WebCore::NodeRareData::nodeLists):
3409         (WebCore::NodeRareData::tabIndex):
3410         (WebCore::NodeRareData::setTabIndex):
3411         (WebCore::NodeRareData::tabIndexSetExplicitly):
3412         * dom/TreeWalker.cpp: Include ContainerNode to pick up its definitions for childNodeCount(), etc...
3413         * xml/XPathUtil.cpp: Include ContainerNode to pick up its definitions for childNodeCount(), etc...
3414
3415 2008-09-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3416
3417         Reviewed by Simon Hausmann.
3418
3419         [qt] ImageBuffer::toDataURL implementation
3420
3421         There needs to be a Qt specific test result for the above mentioned
3422         implementation.
3423
3424         * platform/graphics/qt/ImageBufferQt.cpp:
3425         (WebCore::ImageBuffer::toDataURL):
3426
3427 2008-09-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3428
3429         Reviewed by Simon Hausmann.
3430
3431         [qt] Implement SharedBuffer for Qt.
3432
3433         * WebCore.pro:
3434         * platform/qt/SharedBufferQt.cpp: Added.
3435         (WebCore::SharedBuffer::createWithContentsOfFile):
3436         * platform/qt/TemporaryLinkStubs.cpp:
3437
3438 2008-09-25  Feng Qian <feng@chromium.org>
3439
3440         Fix bug: https://bugs.webkit.org/show_bug.cgi?id=21032
3441         <rdar://problem/6243032>
3442
3443         Reviewed by Dave Hyatt.
3444
3445         Test: fast/dom/attribute-downcast-right.html
3446
3447         Add isMappedAttribute function to Attribute for checking if an object
3448         is an instance of MappedAttribute. Removed attributeItem,
3449         getAttributeItem functions from NamedMappedAttrMap, and callers
3450         expecting MappedAttribute have to check isMappedAttribute before
3451         downcasting the return value to MappedAttribute.
3452
3453         * css/CSSStyleSelector.cpp:
3454         (WebCore::CSSStyleSelector::styleForElement):
3455         * dom/Attribute.h:
3456         (WebCore::Attribute::isMappedAttribute):
3457         * dom/MappedAttribute.h:
3458         (WebCore::MappedAttribute::isMappedAttribute):
3459         * dom/NamedMappedAttrMap.cpp:
3460         (WebCore::NamedMappedAttrMap::declCount):
3461         (WebCore::NamedMappedAttrMap::mapsEquivalent):
3462         * dom/NamedMappedAttrMap.h:
3463         * dom/StyledElement.cpp:
3464         (WebCore::StyledElement::attributeChanged):
3465         * html/HTMLInputElement.cpp:
3466         (WebCore::HTMLInputElement::setInputType):
3467         * svg/SVGForeignObjectElement.cpp:
3468         (WebCore::addCSSPropertyAndNotifyAttributeMap):
3469         * svg/SVGStyledElement.cpp:
3470         (WebCore::SVGStyledElement::getPresentationAttribute):
3471
3472 2008-09-25  David Hyatt  <hyatt@apple.com>
3473
3474         https://bugs.webkit.org/show_bug.cgi?id=21120
3475
3476         Make visibleContentRect cross-platform.  Note this does add new horizontal/verticalScrollbar accessors
3477         to a bunch of platforms.  This is a temporary evil until the scrollbars get made cross-platform (and I
3478         didn't want to mix that change in with this patch).
3479
3480         Reviewed by Sam Weinig
3481
3482         * page/Frame.cpp:
3483         (WebCore::Frame::markAllMatchesForText):
3484         * page/FrameView.cpp:
3485         (WebCore::FrameView::repaintContentRectangle):
3486         (WebCore::FrameView::windowClipRect):
3487         (WebCore::FrameView::updateControlTints):
3488         * platform/ScrollView.cpp:
3489         (WebCore::ScrollView::visibleContentRect):
3490         (WebCore::ScrollView::platformVisibleContentRect):
3491         * platform/ScrollView.h:
3492         (WebCore::ScrollView::visibleWidth):
3493         (WebCore::ScrollView::visibleHeight):
3494         * platform/gtk/ScrollViewGtk.cpp:
3495         (WebCore::ScrollView::horizontalScrollbar):
3496         (WebCore::ScrollView::verticalScrollbar):
3497         * platform/mac/ScrollViewMac.mm:
3498         (WebCore::ScrollView::horizontalScrollbar):
3499         (WebCore::ScrollView::verticalScrollbar):
3500         (WebCore::ScrollView::platformVisibleContentRect):
3501         * platform/qt/ScrollViewQt.cpp:
3502         (WebCore::ScrollView::horizontalScrollbar):
3503         (WebCore::ScrollView::verticalScrollbar):
3504         * platform/win/ScrollViewWin.cpp:
3505         (WebCore::ScrollView::horizontalScrollbar):
3506         (WebCore::ScrollView::verticalScrollbar):
3507         * platform/wx/ScrollViewWx.cpp:
3508         (WebCore::ScrollView::platformVisibleContentRect):
3509         (WebCore::ScrollView::horizontalScrollbar):
3510         (WebCore::ScrollView::verticalScrollbar):
3511         * rendering/RenderLayer.cpp:
3512         (WebCore::RenderLayer::scrollRectToVisible):
3513         (WebCore::frameVisibleRect):
3514         * rendering/RenderView.cpp:
3515         (WebCore::RenderView::viewRect):
3516
3517 2008-09-25  David Smith  <catfish.man@gmail.com>
3518
3519         Reviewed by Timothy Hatcher
3520
3521         https://bugs.webkit.org/show_bug.cgi?id=21052
3522         Generalize id selector special case for querySelectorAll
3523         
3524         By checking the element we get with getElementById against the selector, we can use the special case in many more circumstances.
3525         Changes results on http://native.khan.mozilla.org 
3526         from
3527             #title: 2ms
3528             h1#title: 55ms
3529             div #title: 55ms
3530
3531         to:
3532             #title: 1ms
3533             h1#title: 2ms
3534             div #title: 5ms
3535         
3536         * dom/Node.cpp:
3537         (WebCore::Node::querySelector):
3538         * dom/SelectorNodeList.cpp:
3539         (WebCore::createSelectorNodeList):
3540
3541 2008-09-25  David Hyatt  <hyatt@apple.com>
3542
3543         https://bugs.webkit.org/show_bug.cgi?id=21118
3544
3545         Make the concept of whether you can blit on scroll cross-platform on ScrollView.
3546
3547         Reviewed by Sam Weinig
3548
3549         * page/FrameView.cpp:
3550         (WebCore::FrameView::clear):
3551         (WebCore::FrameView::layout):
3552         (WebCore::FrameView::setUseSlowRepaints):
3553         (WebCore::FrameView::addSlowRepaintObject):
3554         (WebCore::FrameView::removeSlowRepaintObject):
3555         * platform/ScrollView.cpp:
3556         (WebCore::ScrollView::init):
3557         (WebCore::ScrollView::addChild):
3558         (WebCore::ScrollView::removeChild):
3559         (WebCore::ScrollView::setCanBlitOnScroll):
3560         * platform/ScrollView.h:
3561         (WebCore::ScrollView::canBlitOnScroll):
3562         * platform/gtk/ScrollViewGtk.cpp:
3563         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3564         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
3565         (WebCore::ScrollView::ScrollView):
3566         * platform/mac/ScrollViewMac.mm:
3567         (WebCore::ScrollView::ScrollView):
3568         (WebCore::ScrollView::platformAddChild):
3569         (WebCore::ScrollView::platformRemoveChild):
3570         (WebCore::ScrollView::platformSetCanBlitOnScroll):
3571         * platform/qt/ScrollViewQt.cpp:
3572         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3573         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
3574         (WebCore::ScrollView::ScrollView):
3575         * platform/win/ScrollViewWin.cpp:
3576         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3577         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
3578         (WebCore::ScrollView::ScrollView):
3579         * platform/wx/ScrollViewWx.cpp:
3580         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3581         (WebCore::ScrollView::ScrollView):
3582         (WebCore::ScrollView::scrollBy):
3583
3584 2008-09-25  Kevin McCullough  <kmccullough@apple.com>
3585
3586         Reviewed by Tim Hatcher.
3587
3588         Bug 21109: Console should right-align urls
3589
3590         * page/inspector/Console.js: Re-order the message elements so that when
3591         it overflows it doesn't get mixed in with the next message.
3592         * page/inspector/inspector.css:
3593
3594 2008-09-25  David Hyatt  <hyatt@apple.com>
3595
3596         https://bugs.webkit.org/show_bug.cgi?id=21113
3597
3598         Putting r36771 back in with a fix to the addPendingSheet check in CSSImportRule::insertedIntoParent.
3599
3600         Reviewed by Darin Adler
3601
3602         * css/CSSImportRule.cpp:
3603         (WebCore::CSSImportRule::insertedIntoParent):
3604         * css/CSSRule.cpp:
3605         (WebCore::CSSRule::parentStyleSheet):
3606         (WebCore::CSSRule::parentRule):
3607         * css/CSSStyleSheet.cpp:
3608         (WebCore::CSSStyleSheet::CSSStyleSheet):
3609         * css/CSSStyleSheet.h:
3610
3611 2008-09-25  Darin Adler  <darin@apple.com>
3612
3613         Reviewed by Adele Peterson.
3614
3615         - fix https://bugs.webkit.org/show_bug.cgi?id=21115
3616           <rdar://problem/6245773> REGRESSION (r34702): Safari no longer zips
3617           bundled documents
3618
3619         * html/HTMLFormElement.cpp:
3620         (WebCore::HTMLFormElement::formData): Use files() instead of value()
3621         to get the path, since value() now returns just the basename.
3622
3623 2008-09-25  Brady Eidson  <beidson@apple.com>
3624
3625         Rubberstamped by Mark Rowe
3626
3627         Roll out 36771 as it caused <rdar://problem/6246554>
3628         "nytimes.com doesn't display after returning to it with back/forward"
3629
3630         * css/CSSImportRule.cpp:
3631         (WebCore::CSSImportRule::insertedIntoParent):
3632         * css/CSSRule.cpp:
3633         (WebCore::CSSRule::parentStyleSheet):
3634         (WebCore::CSSRule::parentRule):
3635         * css/CSSStyleSheet.cpp:
3636         (WebCore::CSSStyleSheet::CSSStyleSheet):
3637         (WebCore::CSSStyleSheet::docLoader):
3638         * css/CSSStyleSheet.h:
3639         (WebCore::CSSStyleSheet::doc):
3640
3641 2008-09-25  Adam Roben  <aroben@apple.com>
3642
3643         Windows build fix
3644
3645         * WebCore.vcproj/WebCore.vcproj: Add ScrollView.cpp to the project.
3646
3647 2008-09-25  Dan Bernstein  <mitz@apple.com>
3648
3649         - Windows build fix
3650
3651         * platform/win/ScrollViewWin.cpp:
3652         (WebCore::ScrollView::addChildPlatformWidget):
3653         (WebCore::ScrollView::removeChildPlatformWidget):
3654
3655 2008-09-25  Timothy Hatcher  <timothy@apple.com>
3656
3657         Fixes a leak of ConsoleMessage seen when repeated console
3658         messages occur.
3659
3660         Reviewed by Mark Rowe.
3661
3662         * page/InspectorController.cpp:
3663         (WebCore::InspectorController::addConsoleMessage): Delete the repeat
3664         since we don't add it to m_consoleMessages.
3665
3666 2008-09-25  Kevin McCullough  <kmccullough@apple.com>
3667
3668         Reviewed by Dan Bernstein.
3669
3670         Bug 21105: XHRs logged in the console may show the wrong URL for the
3671         source
3672         - Get the url at the time of the send() and pass it on to the XHR.
3673
3674         * bindings/js/JSXMLHttpRequestCustom.cpp:
3675         (WebCore::JSXMLHttpRequest::send):
3676         * xml/XMLHttpRequest.cpp:
3677         (WebCore::XMLHttpRequest::didFinishLoading):
3678         * xml/XMLHttpRequest.h:
3679         (WebCore::XMLHttpRequest::setLastSendURL):
3680
3681 2008-09-25  Kevin McCullough  <kmccullough@apple.com>
3682
3683         Reviewed by Geoff and Tim.
3684
3685         Bug 20322: XHRs logged in the console do not have line numbers
3686         - Get the line number at the time of the send and pass it on to the XHR.
3687
3688         * bindings/js/JSXMLHttpRequestCustom.cpp:
3689         (WebCore::JSXMLHttpRequest::send):
3690         * xml/XMLHttpRequest.cpp:
3691         (WebCore::XMLHttpRequest::XMLHttpRequest):
3692         (WebCore::XMLHttpRequest::didFinishLoading):
3693         * xml/XMLHttpRequest.h:
3694         (WebCore::XMLHttpRequest::setLastSendLineNumber):
3695
3696 2008-09-25  Eric Carlson  <eric.carlson@apple.com>
3697
3698         Reviewed by Eric Seidel.
3699         
3700         <rdar://problem/6171047> HTMLMediaElement "begin" event is now "loadstart"
3701         https://bugs.webkit.org/show_bug.cgi?id=21003
3702
3703         * dom/EventNames.h: remove "begin" event
3704         * html/HTMLMediaElement.cpp:
3705         (WebCore::HTMLMediaElement::load): Post "loadstart" event instead of "begin"
3706
3707 2008-09-25  Alexey Proskuryakov  <ap@webkit.org>
3708
3709         Reviewed by Eric Seidel.
3710
3711         https://bugs.webkit.org/show_bug.cgi?id=21097
3712         Calling a MessageChannel constructor from a destroyed document results in a crash
3713
3714         Test: fast/events/message-port-constructor-for-deleted-document.html
3715
3716         * bindings/js/JSMessageChannelConstructor.cpp:
3717         (WebCore::JSMessageChannelConstructor::construct):
3718         * bindings/js/JSMessageChannelConstructor.h:
3719         Made m_document a RefPtr.
3720
3721 2008-09-24  Alexey Proskuryakov  <ap@webkit.org>
3722
3723         Reviewed by Sam Weinig, Anders Carlsson, and (unofficially) Adam Barth.
3724
3725         https://bugs.webkit.org/show_bug.cgi?id=20879
3726         Implement HTML5 channel messaging
3727
3728         Tests: fast/events/message-channel-gc.html
3729                fast/events/message-port-deleted-document.html
3730                fast/events/message-port-deleted-frame.html
3731                fast/events/message-port-inactive-document.html
3732                fast/events/message-port.html
3733                http/tests/security/MessagePort/event-listener-context.html
3734
3735         * Configurations/WebCore.xcconfig:
3736         Removed unused  ENABLE_CROSS_DOCUMENT_MESSAGING macro.
3737
3738         * DerivedSources.make:
3739         Added MessageChannel and MessagePort.
3740
3741         * WebCore.pro: Made MessageEvent compilation unconditional, as it could not possibly be
3742         turmed off anyway. Added new files.
3743
3744         * GNUmakefile.am:
3745         * WebCore.pro:
3746         * WebCore.vcproj/WebCore.vcproj:
3747         * WebCore.xcodeproj/project.pbxproj:
3748         * WebCoreSources.bkl:
3749         Added new files.
3750
3751         * bindings/js/JSDOMWindowBase.h:
3752         * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::getValueProperty):
3753         Added suport for window.MessageChannel constructor.
3754
3755         * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::postMessage):
3756         * page/DOMWindow.cpp:
3757         (WebCore::DOMWindow::postMessage):
3758         * page/DOMWindow.h:
3759         * page/DOMWindow.idl:
3760         Added support for three-argument postMessage (that posts a MessagePort).
3761
3762         * dom/EventTarget.cpp:
3763         (WebCore::EventTarget::toMessagePort):
3764         * dom/EventTarget.h:
3765         * bindings/js/JSEventTargetBase.cpp: (WebCore::toJS): Added MessagePort as yet another
3766         EventTarget variant.
3767
3768         * bindings/js/JSMessageChannelConstructor.h:
3769         * bindings/js/JSMessageChannelConstructor.cpp: Added a custom constructor, so that it could
3770         take a browsing context (document) parameter.
3771
3772         * bindings/js/JSMessageChannelCustom.cpp: Added.
3773         (WebCore::JSMessageChannel::mark): JSMessageChannel uses a custom mark function to mark
3774         port1 and port2 that it owns.
3775
3776         * bindings/js/JSMessagePortCustom.cpp: Added.
3777         (WebCore::JSMessagePort::startConversation):
3778         (WebCore::JSMessagePort::addEventListener):
3779         (WebCore::JSMessagePort::removeEventListener):
3780         (WebCore::JSMessagePort::dispatchEvent):
3781         (WebCore::JSMessagePort::setOnmessage):
3782         (WebCore::JSMessagePort::onmessage):
3783         (WebCore::JSMessagePort::setOnclose):
3784         (WebCore::JSMessagePort::onclose):
3785         (WebCore::JSMessagePort::mark):
3786         * dom/MessagePort.cpp: Added.
3787         * dom/MessagePort.h: Added.
3788         * dom/MessagePort.idl: Added.
3789         Added a MessagePort implementation. Currently, it is not thread-safe at all, and only works
3790         with Documents as contexts, but in the future, it will be used for communication with worker
3791         threads.
3792
3793         * bindings/objc/DOMInternal.h: Include "DOMMessagePortInternal.h". The new APIs do not
3794         really have Obj-C bindings, as they are far from being final, but a MessagePort stub is
3795         needed for MessageEvent.
3796
3797         * bindings/scripts/CodeGeneratorJS.pm: Include PlatformString.h for MessagePort happiness.
3798
3799         * dom/Document.cpp:
3800         (WebCore::MessagePortTimer::MessagePortTimer):
3801         (WebCore::MessagePortTimer::fired):
3802         (WebCore::Document::processMessagePortMessagesSoon):
3803         (WebCore::Document::~Document):
3804         (WebCore::Document::dispatchMessagePortEvents):
3805         (WebCore::Document::createdMessagePort):
3806         (WebCore::Document::destroyedMessagePort):
3807         * dom/Document.h:
3808         Document keeps track of all MessagePort objects that were created when it was fully active
3809         in its context.
3810
3811         * dom/EventNames.h: Added closeEvent.
3812
3813         * dom/MessageChannel.cpp: Added.
3814         (WebCore::MessageChannel::MessageChannel):
3815         (WebCore::MessageChannel::~MessageChannel):
3816         * dom/MessageChannel.h: Added.
3817         (WebCore::MessageChannel::create):
3818         (WebCore::MessageChannel::port1):
3819         (WebCore::MessageChannel::port2):
3820         * dom/MessageChannel.idl: Added.
3821         Addded JSMessageChannel implementation.
3822
3823         * dom/MessageEvent.cpp:
3824         (WebCore::MessageEvent::MessageEvent):
3825         (WebCore::MessageEvent::initMessageEvent):
3826         * dom/MessageEvent.h:
3827         (WebCore::MessageEvent::create):
3828         (WebCore::MessageEvent::messagePort):
3829         * dom/MessageEvent.idl:
3830         MessageEvent has a MessagePort member now, making it possible to pass ports across
3831         documents.
3832
3833 2008-09-25  David Smith  <catfish.man@gmail.com>
3834
3835         Reviewed by Eric Seidel
3836         
3837         fix https://bugs.webkit.org/show_bug.cgi?id=21091
3838         Regression: querySelector matches tag names case sensitively
3839         
3840         Tests: fast/dom/SelectorAPI/caseTag.html
3841                fast/dom/SelectorAPI/caseTagX.xhtml
3842
3843         * css/CSSParser.cpp:
3844         (WebCore::CSSParser::parseSelector): Add a Document argument, since tag case sensitivity is different for HTML documents
3845         * css/CSSParser.h:
3846         * dom/Node.cpp:
3847         (WebCore::Node::querySelector):
3848         (WebCore::Node::querySelectorAll):
3849
3850 2008-09-24  David Hyatt  <hyatt@apple.com>
3851
3852         https://bugs.webkit.org/show_bug.cgi?id=21084
3853
3854         Make the m_children member of ScrollView cross-platform.  Consolidate children add/remove
3855         functionality.  Add platform stubs for connecting/disconnecting the platform widgets.
3856
3857         Reviewed by Sam Weinig
3858
3859         * GNUmakefile.am:
3860         * WebCore.pro:
3861         * WebCore.vcproj/WebCore.vcproj:
3862         * WebCore.xcodeproj/project.pbxproj:
3863         * WebCoreSources.bkl:
3864         * platform/ScrollView.h:
3865         (WebCore::ScrollView::children):
3866         * platform/Widget.h:
3867         * platform/gtk/ScrollViewGtk.cpp:
3868         (WebCore::ScrollView::addChildPlatformWidget):
3869         (WebCore::ScrollView::removeChildPlatformWidget):
3870         (WebCore::ScrollView::geometryChanged):
3871         * platform/mac/ScrollViewMac.mm:
3872         (WebCore::ScrollView::addChildPlatformWidget):
3873         (WebCore::ScrollView::removeChildPlatformWidget):
3874         * platform/qt/ScrollViewQt.cpp:
3875         (WebCore::ScrollView::geometryChanged):
3876         (WebCore::ScrollView::addChildPlatformWidget):
3877         (WebCore::ScrollView::removeChildPlatformWidget):
3878         * platform/win/ScrollViewWin.cpp:
3879         (WebCore::ScrollView::geometryChanged):
3880         (WebCore::ScrollView::setParentVisible):
3881         (WebCore::ScrollView::show):
3882         (WebCore::ScrollView::hide):
3883         * platform/wx/ScrollViewWx.cpp:
3884         (WebCore::ScrollView::addChildPlatformWidget):
3885         (WebCore::ScrollView::removeChildPlatformWidget):
3886
3887 2008-09-25  Dan Bernstein  <mitz@apple.com>
3888
3889         Reviewed by Dave Hyatt.
3890
3891         - fix https://bugs.webkit.org/show_bug.cgi?id=21024
3892           <rdar://problem/6240821> Scrollbar not painted until hovered
3893
3894         * rendering/RenderWidget.cpp:
3895         (WebCore::RenderWidget::setWidgetGeometry): Replaced resizeWidget with
3896         this method, which sets both the location and the size.
3897         (WebCore::RenderWidget::setWidget): Replaced the call to resizeWidget
3898         with a call to the new method setWidgetGeometry. Positioning the
3899         widget correctly ensures that the scroll bars invalidate correctly when
3900         they are created and resized.
3901         * rendering/RenderWidget.h:
3902
3903 2008-09-24  Dan Bernstein  <mitz@apple.com>
3904
3905         Rubber-stamped by Sam Weinig.
3906
3907         - create a "style" subfolder under "rendering" and move style files to that folder
3908
3909         * WebCore.vcproj/WebCore.vcproj:
3910
3911 2008-09-24  Sam Weinig  <sam@webkit.org>
3912
3913         Reviewed by Maciej Stachowiak.
3914
3915         Remove staticFunctionGetter.  There is only one remaining user of
3916         staticFunctionGetter and it can be converted to use setUpStaticFunctionSlot.
3917
3918         * bindings/js/JSDOMWindowBase.cpp:
3919         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
3920
3921 2008-09-24  Jeremy Moskovich  <jeremy@chromium.org>
3922
3923         Reviewed by Dan Bernstein.
3924
3925         Test: editing/spelling/inline_spelling_markers.html
3926         
3927         - https://bugs.webkit.org/show_bug.cgi?id=20092
3928         Spelling markers positioned incorrectly in RTL text
3929
3930         Measure spelling markers with selectionRectForText() to fix RTL.
3931
3932         This patch also fixes hit-testing for spelling marker tool tips,
3933         which used to work only on the first line.
3934
3935         * rendering/InlineTextBox.cpp:
3936         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3937
3938 2008-09-24  David Hyatt  <hyatt@apple.com>
3939
3940         https://bugs.webkit.org/show_bug.cgi?id=21074
3941
3942         Make sure the viewless scrollbar knows how to paint properly when transformed.
3943
3944         Reviewed by Sam Weinig
3945
3946         * platform/mac/ScrollbarThemeMac.mm:
3947         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
3948         (WebCore::ScrollbarThemeMac::paint):
3949
3950 2008-09-24  Nikolas Zimmermann  <zimmermann@kde.org>
3951
3952         Not reviewed. Try to fix win build.
3953
3954         * bindings/js/JSSVGElementInstanceCustom.cpp:
3955         (WebCore::toJS):
3956         * dom/ContainerNodeAlgorithms.h:
3957         (WebCore::removeAllChildrenInContainer):
3958         (WebCore::appendChildToContainer):
3959         (WebCore::Private::addChildNodesToDeletionQueue):
3960
3961 2008-09-24  Nikolas Zimmermann  <zimmermann@kde.org>
3962
3963         Reviewed by Oliver.
3964
3965         Add ContainerNodeAlgorithms.h, as central place to share algorithms
3966         operating on TreeShared-derived classes with a Node-style interface.
3967
3968         This allows SVGElementInstance & ContainerNode to share code.
3969
3970         * dom/ContainerNode.cpp:
3971         (WebCore::ContainerNode::removeAllChildren):
3972         (WebCore::ContainerNode::addChild):
3973         * dom/ContainerNode.h:
3974         * dom/ContainerNodeAlgorithms.h: Added.
3975         (WebCore::removeAllChildrenInContainer):
3976         (WebCore::appendChildToContainer):
3977         (WebCore::Private::NodeRemovalDispatcher::dispatch):
3978         (WebCore::Private::addChildNodesToDeletionQueue):
3979
3980 2008-09-24  Simon Fraser  <simon.fraser@apple.com>
3981
3982         Reviewed by Dave Hyatt
3983
3984         Wrap up dirtying the z-order list of the stacking context
3985         RenderLayer into a method.
3986         https://bugs.webkit.org/show_bug.cgi?id=21072
3987
3988         * rendering/RenderLayer.cpp:
3989         (WebCore::RenderLayer::setHasVisibleContent):
3990         (WebCore::RenderLayer::addChild):
3991         (WebCore::RenderLayer::removeChild):
3992         (WebCore::RenderLayer::dirtyStackingContextZOrderLists):
3993         (WebCore::RenderLayer::styleChanged):
3994         * rendering/RenderLayer.h:
3995         * rendering/RenderObject.cpp:
3996         (WebCore::RenderObject::setStyle):
3997
3998 2008-09-24  Kevin McCullough  <kmccullough@apple.com>
3999
4000         Reviewed by Tim.
4001
4002         Bug 21070: REGRESSION Repeated messages with arguments are not repeated
4003         or displayed multiple times
4004         - The Insepctor Controller was comparing JSValue pointers so thought the
4005         message was not a repeat, but the JS of the inspector compared the
4006         strings and so knew it was the same message and so overwrote the old
4007         message.
4008
4009         * page/InspectorController.cpp:
4010         (WebCore::ConsoleMessage::isEqual):
4011         (WebCore::InspectorController::addMessageToConsole):
4012         (WebCore::InspectorController::addConsoleMessage):
4013         (WebCore::InspectorController::startGroup):
4014         (WebCore::InspectorController::endGroup):
4015         * page/InspectorController.h:
4016
4017 2008-09-24  David Hyatt  <hyatt@apple.com>
4018
4019         Make sure the viewless Mac scrollbar responds properly to system preference changes (including the
4020         arrow placement preference and the thumb jump preference).
4021
4022         Reviewed by Adam Roben
4023
4024         * platform/Scrollbar.cpp:
4025         (WebCore::Scrollbar::Scrollbar):
4026         (WebCore::Scrollbar::~Scrollbar):
4027         * platform/ScrollbarTheme.h:
4028         (WebCore::ScrollbarTheme::registerScrollbar):
4029         (WebCore::ScrollbarTheme::unregisterScrollbar):
4030         * platform/mac/ScrollbarThemeMac.h:
4031         * platform/mac/ScrollbarThemeMac.mm:
4032         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
4033         (+[ScrollbarPrefsObserver behaviorPrefsChanged:]):
4034         (+[ScrollbarPrefsObserver registerAsObserver]):
4035         (WebCore::ScrollbarThemeMac::registerScrollbar):
4036         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
4037         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
4038         (WebCore::ScrollbarThemeMac::preferencesChanged):
4039
4040 2008-09-24  Rob Buis  <buis@kde.org>
4041
4042         Reviewed by Darin.
4043
4044         https://bugs.webkit.org/show_bug.cgi?id=20557
4045         getScreenCTM() returns wrong values
4046
4047         Use the absolute position of the svg root when
4048         determining the screen ctm.
4049
4050         Test: svg/custom/getscreenctm-in-mixed-content2.xhtml
4051
4052         * svg/SVGSVGElement.cpp:
4053         (WebCore::SVGSVGElement::getScreenCTM):
4054
4055 2008-09-24  David Hyatt  <hyatt@apple.com>
4056
4057         Turn off support for CSS variables.
4058
4059         * ChangeLog:
4060         * css/CSSParser.cpp:
4061         (WebCore::CSSParser::createVariablesRule):
4062         (WebCore::CSSParser::addVariable):
4063         (WebCore::CSSParser::addVariableDeclarationBlock):
4064
4065 2008-09-24  David Hyatt  <hyatt@apple.com>
4066
4067         Back out the alternate forms of CSS variable call syntax (leaving only the -webkit-var version).
4068
4069         * css/CSSGrammar.y:
4070         * css/CSSParserValues.cpp:
4071         (WebCore::CSSParserValue::isVariable):
4072         * css/CSSPrimitiveValue.cpp:
4073         (WebCore::CSSPrimitiveValue::cleanup):
4074         (WebCore::CSSPrimitiveValue::getStringValue):
4075         (WebCore::CSSPrimitiveValue::cssText):
4076         (WebCore::CSSPrimitiveValue::parserValue):
4077         * css/CSSPrimitiveValue.h:
4078         (WebCore::CSSPrimitiveValue::):
4079         (WebCore::CSSPrimitiveValue::isVariable):
4080
4081 2008-09-24  Timothy Hatcher  <timothy@apple.com>
4082
4083         Fixes a regression where the "incorrect MIME-type" warning would not
4084         show up correctly in the Console or the resources sidebar.
4085
4086         Reviewed by Kevin McCullough.
4087
4088         * page/inspector/Resource.js:
4089         (WebInspector.Resource.prototype._addTip): Add the repeat count argument
4090         to the WebInspector.ConsoleMessage constructor call.
4091         (WebInspector.Resource.prototype._checkWarning): Ditto.
4092
4093 2008-09-23  Tor Arne Vestbø  <tavestbo@trolltech.com>
4094
4095         Reviewed by Simon.
4096
4097         Remove deprecated JS Qt bindings object call/construct code and fix autotests
4098
4099         * bridge/qt/qt_instance.cpp:
4100         (JSC::Bindings::QtInstance::QtInstance):
4101         * bridge/qt/qt_instance.h:
4102
4103 2008-09-23  Julien Chaffraix  <jchaffraix@pleyo.com>
4104
4105         Reviewed by Alp Toker. Landed by Jan Alonzo.
4106
4107         Bug 20883: [CURL] Add deferred loading
4108         https://bugs.webkit.org/show_bug.cgi?id=20883
4109
4110         Implement deferred loading for the libcURL backend using curl_easy_pause.
4111         As the method was introduced in version 7.18.0, all the code checks for libcURL
4112         version.
4113
4114         * platform/network/curl/ResourceHandleCurl.cpp:
4115         (WebCore::ResourceHandle::setDefersLoading):
4116         * platform/network/curl/ResourceHandleManager.cpp:
4117         (WebCore::writeCallback): Add an assertion that deferred loading is not
4118         activated.
4119         (WebCore::headerCallback): Ditto.
4120         (WebCore::readCallback): Ditto.
4121         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Force
4122         defersLoading to be false in order to avoid triggering an assertion.
4123         (WebCore::ResourceHandleManager::initializeHandle): If deferred loading is
4124         activated, pause the easy handle.
4125
4126 2008-09-23  Matt Lilek  <webkit@mattlilek.com>
4127
4128         Reviewed by Tim Hatcher.
4129
4130         Inspector search field style tweaks.
4131
4132         * page/inspector/inspector.css:
4133
4134 2008-09-23  Nikolas Zimmermann  <zimmermann@kde.org>
4135
4136         Reviewed by Eric.
4137
4138         Fixes: https://bugs.webkit.org/show_bug.cgi?id=21046 (Several LayoutTests crash)
4139
4140         Fix missing negation in EventTargetNode::insertedIntoDocument.
4141         Made handleLocalEvents() virtual again, HTMLFormElement overrides it.
4142         Remove code, that wasn't supposed to go in in dispatchGenericEvent().
4143
4144         * dom/EventTargetNode.cpp:
4145         (WebCore::EventTargetNode::insertedIntoDocument):
4146         (WebCore::EventTargetNode::dispatchGenericEvent):
4147         * dom/EventTargetNode.h:
4148
4149 2008-09-23  Timothy Hatcher  <timothy@apple.com>
4150
4151         Adds search support to the Profiles panel.
4152
4153         The Profiles panel supports a few types of queries:
4154          * Standard string matching for function names and file URLs.
4155          * Greater than and less than search for numeric columns.
4156            So a query of ">24" will match all rows that have calls
4157            greater than 24. Or "<=42" will match all 42 or less.
4158          * Percent and time units. Adding a unit of "s", "ms" or "%"
4159            is supported and will match only the Self and Total columns.
4160            So a query of ">1.25s" will match all rows that took longer
4161            than 1.25 seconds.
4162
4163         Reviewed by Oliver Hunt.
4164
4165         * page/inspector/ProfileView.js:
4166         (WebInspector.ProfileView.prototype.hide): Reset _currentSearchResultIndex to -1. So the next time
4167         it will start at the first result.
4168         (WebInspector.ProfileView.prototype.refreshShowAsPercents): Moved from the bottom of the file.
4169         (WebInspector.ProfileView.prototype.searchCanceled): Clear the search properties and refresh highlighted
4170         data grid nodes.
4171         (WebInspector.ProfileView.prototype.performSearch): Search the profile nodes.
4172         (WebInspector.ProfileView.prototype.jumpToFirstSearchResult): Does what the function says. Calls _jumpToSearchResult.
4173         (WebInspector.ProfileView.prototype.jumpToLastSearchResult): Ditto.
4174         (WebInspector.ProfileView.prototype.jumpToNextSearchResult): Ditto.
4175         (WebInspector.ProfileView.prototype.jumpToPreviousSearchResult): Ditto.
4176         (WebInspector.ProfileView.prototype.showingFirstSearchResult): Does what the function says.
4177         (WebInspector.ProfileView.prototype.showingLastSearchResult): Ditto.
4178         (WebInspector.ProfileView.prototype._jumpToSearchResult): Select and reveal the profile node.
4179         Expand all the ancestors first so the profile node will have a DataGridNode.
4180         (WebInspector.ProfileView.prototype._changeView): Perform the search again on the new tree.
4181         (WebInspector.ProfileDataGridNode.prototype.createCell): Add the highlight class to cells that
4182         have search matches.
4183         * page/inspector/ProfilesPanel.js:
4184         (WebInspector.ProfilesPanel.prototype.reset): Call searchCanceled and delete the currentQuery.
4185         (WebInspector.ProfilesPanel.prototype.showProfile): Use profileViewForProfile.
4186         (WebInspector.ProfilesPanel.prototype.showView): Call showProfile. Used by Panel to show a view.
4187         (WebInspector.ProfilesPanel.prototype.profileViewForProfile): Create the ProfileView if needed.
4188         (WebInspector.ProfilesPanel.prototype.closeVisibleView): Renamed visibleProfileView  to visibleView.
4189         (WebInspector.ProfilesPanel.prototype.get searchableViews): Return all the views.
4190         (WebInspector.ProfilesPanel.prototype.searchMatchFound): Update the sidebar search matches.
4191         (WebInspector.ProfilesPanel.prototype.searchCanceled): Clear all the sidebar search matches.
4192         (WebInspector.ProfileSidebarTreeElement.prototype.set searchMatches): Set the class and bubbleText.
4193         * page/inspector/inspector.css: New style rules for the cell highlight color.
4194
4195 2008-09-23  Timothy Hatcher  <timothy@apple.com>
4196
4197         Adds search support to the Resources and Scripts panels.
4198
4199         https://bugs.webkit.org/show_bug.cgi?id=21005
4200
4201         Reviewed by Oliver Hunt.
4202
4203         * page/inspector/Images/searchSmallBlue.png: Added.
4204         * page/inspector/Images/searchSmallBrightBlue.png: Added.
4205         * page/inspector/Images/searchSmallGray.png: Added.
4206         * page/inspector/Images/searchSmallWhite.png: Added.
4207         * page/inspector/ResourceView.js:
4208         (WebInspector.ResourceView.prototype.attach): Attempt to attach to "resource-views"
4209         or "script-resource-views" since one might not be created yet.
4210         * page/inspector/ResourcesPanel.js:
4211         (WebInspector.ResourcesPanel.prototype.show): Hide any views that are visible that
4212         are not this panel's current visible view. This can happen when a ResourceView is
4213         visible in the Scripts panel then switched to the this panel.
4214         (WebInspector.ResourcesPanel.prototype.get searchableViews): Return all views, with the
4215         visibleView first.
4216         (WebInspector.ResourcesPanel.prototype.searchResultsSortFunction): Return a sort function
4217         that uses the current graph search function. So cycling through results will be in the order
4218         things appear in the sidebar.
4219         (WebInspector.ResourcesPanel.prototype.searchMatchFound): Update the search matches on the
4220         resource's sidebar tree element.
4221         (WebInspector.ResourcesPanel.prototype.searchCanceled): Restore the error and warning bubbles
4222         in the sidebar. Calls the Panel prototype's searchCanceled.
4223         (WebInspector.ResourcesPanel.prototype.performSearch): Hide all the error and warning bubbles
4224         in the sidebar. Calls the Panel prototype's performSearch.
4225         (WebInspector.ResourcesPanel.prototype.reset): Call searchCanceled and delete the currentQuery.
4226         (WebInspector.ResourcesPanel.prototype.addMessageToResource): Don't call updateErrorsAndWarnings
4227         if there is a current search query.
4228         (WebInspector.ResourcesPanel.prototype.clearMessages): Ditto.
4229         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded): Ditto.
4230         (WebInspector.ResourcesPanel.prototype.showView): Call showResource. Used by Panel to show a view.
4231         (WebInspector.ResourceSidebarTreeElement.prototype.resetBubble): Clear all the classes and content.
4232         (WebInspector.ResourceSidebarTreeElement.prototype.set searchMatches): Set the bubbleText and class.
4233         (WebInspector.ResourceSidebarTreeElement.prototype.updateErrorsAndWarnings): Call resetBubble.
4234         * page/inspector/ScriptView.js:
4235         (WebInspector.ScriptView): Set _sourceFrameSetup to flase.
4236         (WebInspector.ScriptView.prototype.hide): Reset _currentSearchResultIndex to -1. So the next time
4237         it will start at the first result.
4238         (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded): Add an event listener for "syntax
4239         highlighting complete".
4240         (WebInspector.ScriptView.prototype): Share many methods with SourceView.
4241         * page/inspector/ScriptsPanel.js:
4242         (WebInspector.ScriptsPanel.prototype.show): Hide any views that are visible that are not this
4243         This can happen when a ResourceView is visible in the Resources pane