Add a mechanism to store and retrieve preferences for the Web Inspector.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-10-24  Timothy Hatcher  <timothy@apple.com>
2
3         Add a mechanism to ask the InspectorClient for key/value setting pairs.
4         These settings can be strings, numbers, booleans or string vectors. The
5         settings are also bridged to and from JavaScript.
6
7         https://bugs.webkit.org/show_bug.cgi?id=21856
8
9         Reviewed by Darin Adler.
10
11         * WebCore.base.exp: Expose the String CFStringRef constructor.
12         * inspector/InspectorClient.h:
13         (WebCore::InspectorClient::populateSetting): Added, pure virtual.
14         (WebCore::InspectorClient::storeSetting): Ditto.
15         (WebCore::InspectorClient::removeSetting): Ditto.
16         * inspector/InspectorController.cpp:
17         (WebCore::setting): Calls InspectorController::setting and wraps the result in script types.
18         (WebCore::setSetting): Calls InspectorController::setSetting after converting from script types.
19         (WebCore::InspectorController::InspectorController): Increment a global static
20         to track the number of live InspectorControllers.
21         (WebCore::InspectorController::~InspectorController): Decrement the global static
22         that tracks the number of live InspectorControllers. Delete the setting cache if there
23         are no more live controllers.
24         (WebCore::InspectorController::setting): Check the cache and return the setting from there,
25         otherwise make a new Setting and ask the client to populate it.
26         (WebCore::InspectorController::setSetting): Change the cache and ask the client to store it.
27         (WebCore::InspectorController::windowScriptObjectAvailable): Add setting and setSetting
28         to the InspectorController script class.
29         * inspector/InspectorController.h:
30         (WebCore::InspectorController::Setting::Setting):
31         (WebCore::InspectorController::Setting::operator=):
32         (WebCore::InspectorController::Setting::type): Return m_type.
33         (WebCore::InspectorController::Setting::string): Return m_string. Assert the type is correct.
34         (WebCore::InspectorController::Setting::stringVector): Return m_stringVector.
35         Assert the type is correct.
36         (WebCore::InspectorController::Setting::doubleValue): Return m_simpleContent.m_double.
37         Assert the type is correct.
38         (WebCore::InspectorController::Setting::integerValue): Return m_simpleContent.m_integer.
39         Assert the type is correct.
40         (WebCore::InspectorController::Setting::booleanValue): Return m_simpleContent.m_boolean.
41         Assert the type is correct.
42         (WebCore::InspectorController::Setting::set): Overloaded for each data type, sets the right
43         field and the type.
44         * loader/EmptyClients.h:
45         (WebCore::EmptyInspectorClient::populateSetting): Added, empty method.
46         (WebCore::EmptyInspectorClient::storeSetting): Ditto.
47         (WebCore::EmptyInspectorClient::removeSetting): Ditto.
48
49 2008-10-24  Cameron Zwarich  <zwarich@apple.com>
50
51         Reviewed by Sam Weinig.
52
53         Remove some C-style casts.
54
55         * html/HTMLViewSourceDocument.cpp:
56         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
57
58 2008-10-24  Darin Adler  <darin@apple.com>
59
60         - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
61
62         * bindings/js/JSAttrCustom.cpp:
63         * bindings/js/JSCSSRuleCustom.cpp:
64         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
65         * bindings/js/JSCSSValueCustom.cpp:
66         * bindings/js/JSCanvasPixelArrayCustom.h:
67         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
68         * bindings/js/JSClipboardCustom.cpp:
69         * bindings/js/JSConsoleCustom.cpp:
70         * bindings/js/JSCustomSQLStatementCallback.cpp:
71         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
72         * bindings/js/JSCustomSQLTransactionCallback.cpp:
73         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
74         * bindings/js/JSCustomVoidCallback.cpp:
75         * bindings/js/JSCustomVoidCallback.h:
76         * bindings/js/JSCustomXPathNSResolver.cpp:
77         * bindings/js/JSCustomXPathNSResolver.h:
78         * bindings/js/JSDOMApplicationCacheCustom.cpp:
79         * bindings/js/JSDOMBinding.cpp:
80         * bindings/js/JSDOMBinding.h:
81         * bindings/js/JSDOMWindowBase.cpp:
82         * bindings/js/JSDOMWindowBase.h:
83         * bindings/js/JSDOMWindowCustom.cpp:
84         * bindings/js/JSDOMWindowCustom.h:
85         * bindings/js/JSDOMWindowShell.cpp:
86         * bindings/js/JSDOMWindowShell.h:
87         * bindings/js/JSDatabaseCustom.cpp:
88         * bindings/js/JSDedicatedWorkerCustom.cpp:
89         * bindings/js/JSDocumentCustom.cpp:
90         * bindings/js/JSElementCustom.cpp:
91         * bindings/js/JSEventCustom.cpp:
92         * bindings/js/JSEventListener.cpp:
93         * bindings/js/JSEventTarget.cpp:
94         * bindings/js/JSEventTarget.h:
95         * bindings/js/JSEventTargetBase.h:
96         * bindings/js/JSEventTargetNodeCustom.cpp:
97         * bindings/js/JSHTMLAllCollection.h:
98         * bindings/js/JSHTMLAppletElementCustom.cpp:
99         * bindings/js/JSHTMLCollectionCustom.cpp:
100         * bindings/js/JSHTMLDocumentCustom.cpp:
101         * bindings/js/JSHTMLEmbedElementCustom.cpp:
102         * bindings/js/JSHTMLFormElementCustom.cpp:
103         * bindings/js/JSHTMLFrameElementCustom.cpp:
104         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
105         * bindings/js/JSHTMLIFrameElementCustom.cpp:
106         * bindings/js/JSHTMLInputElementCustom.cpp:
107         * bindings/js/JSHTMLObjectElementCustom.cpp:
108         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
109         * bindings/js/JSHTMLSelectElementCustom.cpp:
110         * bindings/js/JSHTMLSelectElementCustom.h:
111         * bindings/js/JSHistoryCustom.cpp:
112         * bindings/js/JSImageDataCustom.cpp:
113         * bindings/js/JSInspectedObjectWrapper.cpp:
114         * bindings/js/JSInspectedObjectWrapper.h:
115         * bindings/js/JSInspectorCallbackWrapper.cpp:
116         * bindings/js/JSInspectorCallbackWrapper.h:
117         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
118         * bindings/js/JSLocationCustom.cpp:
119         * bindings/js/JSMessagePortCustom.cpp:
120         * bindings/js/JSMimeTypeArrayCustom.cpp:
121         * bindings/js/JSNamedNodeMapCustom.cpp:
122         * bindings/js/JSNamedNodesCollection.cpp:
123         * bindings/js/JSNamedNodesCollection.h:
124         * bindings/js/JSNavigatorCustom.cpp:
125         * bindings/js/JSNodeCustom.cpp:
126         * bindings/js/JSNodeFilterCondition.cpp:
127         * bindings/js/JSNodeFilterCondition.h:
128         * bindings/js/JSNodeFilterCustom.cpp:
129         * bindings/js/JSNodeIteratorCustom.cpp:
130         * bindings/js/JSNodeListCustom.cpp:
131         * bindings/js/JSPluginArrayCustom.cpp:
132         * bindings/js/JSPluginCustom.cpp:
133         * bindings/js/JSPluginElementFunctions.cpp:
134         * bindings/js/JSPluginElementFunctions.h:
135         * bindings/js/JSQuarantinedObjectWrapper.cpp:
136         * bindings/js/JSQuarantinedObjectWrapper.h:
137         * bindings/js/JSRGBColor.cpp:
138         * bindings/js/JSRGBColor.h:
139         * bindings/js/JSSQLResultSetRowListCustom.cpp:
140         * bindings/js/JSSQLTransactionCustom.cpp:
141         * bindings/js/JSSVGElementInstanceCustom.cpp:
142         * bindings/js/JSSVGLengthCustom.cpp:
143         * bindings/js/JSSVGMatrixCustom.cpp:
144         * bindings/js/JSSVGPathSegCustom.cpp:
145         * bindings/js/JSSVGPathSegListCustom.cpp:
146         * bindings/js/JSSVGPointListCustom.cpp:
147         * bindings/js/JSSVGTransformListCustom.cpp:
148         * bindings/js/JSStorageCustom.cpp:
149         * bindings/js/JSStyleSheetCustom.cpp:
150         * bindings/js/JSStyleSheetListCustom.cpp:
151         * bindings/js/JSTextCustom.cpp:
152         * bindings/js/JSTreeWalkerCustom.cpp:
153         * bindings/js/JSXMLHttpRequestCustom.cpp:
154         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
155         * bindings/js/JSXSLTProcessorCustom.cpp:
156         * bindings/js/ScheduledAction.cpp:
157         * bindings/js/ScheduledAction.h:
158         * bindings/js/ScriptController.cpp:
159         * bindings/js/ScriptController.h:
160         * bindings/objc/WebScriptObject.mm:
161         * bindings/objc/WebScriptObjectPrivate.h:
162         * bindings/scripts/CodeGeneratorJS.pm:
163         * bridge/NP_jsobject.cpp:
164         * bridge/c/c_instance.cpp:
165         * bridge/c/c_instance.h:
166         * bridge/c/c_runtime.cpp:
167         * bridge/c/c_runtime.h:
168         * bridge/c/c_utility.cpp:
169         * bridge/c/c_utility.h:
170         * bridge/jni/jni_instance.cpp:
171         * bridge/jni/jni_instance.h:
172         * bridge/jni/jni_jsobject.h:
173         * bridge/jni/jni_jsobject.mm:
174         * bridge/jni/jni_objc.mm:
175         * bridge/jni/jni_runtime.cpp:
176         * bridge/jni/jni_runtime.h:
177         * bridge/jni/jni_utility.cpp:
178         * bridge/jni/jni_utility.h:
179         * bridge/objc/WebScriptObject.h:
180         * bridge/objc/objc_class.h:
181         * bridge/objc/objc_class.mm:
182         * bridge/objc/objc_instance.h:
183         * bridge/objc/objc_instance.mm:
184         * bridge/objc/objc_runtime.h:
185         * bridge/objc/objc_runtime.mm:
186         * bridge/objc/objc_utility.h:
187         * bridge/objc/objc_utility.mm:
188         * bridge/qt/qt_class.cpp:
189         * bridge/qt/qt_class.h:
190         * bridge/qt/qt_instance.cpp:
191         * bridge/qt/qt_instance.h:
192         * bridge/qt/qt_runtime.cpp:
193         * bridge/qt/qt_runtime.h:
194         * bridge/runtime.cpp:
195         * bridge/runtime.h:
196         * bridge/runtime_array.cpp:
197         * bridge/runtime_array.h:
198         * bridge/runtime_method.cpp:
199         * bridge/runtime_method.h:
200         * bridge/runtime_object.cpp:
201         * bridge/runtime_object.h:
202         * bridge/testqtbindings.cpp:
203         * inspector/JavaScriptCallFrame.cpp:
204         * inspector/JavaScriptCallFrame.h:
205         * inspector/JavaScriptProfile.cpp:
206         * inspector/JavaScriptProfile.h:
207         * inspector/JavaScriptProfileNode.cpp:
208         * inspector/JavaScriptProfileNode.h:
209         * loader/FrameLoader.cpp:
210         * loader/FrameLoader.h:
211         * page/Console.cpp:
212         * page/Console.h:
213         * plugins/MimeTypeArray.h:
214         * plugins/Plugin.h:
215         * plugins/PluginArray.h:
216         * plugins/PluginView.cpp:
217         * xml/XMLHttpRequest.cpp:
218         Use JSValue* instead of JSValuePtr.
219
220 2008-10-24  Simon Hausmann  <hausmann@webkit.org>
221
222         Fix the Qt build.
223
224         * bridge/qt/qt_instance.cpp:
225         (JSC::Bindings::QtField::valueFromInstance):
226
227 2008-10-24  David Kilzer  <ddkilzer@apple.com>
228
229         Rolled out r37840 and r37841.
230
231         * DerivedSources.make:
232         * GNUmakefile.am:
233         * WebCore.pro:
234         * WebCore.vcproj/WebCore.vcproj:
235         * WebCore.xcodeproj/project.pbxproj:
236         * WebCoreSources.bkl:
237         * bindings/js/JSCustomPositionCallback.cpp: Removed.
238         * bindings/js/JSCustomPositionCallback.h: Removed.
239         * bindings/js/JSCustomPositionErrorCallback.cpp: Removed.
240         * bindings/js/JSCustomPositionErrorCallback.h: Removed.
241         * bindings/js/JSDOMBinding.cpp:
242         * bindings/js/JSDOMBinding.h:
243         * bindings/js/JSDOMWindowCustom.cpp:
244         (WebCore::markDOMObjectWrapper):
245         * bindings/js/JSGeolocationCustom.cpp: Removed.
246         * bindings/js/JSNavigatorCustom.cpp:
247         * dom/Document.cpp:
248         (WebCore::Document::Document):
249         * dom/Document.h:
250         * loader/FrameLoader.cpp:
251         (WebCore::FrameLoader::canCachePage):
252         * page/Geolocation.cpp: Removed.
253         * page/Geolocation.h: Removed.
254         * page/Geolocation.idl: Removed.
255         * page/Geoposition.cpp: Removed.
256         * page/Geoposition.h: Removed.
257         * page/Geoposition.idl: Removed.
258         * page/Navigator.cpp:
259         (WebCore::Navigator::disconnectFrame):
260         * page/Navigator.h:
261         * page/Navigator.idl:
262         * page/PositionCallback.h: Removed.
263         * page/PositionCallback.idl: Removed.
264         * page/PositionError.h: Removed.
265         * page/PositionError.idl: Removed.
266         * page/PositionErrorCallback.h: Removed.
267         * page/PositionErrorCallback.idl: Removed.
268         * page/PositionOptions.h: Removed.
269         * page/PositionOptions.idl: Removed.
270         * platform/GeolocationService.cpp: Removed.
271         * platform/GeolocationService.h: Removed.
272
273 2008-10-23  David Kilzer  <ddkilzer@apple.com>
274
275         Attempt to fix GTK build.
276
277         * GNUmakefile.am: Added new *.idl files that were missing.
278
279 2008-10-23  Greg Bolsinga  <bolsinga@apple.com>
280
281         Reviewed by Sam Weinig.
282
283         https://bugs.webkit.org/show_bug.cgi?id=21475
284         
285         Provide support for the Geolocation API
286         
287         http://dev.w3.org/geo/api/spec-source.html
288
289         Test: geolocation/geolocation-not-implemented.html
290
291         * DerivedSources.make:
292         * GNUmakefile.am: Added Geolocation support
293         * WebCore.pro: Added Geolocation support
294         * WebCore.vcproj/WebCore.vcproj: Added Geolocation support
295         * WebCore.xcodeproj/project.pbxproj: Added Geolocation support
296         * WebCoreSources.bkl: Added Geolocation support
297         * bindings/js/JSCustomPositionCallback.cpp: Added.
298         (WebCore::JSCustomPositionCallback::JSCustomPositionCallback):
299         (WebCore::JSCustomPositionCallback::handleEvent):
300         * bindings/js/JSCustomPositionCallback.h: Added.
301         (WebCore::JSCustomPositionCallback::create):
302         * bindings/js/JSCustomPositionErrorCallback.cpp: Added.
303         (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback):
304         (WebCore::JSCustomPositionErrorCallback::handleEvent):
305         * bindings/js/JSCustomPositionErrorCallback.h: Added.
306         (WebCore::JSCustomPositionErrorCallback::create):
307         * bindings/js/JSDOMBinding.cpp: move markDOMObjectWrapper here from JSDOMWindowCustom
308         (WebCore::markDOMObjectWrapper):
309         * bindings/js/JSDOMBinding.h: move markDOMObjectWrapper here from JSDOMWindowCustom
310         * bindings/js/JSDOMWindowCustom.cpp: move markDOMObjectWrapper to JSDOMBinding
311         * bindings/js/JSGeolocationCustom.cpp: Added.
312         (WebCore::JSGeolocation::getCurrentPosition):
313         (WebCore::JSGeolocation::watchPosition):
314         * bindings/js/JSNavigatorCustom.cpp: handle marking Geolocation
315         (WebCore::JSNavigator::mark):
316         * dom/Document.cpp:
317         (WebCore::Document::Document):
318         * dom/Document.h:
319         (WebCore::Document::setUsingGeolocation):
320         (WebCore::Document::usingGeolocation):
321         * loader/FrameLoader.cpp: don't add to back forward cache if using Geolocation
322         (WebCore::FrameLoader::canCachePage):
323         * page/Geolocation.cpp: Added.
324         (WebCore::Geolocation::GeoNotifier::GeoNotifier):
325         (WebCore::Geolocation::GeoNotifier::timerFired):
326         (WebCore::Geolocation::Geolocation):
327         (WebCore::Geolocation::disconnectFrame):
328         (WebCore::Geolocation::getCurrentPosition):
329         (WebCore::Geolocation::watchPosition):
330         (WebCore::Geolocation::clearWatch):
331         (WebCore::Geolocation::stopUpdatingIfEmpty):
332         (WebCore::Geolocation::sendErrorToOneShots):
333         (WebCore::Geolocation::sendErrorToWatchers):
334         (WebCore::Geolocation::sendPositionToOneShots):
335         (WebCore::Geolocation::sendPositionToWatchers):
336         (WebCore::Geolocation::handleError):
337         (WebCore::Geolocation::geolocationServicePositionChanged):
338         (WebCore::Geolocation::geolocationServiceErrorOccurred):
339         * page/Geolocation.h: Added.
340         (WebCore::Geolocation::create):
341         (WebCore::Geolocation::~Geolocation):
342         (WebCore::Geolocation::lastPosition):
343         (WebCore::Geolocation::GeoNotifier::create):
344         * page/Geolocation.idl: Added.
345         * page/Geoposition.cpp: Added.
346         (WebCore::Geoposition::toString):
347         * page/Geoposition.h: Added.
348         (WebCore::Geoposition::create):
349         (WebCore::Geoposition::latitude):
350         (WebCore::Geoposition::longitude):
351         (WebCore::Geoposition::altitude):
352         (WebCore::Geoposition::accuracy):
353         (WebCore::Geoposition::altitudeAccuracy):
354         (WebCore::Geoposition::heading):
355         (WebCore::Geoposition::velocity):
356         (WebCore::Geoposition::timestamp):
357         (WebCore::Geoposition::Geoposition):
358         * page/Geoposition.idl: Added.
359         * page/Navigator.cpp:
360         (WebCore::Navigator::disconnectFrame): disconnect Geolocation
361         (WebCore::Navigator::geolocation): accessor for Geolocation
362         * page/Navigator.h:
363         (WebCore::Navigator::optionalGeolocation): accessor for Geolocation
364         * page/Navigator.idl: accessor for Geolocation
365         * page/PositionCallback.h: Added.
366         (WebCore::PositionCallback::~PositionCallback):
367         * page/PositionCallback.idl: Added.
368         * page/PositionError.h: Added.
369         (WebCore::PositionError::):
370         (WebCore::PositionError::create):
371         (WebCore::PositionError::code):
372         (WebCore::PositionError::message):
373         (WebCore::PositionError::PositionError):
374         * page/PositionError.idl: Added.
375         * page/PositionErrorCallback.h: Added.
376         (WebCore::PositionErrorCallback::~PositionErrorCallback):
377         * page/PositionErrorCallback.idl: Added.
378         * page/PositionOptions.h: Added.
379         (WebCore::PositionOptions::create):
380         (WebCore::PositionOptions::enableHighAccuracy):
381         (WebCore::PositionOptions::setEnableHighAccuracy):
382         (WebCore::PositionOptions::timeout):
383         (WebCore::PositionOptions::setTimeout):
384         (WebCore::PositionOptions::PositionOptions):
385         * page/PositionOptions.idl: Added.
386         * platform/GeolocationService.cpp: Added.
387         (WebCore::GeolocationService::GeolocationService):
388         (WebCore::GeolocationService::positionChanged):
389         (WebCore::GeolocationService::errorOccurred):
390         * platform/GeolocationService.h: Added.
391         (WebCore::GeolocationServiceClient::~GeolocationServiceClient):
392         (WebCore::GeolocationServiceClient::geolocationServicePositionChanged):
393         (WebCore::GeolocationServiceClient::geolocationServiceErrorOccurred):
394         (WebCore::GeolocationService::~GeolocationService):
395
396 2008-10-23  Alp Toker  <alp@nuanti.com>
397
398         Fix typo in comment in previous commit. GTK -> GLIB
399
400         * platform/gtk/guriescape.c:
401
402 2008-10-23  Kalle Vahlman  <kalle.vahlman@movial.com>
403
404         Reviewed by Alp Toker.
405
406         https://bugs.webkit.org/show_bug.cgi?id=21824
407         [GTK] FileSystem abstraction uses features from Glib 2.16
408
409         Wrap g_uri_unescape_string() to fix building with pre-2.16 Glib
410
411         * platform/gtk/guriescape.c:
412         (unescape_character):
413         (_webcore_g_uri_unescape_segment):
414         (_webcore_g_uri_unescape_string):
415         * platform/gtk/guriescape.h:
416
417 2008-10-23  Jan Michael Alonzo  <jmalonzo@webkit.org>
418
419         Fix Gtk build typo introduced in http://trac.webkit.org/changeset/37826.
420
421         * GNUmakefile.am:
422
423 2008-10-23  Darin Fisher  <darin@chromium.org>
424
425         Reviewed by Eric Seidel.
426
427         m_frame null checked but then dereferenced
428         https://bugs.webkit.org/show_bug.cgi?id=21845
429
430         This error was found using a static analysis tool, and so I do not know
431         how to produce a null m_frame on entry to this method.  Hence, I have
432         not included a regression test.
433
434         * page/EventHandler.cpp:
435         (WebCore::EventHandler::allowDHTMLDrag): Add an early return.
436
437 2008-10-23  Dan Bernstein  <mitz@apple.com>
438
439         Reviewed by Sam Weinig with no hesitation.
440
441         - fix the HTML/CSS case of https://bugs.webkit.org/show_bug.cgi?id=19839
442           <rdar://problem/6304805> A PDF,RLE sequence that should be a no-op affects bidi reordering
443
444         Test: fast/text/bidi-embedding-pop-and-push-same.html
445
446         * platform/text/BidiResolver.h:
447         (WebCore::BidiResolver::embed): Changed to only add the embedding
448         operation to a vector of pending operations.
449
450         (WebCore::BidiResolver::lowerExplicitEmbeddingLevel): Added. Moved the
451         code that used to be in the PDF case of embed() here, except the part
452         that sets the context.
453
454         (WebCore::BidiResolver::raiseExplicitEmbeddingLevel): Added. Moved the
455         code that used to be in the non-PDF case of embed() here, except the
456         part the sets the context.
457
458         (WebCore::BidiResolver::commitExplicitEmbedding): Added. Processes the
459         explicit embedding operations in the vector by creating an updated
460         context and determining the old and new embedding levels. If the levels
461         are not the same, calls {lower,raise}ExplicitEmbeddingLevel(). Always
462         sets the context to the new one.
463
464         (WebCore::BidiResolver::createBidiRunsForLine): Added calls to
465         commitExplicitEmbedding() after calling embed() and after calling
466         increment().
467
468         * rendering/bidi.cpp:
469         (WebCore::bidiFirst): Added calls to commitExplicitEmbedding() because
470         this function increments the resolver.
471
472         (WebCore::RenderBlock::skipLeadingWhitespace): Ditto.
473
474 2008-10-23  Jan Michael Alonzo  <jmalonzo@webkit.org>
475
476         Gtk build fix. Not reviewed.
477
478         Add DNSCurl and DNSSoup to the Gtk build
479
480         * GNUmakefile.am:
481         * platform/gtk/TemporaryLinkStubs.cpp:
482         * platform/network/soup/DNSSoup.cpp: Copied from WebCore/platform/network/curl/DNSCurl.cpp.
483         (WebCore::prefetchDNS):
484
485 2008-10-23  Eric Seidel  <eric@webkit.org>
486
487         Reviewed by Sam Weinig.
488
489         Un-break the Darwin build.
490
491         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
492         * platform/graphics/cg/ImageCG.cpp:
493
494 2008-10-23  Darin Fisher  <darin@chromium.org>
495
496         Reviewed by Eric Seidel.
497
498         Fix forward decls to be struct instead of class.
499         https://bugs.webkit.org/show_bug.cgi?id=21838
500
501         * rendering/style/StyleRareInheritedData.h:
502         * rendering/style/StyleRareNonInheritedData.h:
503
504 2008-10-23  Brent Fulgham  <bfulgham@gmail.com>
505
506         Reviewed by Oliver Hunt.
507
508         * platform/network/curl/ResourceRequest.h:  A better implementation
509           of CFURLRequest, rather than void*.  This gives better compatibility 
510           with the WebKit.idl interface.
511         (WebCore::ResourceRequest::cfURLRequest):
512
513 2008-10-23  Mike Pinkerton  <pinkerton@chromium.org>
514
515         Reviewed by Eric Seidel.
516
517         PLATFORM(CHROMIUM) uses CG the same way PLATFORM(MAC) does so fix
518         ifdefs to reflect that.
519
520         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
521         * platform/graphics/cg/ImageCG.cpp:
522
523 2008-10-23  Peter Kasting  <pkasting@google.com>
524
525         Reviewed by Adam Roben.
526
527         https://bugs.webkit.org/show_bug.cgi?id=21833
528         Place JavaScript Debugger hooks under #if ENABLE(JAVASCRIPT_DEBUGGER).
529
530         * inspector/InspectorController.cpp:
531         (WebCore::InspectorController::InspectorController):
532         (WebCore::InspectorController::setWindowVisible):
533         (WebCore::InspectorController::windowScriptObjectAvailable):
534         (WebCore::InspectorController::close):
535         * inspector/InspectorController.h:
536         * page/Page.cpp:
537         (WebCore::Page::Page):
538
539 2008-10-23  Kevin McCullough  <kmccullough@apple.com>
540
541         Reviewed by Tim Hatcher.
542
543         https://bugs.webkit.org/show_bug.cgi?id=21817
544         Bug 21817: Manual profiler tests should be made into layout tests
545
546         -Moving the tests before diffing so that it's clear what changed.
547
548         * manual-tests/inspector/profiler-test-anonymous-event-handler.html: Removed.
549         * manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Removed.
550         * manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Removed.
551         * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Removed.
552         * manual-tests/inspector/profiler-test-apply.html: Removed.
553         * manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Removed.
554         * manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Removed.
555         * manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Removed.
556         * manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Removed.
557         * manual-tests/inspector/profiler-test-compare-multiple-profiles.html: Removed.
558         * manual-tests/inspector/profiler-test-constructor.html: Removed.
559         * manual-tests/inspector/profiler-test-dead-time.html: Removed.
560         * manual-tests/inspector/profiler-test-deep-recursion.html: Removed.
561         * manual-tests/inspector/profiler-test-document-dot-write.html: Removed.
562         * manual-tests/inspector/profiler-test-event-handler.html: Removed.
563         * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Removed.
564         * manual-tests/inspector/profiler-test-heavy-view.html: Removed.
565         * manual-tests/inspector/profiler-test-inline-event-handler.html: Removed.
566         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Removed.
567         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Removed.
568         * manual-tests/inspector/profiler-test-multiple-frames.html: Removed.
569         * manual-tests/inspector/profiler-test-multiple-windows.html: Removed.
570         * manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Removed.
571         * manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Removed.
572         * manual-tests/inspector/profiler-test-no-execution-context.html: Removed.
573         * manual-tests/inspector/profiler-test-one-execution-context.html: Removed.
574         * manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Removed.
575         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Removed.
576         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Removed.
577         * manual-tests/inspector/profiler-test-simple-event-call.html: Removed.
578         * manual-tests/inspector/profiler-test-simple-no-level-change.html: Removed.
579         * manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Removed.
580         * manual-tests/inspector/profiler-test-start-and-stop-profiling-in-the-same-function.html: Removed.
581         * manual-tests/inspector/profiler-test-start-but-dont-stop-profiling.html: Removed.
582         * manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html: Removed.
583         * manual-tests/inspector/profiler-test-stop-then-function-call.html: Removed.
584         * manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Removed.
585         * manual-tests/inspector/profiler-test-two-execution-contexts.html: Removed.
586         * manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Removed.
587         * manual-tests/inspector/profiler-test-window-dot-eval.html: Removed.
588         * manual-tests/inspector/resources/other-frame.html: Removed.
589         * manual-tests/inspector/resources/other-window.html: Removed.
590         * manual-tests/inspector/resources/profiler-test-JS-resources.js: Removed.
591
592 2008-10-23  Adam Barth  <abarth@webkit.org>
593
594         Reviewed by Sam Weinig.
595
596         https://bugs.webkit.org/show_bug.cgi?id=21826
597
598         Add accessor for SecurityOrigin::m_domainWasSetInDOM.
599
600         * page/SecurityOrigin.h:
601         (WebCore::SecurityOrigin::domainWasSetInDOM):
602
603 2008-10-23  Darin Adler  <darin@apple.com>
604
605         - roll out https://bugs.webkit.org/show_bug.cgi?id=21732
606
607         * bindings/js/ScheduledAction.h:
608         * inspector/InspectorController.cpp:
609         ProtectedPtr<JSValue> instead of ProtectedPtr<JSValuePtr>.
610
611 2008-10-23  Simon Hausmann  <hausmann@webkit.org>
612
613         Fix the Qt build.
614
615         * bridge/qt/qt_runtime.cpp:
616         (JSC::Bindings::QtConnectionObject::execute):
617         * bridge/qt/qt_runtime.h:
618         (JSC::Bindings::QtRuntimeMethod::createStructureID):
619
620 2008-10-23  Alexey Proskuryakov  <ap@webkit.org>
621
622         Reviewed by Maciej Stachowiak.
623
624         https://bugs.webkit.org/show_bug.cgi?id=21825
625         JSDOMBinding should not blindly cast the global object to JSDOMWindow
626
627         * bindings/js/JSDOMGlobalObject.cpp:
628         * bindings/js/JSDOMGlobalObject.h:
629         * GNUmakefile.am:
630         * WebCore.pro:
631         * WebCore.vcproj/WebCore.vcproj:
632         * WebCore.xcodeproj/project.pbxproj:
633         * WebCoreSources.bkl:
634         Added JSDOMGlobalObject, a base class to be used by both Window and worker contexts.
635
636         * bindings/js/JSDOMBinding.cpp:
637         (WebCore::getCachedDOMStructure):
638         (WebCore::cacheDOMStructure):
639         (WebCore::getCachedDOMConstructor):
640         (WebCore::cacheDOMConstructor):
641         Cast to JSDOMGlobalObject, as DOM objects live in DOM global objects.
642
643         * bindings/js/JSDOMWindowBase.cpp:
644         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
645         * bindings/js/JSDOMWindowBase.h:
646         * bindings/js/JSDOMWindowCustom.cpp:
647         (WebCore::JSDOMWindow::mark):
648         Moved constructor and structure tracking to JSDOMGlobalObject.
649
650 2008-10-23  Adam Barth  <abarth@webkit.org>
651
652         Reviewed by Sam Weinig.
653
654         https://bugs.webkit.org/show_bug.cgi?id=21787
655
656         Update postMessage to send origin = "null" for non-serializable
657         origins to match latest spec.  Merge SecurityOrigin::toString and
658         SecurityOrigin::toHTTPOrigin because they are now the same.
659
660         Test: http/tests/security/postMessage/data-url-sends-null-origin.html
661
662         * loader/FrameLoader.cpp:
663         (WebCore::FrameLoader::outgoingOrigin):
664         (WebCore::FrameLoader::loadURL):
665         (WebCore::FrameLoader::addHTTPOriginIfNeeded):
666         (WebCore::FrameLoader::loadItem):
667         * loader/loader.cpp:
668         (WebCore::Loader::Host::servePendingRequests):
669         * page/SecurityOrigin.cpp:
670         (WebCore::SecurityOrigin::toString):
671         * page/SecurityOrigin.h:
672         * xml/XMLHttpRequest.cpp:
673         (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
674         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
675         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
676         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
677
678 2008-10-22  David Kilzer  <ddkilzer@apple.com>
679
680         Bug 21781: WebCore::Settings should have a maximum decoded image size setting
681
682         <https://bugs.webkit.org/show_bug.cgi?id=21781>
683
684         Reviewed by Antti.
685
686         No tests since there is no change in behavior.
687
688         * loader/CachedImage.cpp:
689         (WebCore::CachedImage::maximumDecodedImageSize): Added.  Returns
690         WebCore::Settings::maximumDecodedImageSize() or 0 on error.
691         (WebCore::CachedImage::data): Flag an error if the image being
692         loaded is too big.
693         * loader/CachedImage.h:
694         (WebCore::CachedImage::maximumDecodedImageSize): Added declaration.
695         * page/Settings.cpp:
696         (WebCore::Settings::Settings): Initialize m_maximumDecodedImageSize
697         to the maximum value of size_t.
698         * page/Settings.h:
699         (WebCore::Settings::setMaximumDecodedImageSize): Added method.
700         (WebCore::Settings::maximumDecodedImageSize): Ditto.
701
702 2008-10-22  Mike Pinkerton  <pinkerton@chromium.org>
703
704         Reviewed by Dan Bernstein.
705         Landed and tweaked a bit by Darin Adler.
706
707         - fix https://bugs.webkit.org/show_bug.cgi?id=21809
708
709         Remove PLATFORM(MAC) wrapping USE(ATSUI). It's redundant and inhibits 
710         its use for PLATFORM(CHROMIUM) in the future.
711
712         * platform/graphics/SimpleFontData.h:
713
714 2008-10-22  David Smith  <catfish.man@gmail.com>
715
716         Reviewed by Anders Carlsson.
717                
718         https://bugs.webkit.org/show_bug.cgi?id=19974
719         getElementsByClassName not live enough
720
721         Test: fast/dom/getElementsByClassName/015.html
722
723         * dom/StyledElement.cpp:
724         (WebCore::StyledElement::classAttributeChanged): call dispatchSubtreeModifiedEvent()
725
726 2008-10-22  Darin Adler  <darin@apple.com>
727
728         Reviewed by Sam Weinig.
729
730         - fix https://bugs.webkit.org/show_bug.cgi?id=21294
731           Bug 21294: Devirtualize getOwnPropertySlot()
732
733         * bindings/js/JSDOMWindowShell.h:
734         (WebCore::JSDOMWindowShell::createStructureID): Added. Returns a structure without
735         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
736
737         * bindings/js/JSInspectorCallbackWrapper.cpp:
738         (WebCore::JSInspectorCallbackWrapper::wrap): Change to use a unique structure
739         for this class rather than sharing nullProtoStructureID, which no longer exists.
740
741         * bindings/js/JSNamedNodesCollection.h:
742         (WebCore::JSNamedNodesCollection::createStructureID): Added. Returns a structure without
743         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
744         * bindings/js/JSRGBColor.h:
745         (WebCore::JSRGBColor::createStructureID): Ditto.
746
747         * bindings/scripts/CodeGeneratorJS.pm: Added createStructureID functions for the wrappers,
748         constructors, and prototypes in any case where they override getOwnPropertySlot, without
749         HasStandardGetOwnPropertySlot.
750
751         * bridge/objc/objc_runtime.h:
752         (JSC::Bindings::ObjcFallbackObjectImp::createStructureID): Added. Returns a structure
753         without HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
754         * bridge/qt/qt_runtime.h:
755         (JSC::Bindings::QtRuntimeMethod::createStructureID): Ditto.
756         * bridge/runtime_array.h:
757         (JSC::RuntimeArray::createStructureID): Ditto.
758         * bridge/runtime_method.h:
759         (JSC::RuntimeMethod::createStructureID): Ditto.
760         * bridge/runtime_object.h:
761         (JSC::RuntimeObjectImp::createStructureID): Ditto.
762
763 2008-10-22  Brent Fulgham  <bfulgham@gmail.com>
764
765         Bring Windows Cairo Port's font handling in line with CG.
766         http://bugs.webkit.org/show_bug.cgi?id=21812.
767
768         Reviewed by Adam Roben.
769
770         * platform/graphics/win/FontCacheWin.cpp:
771         (WebCore::createGDIFont): Remove unnecessary special-case for Cairo
772         TrueType font search. It should match CG in all font selections.
773
774 2008-10-22  Brent Fulgham  <bfulgham@gmail.com>
775
776         http://bugs.webkit.org/show_bug.cgi?id=21812.
777         Bring Windows Cairo Port's font handling in line with CG.
778
779         Reviewed by David Hyatt.
780
781         * platform/graphics/win/FontCacheWin.cpp:
782         (WebCore::createGDIFont):  Remove unnecessary special-case for Cairo TrueType font search.  It should match CG in all font selections.
783
784 2008-10-22  Brady Eidson  <beidson@apple.com>
785
786         Reviewed by Adam Roben
787
788         <rdar://6261773> - autocomplete="off" doesn't work on Windows
789
790         Visual Studio makes a poor decision regarding the combination of enums and bitfields, such that a 
791         statement like "m_autocomplete = Off" followed by "return m_autocomplete == Off" would return "false" 
792         instead of the much more correct "true."
793         
794         In the past we have worked around this by declaring the bitfield member as an unsigned instead 
795         of the enum type.
796
797         For more discussion, see http://trac.webkit.org/changeset/25329
798
799         * html/HTMLInputElement.h:  Work around insane Visual Studio enum issue  *sigh*
800
801 2008-10-22  Kevin McCullough  <kmccullough@apple.com>
802
803         Reviewed by Oliver Hunt and Tim Hatcher.
804
805         https://bugs.webkit.org/show_bug.cgi?id=19225
806         Bug 19225: JSProfiler: Create automated profiler tests
807         - This change exports profiles on the console object so that they can be
808         iterated over via JavaScript, and thus can be used in automated tests.
809
810         * bindings/js/JSConsoleCustom.cpp: Get the profiles and return an array
811         that JS can use.
812         (WebCore::JSConsole::profiles):
813         * inspector/InspectorController.h: Use the new typedef.
814         (WebCore::InspectorController::profiles):
815         * page/Console.cpp: Keep our own array of profile objects.
816         (WebCore::Console::profileEnd):
817         * page/Console.h: Ditto.
818         (WebCore::Console::profiles):
819         * page/Console.idl: Expose the profiles to JS.
820
821 2008-10-22  David Hyatt  <hyatt@apple.com>
822
823         https://bugs.webkit.org/show_bug.cgi?id=21775
824
825         Convert buttons over to use the new Theme API on OS X.
826
827         Reviewed by Adam Roben
828
829         * platform/LengthBox.h:
830         (WebCore::LengthBox::LengthBox):
831         * platform/Theme.cpp:
832         (WebCore::Theme::controlBorder):
833         (WebCore::Theme::controlPadding):
834         * platform/Theme.h:
835         (WebCore::Theme::controlFont):
836         (WebCore::Theme::controlSize):
837         (WebCore::Theme::minControlSize):
838         (WebCore::Theme::controlRequiresPreWhiteSpace):
839         * platform/mac/ThemeMac.h:
840         (WebCore::ThemeMac::controlRequiresPreWhiteSpace):
841         * platform/mac/ThemeMac.mm:
842         (WebCore::checkboxSize):
843         (WebCore::radioSize):
844         (WebCore::buttonSizes):
845         (WebCore::buttonMargins):
846         (WebCore::button):
847         (WebCore::paintButton):
848         (WebCore::ThemeMac::controlFont):
849         (WebCore::ThemeMac::controlSize):
850         (WebCore::ThemeMac::minControlSize):
851         (WebCore::ThemeMac::controlBorder):
852         (WebCore::ThemeMac::controlPadding):
853         (WebCore::ThemeMac::inflateControlPaintRect):
854         (WebCore::ThemeMac::paint):
855         * rendering/RenderTheme.cpp:
856         (WebCore::RenderTheme::adjustStyle):
857         (WebCore::RenderTheme::paint):
858         (WebCore::RenderTheme::controlStatesForRenderer):
859         (WebCore::RenderTheme::isDefault):
860         (WebCore::RenderTheme::adjustRadioStyle):
861         * rendering/RenderTheme.h:
862         (WebCore::RenderTheme::setRadioSize):
863         * rendering/RenderThemeMac.h:
864         * rendering/RenderThemeMac.mm:
865         (WebCore::RenderThemeMac::adjustRepaintRect):
866         (WebCore::menuListButtonSizes):
867         (WebCore::RenderThemeMac::adjustMenuListStyle):
868         * rendering/style/RenderStyle.h:
869         (WebCore::InheritedFlags::paddingBox):
870         (WebCore::InheritedFlags::setPaddingBox):
871
872 2008-10-22  Chris Marrin  <cmarrin@apple.com>
873
874         Reviewed by Dave Hyatt
875
876         Make sure that the AtomicString that identifies a set of animation keyframes
877         stays live by keeping a copy in the WebKitCSSKeyframesRule.
878         
879         Also call styleSheetChanged() when the keyframes name changes, but
880         add an internal method that doesn't call styleSheetChanged() for use
881         during normal stylesheet parsing.
882         
883         Test: animations/change-keyframes-name.html
884
885         * css/CSSGrammar.y:
886         * css/WebKitCSSKeyframesRule.cpp:
887         (WebCore::WebKitCSSKeyframesRule::setName):
888         * css/WebKitCSSKeyframesRule.h:
889         (WebCore::WebKitCSSKeyframesRule::setNameInternal):
890
891 2008-10-22  Alexey Proskuryakov  <ap@webkit.org>
892
893         Reviewed by Sam Weinig.
894
895         https://bugs.webkit.org/show_bug.cgi?id=21791
896         WebCore JS bindings should be able to use non-static hash tables for properties
897
898         Add a map for HashTables to WebCore JS client data.
899
900         This makes property access noticeably slower, so it is an opt-in. For classes that need to be
901         supported in workers in forseeable future this is not critical.
902
903         * bindings/js/JSDOMBinding.cpp:
904         (WebCore::DOMObjectHashTableMap::get):
905         (WebCore::DOMObjectHashTableMap::mapFor):
906         (WebCore::getHashTableForGlobalData):
907         (WebCore::DOMObjectWrapperMap::mapFor):
908         WebCore client data is now a class that contains both a DOM wrapper map and a property hash
909         table one.
910
911         * bindings/js/JSDOMBinding.h: Added getHashTableForGlobalData() to query the hash table map.
912
913         * bindings/scripts/CodeGeneratorJS.pm: If the class has a NoStaticTables attribute, use
914         JSDOMBinding map to access its property hash tables.
915
916         * dom/MessageChannel.idl:
917         * dom/MessagePort.idl:
918         Added NoStaticTables attribute.
919
920 2008-10-22  Gustavo Noronha Silva  <gns@gnome.org>
921
922         Reviewed by Timothy Hatcher.
923
924         Build failure because of missing include
925         https://bugs.webkit.org/show_bug.cgi?id=21765
926
927         Build failure fix for WebKit/GTK+; added missing
928         include (GOwnPtr.h)
929
930         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
931
932 2008-10-22  Alp Toker  <alp@nuanti.com>
933
934         Reviewed by Adam Roben.
935
936         Fix crashes on older GTK+ versions (2.8). gtk_widget_style_get()
937         doesn't initialize values if the requested property doesn't exist, so
938         initialize the values to the documented defaults before calling it
939         where necessary. Additionally, avoid critical warnings by not calling
940         gtk_widget_style_get() when we know the property isn't available.
941
942         Note that this is an imported source file which doesn't follow the
943         WebKit coding style.
944
945         * platform/gtk/gtk2drawing.c:
946         (moz_gtk_init):
947         (moz_gtk_button_get_inner_border):
948         (moz_gtk_combo_box_paint):
949         (moz_gtk_toolbar_separator_paint):
950         (moz_gtk_menu_separator_paint):
951         (moz_gtk_get_widget_border):
952         (moz_gtk_get_tab_scroll_arrow_size):
953         (moz_gtk_get_toolbar_separator_width):
954         (moz_gtk_get_menu_separator_height):
955
956 2008-10-22  Alp Toker  <alp@nuanti.com>
957
958         Fix build for Cairo 1.2.
959
960         * platform/graphics/cairo/GraphicsContextCairo.cpp:
961         (WebCore::GraphicsContext::clipOut):
962         * platform/gtk/RenderThemeGtk.cpp:
963         (WebCore::paintMozWidget):
964
965 2008-10-22  Darin Fisher  <darin@chromium.org>
966
967         Reviewed by Eric Seidel.
968
969         A little more PLATFORM(CHROMIUM) in WebCore
970         https://bugs.webkit.org/show_bug.cgi?id=21758
971
972         * page/AccessibilityObject.h:
973         * platform/graphics/Icon.h:
974
975 2008-10-21  Alexey Proskuryakov  <ap@webkit.org>
976
977         Reviewed by Darin Adler.
978
979         Test: fast/events/message-channel-gc-3.html
980
981         https://bugs.webkit.org/show_bug.cgi?id=21769
982         MessagePort should be GC protected if there are messages to be delivered
983
984         * dom/MessagePort.h: Removed pending activity count. Now we track if a close event is
985         pending, and check if the queue is non-empty.
986         (WebCore::MessagePort::workerContext): Added a stub implementation for a cross-heap GC bug
987         fix (below).
988
989         * dom/MessagePort.cpp:
990         (WebCore::CloseMessagePortTimer::fired):
991         (WebCore::MessagePort::MessagePort):
992         (WebCore::MessagePort::queueCloseEvent):
993         (WebCore::MessagePort::dispatchCloseEvent):
994         (WebCore::MessagePort::hasPendingActivity):
995         Track message and close event activity separately.
996
997         * bindings/js/JSDOMBinding.cpp:
998         (WebCore::markCrossHeapDependentObjectsForDocument): Fixed a bug in cross-heap GC that was
999         causing same-heap ports to never be deleted.
1000
1001 2008-10-21  Dan Bernstein  <mitz@apple.com>
1002
1003         Reviewed by Sam Weinig.
1004
1005         - remove unreachable code
1006
1007         * platform/text/BidiResolver.h:
1008         (WebCore::::embed):
1009
1010 2008-10-21  Beth Dakin  <bdakin@apple.com>
1011
1012         Reviewed by Darin Adler.
1013
1014         Fix for https://bugs.webkit.org/show_bug.cgi?id=20352 
1015         REGRESSION(r31030-31055): Choosing "Print window" from frame set 
1016         prints blank page
1017         and corresponding: <rdar://problem/6142398>
1018
1019         viewHeight() and viewWidth() only return valuable information if we 
1020         are not printing. Everywhere else in the code, we make sure we are 
1021         not printing before we call these functions. Adding a check for 
1022         printing here fixes this bug, and framesets print again.
1023
1024         * rendering/RenderFrameSet.cpp:
1025         (WebCore::RenderFrameSet::layout):
1026
1027 2008-10-21  Yael Aharon <yael.aharon@nokia.com>
1028
1029         Reviewed by Simon.
1030
1031         Pixmap in canvas tag was not getting initialized.
1032
1033         See https://bugs.webkit.org/show_bug.cgi?id=21771
1034
1035         * platform/graphics/qt/ImageBufferQt.cpp:
1036         (WebCore::ImageBuffer::create):
1037
1038 2008-10-20  Simon Fraser  <simon.fraser@apple.com>
1039
1040         Reviewed by Dan Bernstein
1041
1042         Add a comment explaining layoutDelta(), and an assertion
1043         that checks that delta changes were correctly paired during layout.
1044         
1045         * rendering/RenderView.cpp:
1046         (WebCore::RenderView::layout):
1047         * rendering/RenderView.h:
1048
1049 2008-10-20  Timothy Hatcher  <timothy@apple.com>
1050
1051         Make auto-complete only suggest properties that are valid syntax
1052         when using dot-notation. Also when completing numeric properties,
1053         the quotes are omitted inside the brackets.
1054
1055         https://bugs.webkit.org/show_bug.cgi?id=21760
1056         https://bugs.webkit.org/show_bug.cgi?id=21761
1057
1058         Reviewed by Oliver Hunt.
1059
1060         * inspector/front-end/Console.js:
1061         (WebInspector.Console.prototype.completions): Skip properties that
1062         are not valid identifies when using dot-notation. And omit the quotes
1063         when completing numbers in bracket-notation.
1064
1065 2008-10-20  Timothy Hatcher  <timothy@apple.com>
1066
1067         Fixes the Profiles panel in the Web Inspector, which was broken by
1068         the JSValue base-class changes. Also renames some functions and
1069         variables in JavaScriptProfileNode.cpp that where title case.
1070
1071         https://bugs.webkit.org/show_bug.cgi?id=21764
1072
1073         Reviewed by Oliver Hunt.
1074
1075         * inspector/JavaScriptProfile.cpp:
1076         (WebCore::toJS): Use a JSObject pointer instead of JSValuePtr so the
1077         returned JSValuePtr will be treated as an object and not a value.
1078         * inspector/JavaScriptProfileNode.cpp:
1079         (WebCore::toJS): Ditto.
1080
1081 2008-10-20  Sam Weinig  <sam@webkit.org>
1082
1083         Reviewed by Anders Carlsson.
1084
1085         Remove FrameLoaderClient::detachedFromParent4.  It is no longer used by any port.
1086
1087         * loader/EmptyClients.h:
1088         (WebCore::EmptyFrameLoaderClient::detachedFromParent4):.
1089         * loader/FrameLoader.cpp:
1090         (WebCore::FrameLoader::detachFromParent):
1091         * loader/FrameLoaderClient.h:
1092
1093 2008-10-20  Antti Koivisto  <antti@apple.com>
1094
1095         Reviewed by Adele Peterson.
1096
1097         Fix https://bugs.webkit.org/show_bug.cgi?id=21763
1098         REGRESSION (r36108-r36113): Can't load picture content on wired.com galleries
1099         <rdar://problem/6285025
1100         
1101         If we get 304 response we need to explicitly check if that completes the frame load.
1102         
1103         No test case, simulating the condition is pretty difficult.
1104
1105         * loader/loader.cpp:
1106         (WebCore::Loader::Host::didReceiveResponse):
1107
1108 2008-10-20  Anders Carlsson  <andersca@apple.com>
1109
1110         Reviewed by Mark Rowe.
1111
1112         Work around <rdar://problem/6301728>.
1113         
1114         Don't assert that loads are deferred when we're using CFNetwork on Mac or Windows.
1115         
1116         * loader/MainResourceLoader.cpp:
1117         (WebCore::MainResourceLoader::didReceiveResponse):
1118         (WebCore::MainResourceLoader::didReceiveData):
1119         (WebCore::MainResourceLoader::didFinishLoading):
1120         (WebCore::MainResourceLoader::didFail):
1121
1122 2008-10-20  Beth Dakin  <bdakin@apple.com>
1123
1124         Reviewed by Adele Peterson.
1125
1126         Speculative fix for <rdar://problem/6242585> CrashTracer: [USER] 19 
1127         crashes in Safari at com.apple.WebCore
1128         WebCore::ScrollView::visibleContentRect const + 153
1129
1130         d->m_view can be null and is null-checked at other points in the 
1131         code. The logs indicate that this crash occurs when closing a 
1132         window containing a PDF, so in case where we crash, the PDF's view 
1133         is probably already null. So the fix is to simply add a null-check.
1134
1135         * page/Frame.cpp:
1136         (WebCore::Frame::selectionRect):
1137
1138 2008-10-20  Adele Peterson  <adele@apple.com>
1139
1140         Reviewed by Darin Adler.
1141
1142         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData):
1143         Removed stray increment that would screw up any form with multiple files in it.
1144
1145 2008-10-20  Sam Weinig  <sam@webkit.org>
1146
1147         Rubber-stamped by David Hyatt.
1148
1149         Split LengthBox and LengthSize into their own files.
1150
1151         * GNUmakefile.am:
1152         * WebCore.vcproj/WebCore.vcproj:
1153         * WebCore.xcodeproj/project.pbxproj:
1154         * platform/Length.h:
1155         (WebCore::Length::blend):
1156         * platform/LengthBox.h: Copied from platform/Length.h.
1157         (WebCore::LengthBox::LengthBox):
1158         (WebCore::LengthBox::nonZero):
1159         * platform/LengthSize.h: Copied from platform/Length.h.
1160         (WebCore::LengthSize::LengthSize):
1161         (WebCore::LengthSize::setWidth):
1162         (WebCore::LengthSize::setHeight):
1163         (WebCore::LengthSize::height):
1164         * platform/Theme.h:
1165         * rendering/style/FillLayer.h:
1166         * rendering/style/NinePieceImage.h:
1167         (WebCore::NinePieceImage::NinePieceImage):
1168         * rendering/style/RenderStyle.h:
1169         * rendering/style/StyleDashboardRegion.h:
1170         * rendering/style/StyleSurroundData.h:
1171         * rendering/style/StyleVisualData.h:
1172
1173 2008-10-20  Dan Bernstein  <mitz@apple.com>
1174
1175         - Mac build fix
1176
1177         * WebCore.xcodeproj/project.pbxproj:
1178
1179 2008-10-20  Alp Toker  <alp@nuanti.com>
1180
1181         Fix autotools dist build target by listing recently added header
1182         files only. Not reviewed.
1183
1184         * GNUmakefile.am:
1185
1186 2008-10-20  David Hyatt  <hyatt@apple.com>
1187
1188         Clean up some USE(NEW_THEME) ifdefs (I botched one of them and have broken non-Mac platforms).  Also
1189         refactor some of the code that I put in ThemeMac to be cross-platform, since it was in RenderTheme.cpp
1190         originally.
1191
1192         ifdef some methods in RenderTheme.cpp also that are no longer needed with the new Theme.
1193
1194         Reviewed by Adam Roben
1195
1196         * WebCore.xcodeproj/project.pbxproj:
1197         * platform/Theme.cpp: Added.
1198         (WebCore::Theme::controlSupportsBorder):
1199         (WebCore::Theme::controlSupportsPadding):
1200         * platform/Theme.h:
1201         * platform/mac/ThemeMac.h:
1202         * platform/mac/ThemeMac.mm:
1203         * rendering/RenderTheme.cpp:
1204         (WebCore::RenderTheme::adjustStyle):
1205         * rendering/RenderTheme.h:
1206
1207 2008-10-20  David Hyatt  <hyatt@apple.com>
1208
1209         Rename LengthBox's members to have m_ in front of them.
1210
1211         Reviewed by Sam Weinig
1212
1213         * css/CSSComputedStyleDeclaration.cpp:
1214         (WebCore::valueForNinePieceImage):
1215         (WebCore::getPositionOffsetValue):
1216         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1217         * css/CSSStyleSelector.cpp:
1218         (WebCore::CSSStyleSelector::mapNinePieceImage):
1219         * platform/Length.h:
1220         (WebCore::LengthBox::LengthBox):
1221         (WebCore::LengthBox::left):
1222         (WebCore::LengthBox::right):
1223         (WebCore::LengthBox::top):
1224         (WebCore::LengthBox::bottom):
1225         (WebCore::LengthBox::operator==):
1226         (WebCore::LengthBox::nonZero):
1227         * rendering/RenderObject.cpp:
1228         (WebCore::RenderObject::paintNinePieceImage):
1229         (WebCore::RenderObject::addDashboardRegions):
1230         * rendering/style/RenderStyle.cpp:
1231         (WebCore::positionedObjectMoved):
1232         (WebCore::RenderStyle::setClip):
1233         (WebCore::RenderStyle::noneDashboardRegions):
1234         * rendering/style/RenderStyle.h:
1235         (WebCore::InheritedFlags::left):
1236         (WebCore::InheritedFlags::right):
1237         (WebCore::InheritedFlags::top):
1238         (WebCore::InheritedFlags::bottom):
1239         (WebCore::InheritedFlags::clipLeft):
1240         (WebCore::InheritedFlags::clipRight):
1241         (WebCore::InheritedFlags::clipTop):
1242         (WebCore::InheritedFlags::clipBottom):
1243         (WebCore::InheritedFlags::marginTop):
1244         (WebCore::InheritedFlags::marginBottom):
1245         (WebCore::InheritedFlags::marginLeft):
1246         (WebCore::InheritedFlags::marginRight):
1247         (WebCore::InheritedFlags::paddingTop):
1248         (WebCore::InheritedFlags::paddingBottom):
1249         (WebCore::InheritedFlags::paddingLeft):
1250         (WebCore::InheritedFlags::paddingRight):
1251         (WebCore::InheritedFlags::setLeft):
1252         (WebCore::InheritedFlags::setRight):
1253         (WebCore::InheritedFlags::setTop):
1254         (WebCore::InheritedFlags::setBottom):
1255         (WebCore::InheritedFlags::setDashboardRegion):
1256         (WebCore::InheritedFlags::setClipLeft):
1257         (WebCore::InheritedFlags::setClipRight):
1258         (WebCore::InheritedFlags::setClipTop):
1259         (WebCore::InheritedFlags::setClipBottom):
1260         (WebCore::InheritedFlags::setMarginTop):
1261         (WebCore::InheritedFlags::setMarginBottom):
1262         (WebCore::InheritedFlags::setMarginLeft):
1263         (WebCore::InheritedFlags::setMarginRight):
1264         (WebCore::InheritedFlags::setPaddingTop):
1265         (WebCore::InheritedFlags::setPaddingBottom):
1266         (WebCore::InheritedFlags::setPaddingLeft):
1267         (WebCore::InheritedFlags::setPaddingRight):
1268
1269 2008-10-20  Timothy Hatcher  <timothy@apple.com>
1270
1271         Make the Resource panel perform graph updates atomically, so when resources
1272         are added the graph and summary graph update at the same time.
1273
1274         https://bugs.webkit.org/show_bug.cgi?id=21755
1275
1276         Reviewed by Kevin McCullough.
1277
1278         * inspector/front-end/Resource.js:
1279         (WebInspector.Resource.prototype.get startTime): Return -1 if the _startTime
1280         property is undefined, null or 0. This allows callers to check for -1 and not
1281         the other values when there is no startTime yet.
1282         (WebInspector.Resource.prototype.get responseReceivedTime): Ditto.
1283         (WebInspector.Resource.prototype.get endTime): Ditto.
1284         (WebInspector.Resource.prototype.get duration): Remove an extra empty line.
1285         (WebInspector.Resource.prototype.get latency): Ditto.
1286         (WebInspector.Resource.prototype.get contentLength): Return 0 if the _duration
1287         property is undefined or null. This allows callers to always assume a number.
1288         (WebInspector.Resource.prototype.get expectedContentLength): Ditto.
1289         (WebInspector.Resource.prototype.get errors): Simplify the case where there is
1290         no _errors property yet.
1291         (WebInspector.Resource.prototype.set errors): Remove the check if the new value
1292         if the same as the previous value, since there is no work to guard.
1293         (WebInspector.Resource.prototype.get warnings): Simplify the case where there is
1294         no _warnings property yet.
1295         (WebInspector.Resource.prototype.set warnings): Remove the check if the new value
1296         if the same as the previous value, since there is no work to guard.
1297         (WebInspector.Resource.CompareByResponseReceivedTime): Add cases for when the
1298         responseReceivedTime is -1.
1299         (WebInspector.Resource.CompareByEndTime): Add cases for when the endTime is -1.
1300         * inspector/front-end/ResourcesPanel.js:
1301         (WebInspector.ResourcesPanel.prototype.get searchableViews): If a resource does not
1302         have a _resourcesTreeElement yet, exclude it from the searchable views.
1303         (WebInspector.ResourcesPanel.prototype.set calculator): Set _staleResource to _resources
1304         and call refresh to refresh the entire graph.
1305         (WebInspector.ResourcesPanel.prototype.set needsRefresh): Set a timeout if the panel
1306         is visible that calls refresh.
1307         (WebInspector.ResourcesPanel.prototype.refresh): Create the resource tree element and
1308         graph for a resource if it hasn't been created yet. If the boundaries changed during
1309         the first stale resource pass, do a full pass of all resources when updating the graphs.
1310         (WebInspector.ResourcesPanel.prototype.reset): Remove the legend items.
1311         (WebInspector.ResourcesPanel.prototype.addResource): Don't create the tree element and
1312         graph, these are now created during the first refresh.
1313         (WebInspector.ResourcesPanel.prototype.removeResource): Null check _resourcesTreeElement.
1314         (WebInspector.ResourcesPanel.prototype.addMessageToResource): Ditto.
1315         (WebInspector.ResourcesPanel.prototype.clearMessages): Ditto.
1316         (WebInspector.ResourcesPanel.prototype.refreshResource): Remove most of the work, just
1317         add the resource to the _staleResources and set needsRefresh.
1318         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded): Null check
1319         _resourcesTreeElement.
1320         (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded): Remove code to clear
1321         the timeout used by the deleted _sortResourcesSoonIfNeeded. Remove call to removeChild
1322         since the insertBefore call will do it if needed.
1323         (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded): Remove code to
1324         clear the timeout used by the deleted _updateGraphDividersSoonIfNeeded.
1325         (WebInspector.ResourcesPanel.prototype._updateSummaryGraph): Remove code to clear the
1326         timeout used by the deleted _updateSummaryGraphSoon. No need to remove the totalLegendLabel,
1327         since all the legend items are removed in one pass right before.
1328         (WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set the sortingFunction
1329         before the calculator so the correct sortingFunction is there when a refresh happens.
1330         (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphPercentages): Set start to 0
1331         when the startTime is -1, since that looks best visually. Also set middle and end
1332         to the start and middle (respectfully) when startAtZero. This looks best visually.
1333         (WebInspector.ResourceGraph): Start the graph as hidden until the first refresh.
1334         (WebInspector.ResourceGraph.prototype.refresh): Remove the hidden class.
1335
1336 2008-10-20  David Hyatt  <hyatt@apple.com>
1337
1338         https://bugs.webkit.org/show_bug.cgi?id=21733
1339
1340         Make sure that the haveMetadata flag is set to true for generated images from image buffers, so that
1341         no attempt is made to re-cache the frame from a non-existent image source.
1342
1343         Reviewed by Sam Weinig
1344
1345         * platform/graphics/cairo/ImageCairo.cpp:
1346         (WebCore::BitmapImage::BitmapImage):
1347         * platform/graphics/cg/ImageCG.cpp:
1348         (WebCore::BitmapImage::BitmapImage):
1349
1350 2008-10-20  Dan Bernstein  <mitz@apple.com>
1351
1352         Reviewed by John Sullivan.
1353
1354         - make hasARenderedDescendant() have internal linkage
1355
1356         * editing/CompositeEditCommand.cpp:
1357         (WebCore::hasARenderedDescendant):
1358
1359 2008-10-20  Chris Fleizach  <cfleizach@apple.com>
1360
1361         Reviewed by Jon Honeycutt
1362
1363         Fix a crash in Accessibility where a table section was being 
1364         referenced without first checking if it was null
1365
1366         https://bugs.webkit.org/show_bug.cgi?id=21721
1367
1368         Test: accessibility/table-nofirstbody.html
1369
1370         * page/AccessibilityTable.cpp:
1371         (WebCore::AccessibilityTable::addChildren):
1372
1373 2008-10-20  David Hyatt  <hyatt@apple.com>
1374
1375         Avoid some stderr spew from CG by checking if we have a decoder yet in ImageSourceCG.
1376
1377         Reviewed by Darin Adler
1378
1379         * platform/graphics/cg/ImageSourceCG.cpp:
1380         (WebCore::ImageSource::repetitionCount):
1381         (WebCore::ImageSource::frameDurationAtIndex):
1382
1383 2008-10-20  Alp Toker  <alp@nuanti.com>
1384
1385         Reviewed by Mark Rowe.
1386
1387         Fix the pthread conditionals in the FTP code to correctly define
1388         threadsafe *_r functions on Windows. Partly fixes the GTK+/Win32
1389         build.
1390
1391         * loader/FTPDirectoryDocument.cpp:
1392         * loader/FTPDirectoryParser.cpp:
1393
1394 2008-10-20  David Hyatt  <hyatt@apple.com>
1395
1396         https://bugs.webkit.org/show_bug.cgi?id=21751
1397
1398         Convert checkboxes and radio buttons on OS X over to the new Theme API.
1399
1400         Reviewed by Adam Roben
1401
1402         * css/CSSComputedStyleDeclaration.cpp:
1403         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1404         * css/CSSStyleSelector.cpp:
1405         (WebCore::CSSStyleSelector::mapFillSize):
1406         * platform/Length.h:
1407         (WebCore::LengthSize::LengthSize):
1408         (WebCore::LengthSize::operator==):
1409         (WebCore::LengthSize::width):
1410         (WebCore::LengthSize::height):
1411         (WebCore::LengthSize::setWidth):
1412         (WebCore::LengthSize::setHeight):
1413         * platform/Theme.h:
1414         (WebCore::Theme::controlSize):
1415         (WebCore::Theme::controlSupportsBorder):
1416         (WebCore::Theme::controlSupportsPadding):
1417         (WebCore::Theme::paint):
1418         (WebCore::Theme::inflateControlPaintRect):
1419         * platform/ThemeTypes.h:
1420         (WebCore::):
1421         * platform/mac/ThemeMac.h:
1422         * platform/mac/ThemeMac.mm:
1423         (WebCore::):
1424         (WebCore::controlSizeForFont):
1425         (WebCore::sizeFromFont):
1426         (WebCore::setControlSize):
1427         (WebCore::updateStates):
1428         (WebCore::inflateRect):
1429         (WebCore::checkboxSizes):
1430         (WebCore::checkboxMargins):
1431         (WebCore::checkboxSize):
1432         (WebCore::checkbox):
1433         (WebCore::paintCheckbox):
1434         (WebCore::radioSizes):
1435         (WebCore::radioMargins):
1436         (WebCore::radioSize):
1437         (WebCore::radio):
1438         (WebCore::paintRadio):
1439         (WebCore::ThemeMac::baselinePositionAdjustment):
1440         (WebCore::ThemeMac::controlSize):
1441         (WebCore::ThemeMac::controlSupportsBorder):
1442         (WebCore::ThemeMac::controlSupportsPadding):
1443         (WebCore::ThemeMac::inflateControlPaintRect):
1444         (WebCore::ThemeMac::paint):
1445         * rendering/RenderBox.cpp:
1446         (WebCore::RenderBox::calculateBackgroundSize):
1447         * rendering/RenderObject.cpp:
1448         (WebCore::mustRepaintFillLayers):
1449         * rendering/RenderTheme.cpp:
1450         (WebCore::RenderTheme::adjustStyle):
1451         (WebCore::RenderTheme::paint):
1452         (WebCore::RenderTheme::baselinePosition):
1453         (WebCore::RenderTheme::adjustRepaintRect):
1454         (WebCore::RenderTheme::controlStatesForRenderer):
1455         (WebCore::RenderTheme::isFocused):
1456         * rendering/RenderTheme.h:
1457         * rendering/RenderThemeMac.h:
1458         * rendering/RenderThemeMac.mm:
1459         (WebCore::RenderThemeMac::adjustRepaintRect):
1460         * rendering/style/FillLayer.cpp:
1461         (WebCore::FillLayer::operator==):
1462
1463 2008-10-18  Geoffrey Garen  <ggaren@apple.com>
1464
1465         Reviewed by Darin Adler.
1466
1467         Fixed https://bugs.webkit.org/show_bug.cgi?id=21735
1468         Emit profiling instrumentation only if the Web Inspector's profiling
1469         feature is enabled
1470
1471         * bindings/js/JSDOMWindowBase.cpp:
1472         (WebCore::JSDOMWindowBase::supportsProfiling):
1473         * bindings/js/JSDOMWindowBase.h: Implemented the interface for specifying
1474         whether a target global object has the Web Inspector's profiling feature
1475         enabled.
1476
1477         * inspector/JavaScriptDebugServer.cpp:
1478         (WebCore::JavaScriptDebugServer::recompileAllJSFunctionsSoon):
1479         (WebCore::JavaScriptDebugServer::didAddListener):
1480         (WebCore::JavaScriptDebugServer::didRemoveListener):
1481         * inspector/JavaScriptDebugServer.h: Exported an API for recompiling, 
1482         used by the Settings object.
1483
1484         * page/Settings.cpp:
1485         (WebCore::Settings::Settings):
1486         (WebCore::Settings::setDeveloperExtrasEnabled):
1487         * page/Settings.h: Recompile when the developer menu is enabled/disabled
1488         for the first time, to add/remove profiling hooks. In the future, with
1489         better Web Inspector UI, we can do this on a page-by-page basis,
1490         instead of a global basis.
1491
1492 2008-10-20  David Hyatt  <hyatt@apple.com>
1493
1494         Move Length to platform/.
1495
1496         Reviewed by Adam Roben
1497
1498         * GNUmakefile.am:
1499         * WebCore.pro:
1500         * WebCore.vcproj/WebCore.vcproj:
1501         * WebCore.xcodeproj/project.pbxproj:
1502         * WebCoreSources.bkl:
1503         * platform/Length.cpp: Copied from rendering/Length.cpp.
1504         * platform/Length.h: Copied from rendering/Length.h.
1505
1506 2008-10-20  Darin Adler  <darin@apple.com>
1507
1508         - try to fix Qt build
1509
1510         * bridge/qt/qt_runtime.cpp:
1511         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): Add asObject calls.
1512         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter): Ditto.
1513
1514 2008-10-20  Darin Adler  <darin@apple.com>
1515
1516         - try to fix Qt build
1517
1518         * bridge/qt/qt_instance.cpp:
1519         (JSC::Bindings::QtInstance::mark): Use JSValue* instead of JSValuePtr.
1520         (JSC::Bindings::QtField::valueFromInstance): Ditto.
1521         * bridge/qt/qt_instance.h: Ditto.
1522
1523 2008-10-20  Darin Adler  <darin@apple.com>
1524
1525         - try to fix Tiger build
1526
1527         * bridge/objc/objc_instance.mm:
1528         (ObjcInstance::invokeMethod): Add a const_cast to remove the unwanted
1529         volatile qualifier.
1530         (ObjcInstance::invokeDefaultMethod): Ditto.
1531         (ObjcInstance::getValueOfUndefinedField): Ditto.
1532         * bridge/objc/objc_runtime.mm:
1533         (JSC::Bindings::ObjcField::valueFromInstance): Ditto.
1534
1535 2008-10-20  Alexey Proskuryakov  <ap@webkit.org>
1536
1537         Reviewed by Darin Adler.
1538
1539         https://bugs.webkit.org/show_bug.cgi?id=21750
1540         Eliminate the notion of "temporary events"
1541
1542         We mark some events as temporary when dispatching, for the sole reason of
1543         manually calling forgetDOMObject when done dispatching.
1544
1545         There doesn't seem to be any reason to call it manually, as JSEvent destructor
1546         will do this automatically right away.
1547
1548         * bindings/js/ScriptController.cpp:
1549         * bindings/js/ScriptController.h:
1550         Removed ScriptController::finishedWithEvent(), which was called after dispatching
1551         a temporary event.
1552
1553         * dom/ContainerNode.cpp:
1554         (WebCore::dispatchChildInsertionEvents):
1555         (WebCore::dispatchChildRemovalEvents):
1556         * dom/EventTarget.h:
1557         * dom/EventTargetNode.cpp:
1558         (WebCore::EventTargetNode::dispatchEvent):
1559         (WebCore::EventTargetNode::dispatchGenericEvent):
1560         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
1561         (WebCore::EventTargetNode::dispatchWindowEvent):
1562         (WebCore::EventTargetNode::dispatchUIEvent):
1563         (WebCore::EventTargetNode::dispatchKeyEvent):
1564         (WebCore::EventTargetNode::dispatchMouseEvent):
1565         (WebCore::EventTargetNode::dispatchWheelEvent):
1566         (WebCore::EventTargetNode::dispatchWebKitAnimationEvent):
1567         (WebCore::EventTargetNode::dispatchWebKitTransitionEvent):
1568         (WebCore::EventTargetNode::dispatchEventForType):
1569         (WebCore::EventTargetNode::dispatchProgressEvent):
1570         (WebCore::EventTargetNode::dispatchStorageEvent):
1571         * dom/EventTargetNode.h:
1572         * dom/MessagePort.cpp:
1573         (WebCore::MessagePort::dispatchMessages):
1574         (WebCore::MessagePort::dispatchCloseEvent):
1575         (WebCore::MessagePort::dispatchEvent):
1576         * dom/MessagePort.h:
1577         * editing/Editor.cpp:
1578         (WebCore::Editor::dispatchCPPEvent):
1579         (WebCore::dispatchEditableContentChangedEvents):
1580         * editing/ReplaceSelectionCommand.cpp:
1581         (WebCore::ReplacementFragment::ReplacementFragment):
1582         * editing/TypingCommand.cpp:
1583         (WebCore::TypingCommand::insertText):
1584         * loader/appcache/DOMApplicationCache.cpp:
1585         (WebCore::DOMApplicationCache::dispatchEvent):
1586         (WebCore::DOMApplicationCache::callListener):
1587         * loader/appcache/DOMApplicationCache.h:
1588         * page/EventHandler.cpp:
1589         (WebCore::EventHandler::dispatchDragEvent):
1590         (WebCore::EventHandler::keyEvent):
1591         (WebCore::EventHandler::handleTextInputEvent):
1592         * page/FrameView.cpp:
1593         (WebCore::FrameView::scheduleEvent):
1594         (WebCore::FrameView::updateOverflowStatus):
1595         (WebCore::FrameView::dispatchScheduledEvents):
1596         * page/FrameView.h:
1597         * rendering/RenderLayer.cpp:
1598         (WebCore::RenderLayer::scrollToOffset):
1599         (WebCore::RenderLayer::updateOverflowStatus):
1600         * svg/SVGElement.cpp:
1601         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
1602         * svg/SVGElementInstance.cpp:
1603         (WebCore::SVGElementInstance::dispatchEvent):
1604         * svg/SVGElementInstance.h:
1605         * xml/XMLHttpRequest.cpp:
1606         (WebCore::XMLHttpRequest::dispatchEvent):
1607         (WebCore::XMLHttpRequest::dispatchReadyStateChangeEvent):
1608         (WebCore::XMLHttpRequest::dispatchXMLHttpRequestProgressEvent):
1609         * xml/XMLHttpRequest.h:
1610         * xml/XMLHttpRequestUpload.cpp:
1611         (WebCore::XMLHttpRequestUpload::dispatchEvent):
1612         (WebCore::XMLHttpRequestUpload::dispatchXMLHttpRequestProgressEvent):
1613         * xml/XMLHttpRequestUpload.h:
1614         Don't pass the tempEvent boolean around.
1615
1616 2008-10-20  Alp Toker  <alp@nuanti.com>
1617
1618         Remove unused includes only. Partial GTK+/Win build fix.
1619
1620         * platform/graphics/gtk/SimpleFontDataPango.cpp:
1621
1622 2008-10-20  Alexey Proskuryakov  <ap@webkit.org>
1623
1624         Reviewed by Oliver Hunt.
1625
1626         https://bugs.webkit.org/show_bug.cgi?id=21705
1627         Implement Web Workers client-side API
1628
1629         The implementation is experimental, and disabled by default. It doesn't quite match the
1630         published draft, being influenced by further WHATWG discussions.
1631
1632         This only implements the client-side API, and does not actually create any threads or
1633         global contexts yet.
1634
1635         * DerivedSources.make: Added DedicatedWorker. SharedWorker is not implemented yet, as I'm
1636         still not sure if having separate classes for these helps at all.
1637
1638         * WebCore.xcodeproj/project.pbxproj: Added new files.
1639
1640         * bindings/js/JSDOMWindowBase.cpp:
1641         (jsDOMWindowBaseWorker):
1642         (WebCore::JSDOMWindowBase::put):
1643         (setJSDOMWindowBaseWorker):
1644         Added window.Worker constructor. Moved JSXSLTProcessorConstructor.h include out of ifdef
1645         to match prevailing style.
1646
1647         * bindings/js/JSDedicatedWorkerConstructor.cpp: Added.
1648         * bindings/js/JSDedicatedWorkerConstructor.h: Added.
1649         * bindings/js/JSDedicatedWorkerCustom.cpp: Added.
1650         The implementation of event listeners are left custom intentionally, for easier implementation
1651         of listeners that are not tied to any Document in the future.
1652
1653         * dom/DedicatedWorker.cpp: Added.
1654         * dom/DedicatedWorker.h: Added.
1655         * dom/DedicatedWorker.idl: Added.
1656         Added an implementation that can only load requested scripts for now.
1657
1658 2008-10-19  Darin Adler  <darin@apple.com>
1659
1660         Reviewed by Dan Bernstein.
1661
1662         - fix assertion seen when opening inspector
1663
1664         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1665         (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot):
1666         Removed unneeded asObject cast.
1667
1668 2008-10-19  Dan Bernstein  <mitz@apple.com>
1669
1670         Rubber-stamped by Timothy Hatcher.
1671
1672         - remove empty directories and correct the MIME type of inspector images
1673
1674         * page/inspector: Removed.
1675         * page/inspector/Images: Removed.
1676
1677 2008-10-19  Timothy Hatcher  <timothy@apple.com>
1678
1679         Make the Web Inspector Resources panel open quicker and change graphs
1680         faster. There was some accidental n^2 logic at fault when updating the
1681         graph boundaries.
1682
1683         https://bugs.webkit.org/show_bug.cgi?id=21742
1684
1685         Reviewed by Darin Adler.
1686
1687         * inspector/front-end/ResourcesPanel.js:
1688         (WebInspector.ResourcesPanel.prototype.set calculator): Return early for
1689         a null calculator. Remove the second argument passed to _refreshAllResources.
1690         (WebInspector.ResourcesPanel.prototype.refresh): Call updateBoundaries on
1691         the calculator for all the stale resources before calling refreshResource.
1692         Pass true for the first argument of refreshResource to skip the boundary update.
1693         (WebInspector.ResourcesPanel.prototype._updateGraphBoundariesIfNeeded): Remove
1694         the second argument passed to _refreshAllResources.
1695         (WebInspector.ResourcesPanel.prototype._refreshAllResourcesSoon): Remove the
1696         skipSort argument since every passed true, and it would be bad to pass false.
1697         (WebInspector.ResourcesPanel.prototype._refreshAllResources): Ditto. And if
1698         skipBoundaryUpdate is false, call updateBoundaries on the calculator for all
1699         the resources before calling refreshResource. Pass true for the first argument
1700         of refreshResource to skip the boundary update.
1701
1702 2008-10-19  Timothy Hatcher  <timothy@apple.com>
1703
1704         Visually distinguish resources that loaded from the memory cache.
1705
1706         https://bugs.webkit.org/show_bug.cgi?id=14279
1707
1708         Reviewed by Dan Bernstein.
1709
1710         * English.lproj/localizedStrings.js: New string.
1711         * inspector/front-end/Images/timelineHollowPillBlue.png: Added.
1712         * inspector/front-end/Images/timelineHollowPillGray.png: Added.
1713         * inspector/front-end/Images/timelineHollowPillGreen.png: Added.
1714         * inspector/front-end/Images/timelineHollowPillOrange.png: Added.
1715         * inspector/front-end/Images/timelineHollowPillPurple.png: Added.
1716         * inspector/front-end/Images/timelineHollowPillRed.png: Added.
1717         * inspector/front-end/Images/timelineHollowPillYellow.png: Added.
1718         * inspector/front-end/ResourcesPanel.js:
1719         (WebInspector.ResourceCalculator.prototype.computeBarGraphLabels):
1720         Add the "(from cache)" suffix to the tooltip.
1721         (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphLabels):
1722         Add the "(from cache)" suffix to the tooltip.
1723         (WebInspector.ResourceGraph): Add the "resource-cached" class.
1724         * inspector/front-end/inspector.css: New styles to make the timeline
1725         bars use the hollow pill images.
1726
1727 2008-10-19  Timothy Hatcher  <timothy@apple.com>
1728
1729         Update the scroll position in the Resources panel when loading
1730         a new page or toggling on small resource rows.
1731
1732         https://bugs.webkit.org/show_bug.cgi?id=20114
1733
1734         Reviewed by Darin Adler.
1735
1736         * inspector/front-end/ResourcesPanel.js:
1737         (WebInspector.ResourcesPanel.prototype.reset): Scroll to the top,
1738         since all the resource are being removed.
1739         (WebInspector.ResourcesPanel.prototype.removeResource): Call
1740         _adjustScrollPosition in case the view is shorter and needs scrolled.
1741         (WebInspector.ResourcesPanel.prototype._toggleLargerResources): Ditto.
1742         (WebInspector.ResourcesPanel.prototype._adjustScrollPosition): Check
1743         the height of the sidebar against the scrollTop and height of the
1744         resourcesContainerElement. If the sidebar is shorter, scroll up
1745         so the last resource is at the bottom again.
1746
1747 2008-10-19  Timothy Hatcher  <timothy@apple.com>
1748
1749         Show per resource times and sizes when hovering over the bar graph for a resource.
1750
1751         https://bugs.webkit.org/show_bug.cgi?id=14300
1752         rdar://problem/5712802
1753
1754         Reviewed by Cameron Zwarich.
1755
1756         * English.lproj/localizedStrings.js: Add new strings.
1757         * inspector/front-end/Images/graphLabelCalloutLeft.png: Added.
1758         * inspector/front-end/Images/graphLabelCalloutRight.png: Added.
1759         * inspector/front-end/ResourcesPanel.js:
1760         (WebInspector.ResourcesPanel.prototype.refreshResource): Pass the calculator to the
1761         ResourceGraph.refresh function.
1762         (WebInspector.ResourceCalculator.prototype.computeBarGraphLabels): Default implementation
1763         returns the formatted value.
1764         (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphLabels): Return discrete values
1765         for the latency and download times. Also generate a custom tooltip.
1766         (WebInspector.ResourceGraph): Add a mouseover event listener that calls refreshLabelPositions.
1767         (WebInspector.ResourceGraph.prototype.refreshLabelPositions): Added. Updates the label positions
1768         in case the bar has changed size.
1769         (WebInspector.ResourceGraph.prototype.refresh): Set the label text and tooltips.
1770         * inspector/front-end/inspector.css: New styles for the labels.
1771
1772 2008-10-19  Darin Adler  <darin@apple.com>
1773
1774         Reviewed by Oliver Hunt.
1775
1776         - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
1777           improve performance by eliminating JSValue as a base class for JSCell
1778
1779         Remove most uses of JSValue, which will be removed in a future patch.
1780
1781         * bindings/js/JSCustomXPathNSResolver.h: Removed declaration of JSValue
1782         and used JSValuePtr instead.
1783         * bindings/js/JSEventTarget.h: Ditto.
1784         * bindings/js/JSNodeFilterCondition.h: Ditto.
1785         * bindings/js/ScheduledAction.h: Ditto.
1786         * bindings/js/ScriptController.h: Ditto.
1787         * bindings/objc/WebScriptObjectPrivate.h: Ditto.
1788         * bridge/c/c_utility.h: Ditto.
1789         * bridge/jni/jni_jsobject.h: Ditto.
1790         * bridge/jni/jni_utility.h: Ditto.
1791         * bridge/objc/WebScriptObject.h: Ditto.
1792         * dom/Traversal.h: Ditto.
1793         * inspector/InspectorController.cpp: Ditto.
1794         * inspector/JavaScriptProfile.h: Ditto.
1795         * inspector/JavaScriptProfileNode.h: Ditto.
1796         * loader/FrameLoader.h: Ditto.
1797         * page/Console.h: Ditto.
1798         * plugins/MimeTypeArray.h: Ditto.
1799         * plugins/Plugin.h: Ditto.
1800         * plugins/PluginArray.h: Ditto.
1801         * plugins/PluginView.cpp:
1802         (WebCore::getString): Ditto.
1803         (WebCore::PluginView::performRequest): Ditto.
1804         * plugins/gtk/PluginViewGtk.cpp: Ditto.
1805         * plugins/qt/PluginViewQt.cpp: Ditto.
1806         * plugins/win/PluginViewWin.cpp: Ditto.
1807
1808         * bridge/qt/qt_class.cpp:
1809         (JSC::Bindings::QtClass::fallbackObject): Use JSValuePtr and JSObject*
1810         instead of JSValue*.
1811         * bridge/qt/qt_class.h: Ditto.
1812         * bridge/qt/qt_instance.cpp:
1813         (JSC::Bindings::QtInstance::mark): Ditto.
1814         (JSC::Bindings::QtInstance::invokeMethod): Ditto.
1815         (JSC::Bindings::QtInstance::defaultValue): Ditto.
1816         (JSC::Bindings::QtInstance::stringValue): Ditto.
1817         (JSC::Bindings::QtInstance::numberValue): Ditto.
1818         (JSC::Bindings::QtInstance::booleanValue): Ditto.
1819         (JSC::Bindings::QtInstance::valueOf): Ditto.
1820         (JSC::Bindings::QtField::valueFromInstance): Ditto.
1821         (JSC::Bindings::QtField::setValueToInstance): Ditto.
1822         * bridge/qt/qt_instance.h: Ditto.
1823         * bridge/qt/qt_runtime.cpp: Ditto.
1824         (JSC::Bindings::valueRealType): Ditto.
1825         (JSC::Bindings::convertValueToQVariant): Ditto.
1826         (JSC::Bindings::convertQVariantToValue): Ditto.
1827         (JSC::Bindings::findMethodIndex): Ditto.
1828         (JSC::Bindings::QtRuntimeMetaMethod::call): Ditto.
1829         (JSC::Bindings::QtRuntimeMetaMethod::lengthGetter): Ditto.
1830         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): Ditto.
1831         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter): Ditto.
1832         (JSC::Bindings::QtRuntimeConnectionMethod::call): Ditto.
1833         (JSC::Bindings::QtRuntimeConnectionMethod::lengthGetter): Ditto.
1834         (JSC::Bindings::QtArray::setValueAt): Ditto.
1835         (JSC::Bindings::QtArray::valueAt): Ditto.
1836         * bridge/qt/qt_runtime.h: Ditto.
1837
1838         * bridge/testqtbindings.cpp:
1839         (main): Use JSValuePtr.
1840
1841 2008-10-18  Darin Adler  <darin@apple.com>
1842
1843         Reviewed by Oliver Hunt.
1844
1845         - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
1846           improve performance by eliminating JSValue as a base class for JSCell
1847
1848         Tweak a little more to get closer to where we can make JSValuePtr a class.
1849
1850         * bindings/js/JSAudioConstructor.cpp:
1851         (WebCore::JSAudioConstructor::JSAudioConstructor): Use asObject.
1852         (WebCore::constructAudio): Ditto.
1853         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1854         (WebCore::JSCSSStyleDeclaration::nameGetter): Ditto.
1855
1856         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1857         (WebCore::toHTMLCanvasStyle): Use asString and asObject.
1858         (WebCore::JSCanvasRenderingContext2D::setFillColor): Ditto.
1859         (WebCore::JSCanvasRenderingContext2D::setStrokeColor): Ditto.
1860         (WebCore::JSCanvasRenderingContext2D::drawImage): Ditto.
1861         (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): Ditto.
1862         (WebCore::JSCanvasRenderingContext2D::setShadow): Ditto.
1863         (WebCore::JSCanvasRenderingContext2D::createPattern): Ditto.
1864
1865         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1866         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): Use JSValuePtr.
1867
1868         * bindings/js/JSDOMBinding.cpp:
1869         (WebCore::setDOMException): Use noValue.
1870
1871         * bindings/js/JSDOMBinding.h:
1872         (WebCore::getDOMPrototype): Use asObject.
1873
1874         * bindings/js/JSDOMWindowBase.cpp:
1875         (WebCore::showModalDialog): Use noValue.
1876         (jsDOMWindowBaseEvent): Use asObject.
1877         (jsDOMWindowBaseImage): Ditto.
1878         (jsDOMWindowBaseMessageChannel): Ditto.
1879         (jsDOMWindowBaseOption): Ditto.
1880         (jsDOMWindowBaseXMLHttpRequest): Ditto.
1881         (jsDOMWindowBaseAudio): Ditto.
1882         (jsDOMWindowBaseXSLTProcessor): Ditto.
1883         (WebCore::JSDOMWindowBase::childFrameGetter): Ditto.
1884         (WebCore::JSDOMWindowBase::indexGetter): Ditto.
1885         (WebCore::JSDOMWindowBase::namedItemGetter): Ditto.
1886         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Ditto.
1887         (WebCore::JSDOMWindowBase::findJSEventListener): Ditto.
1888         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener): Ditto.
1889         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener): Ditto.
1890         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener): Ditto.
1891         (windowProtoFuncOpen): Use noValue.
1892         (WebCore::toJSDOMWindow): Use asObject.
1893
1894         * bindings/js/JSDOMWindowCustom.cpp:
1895         (WebCore::setTimeoutOrInterval): Use asString.
1896         (WebCore::toDOMWindow): Use asObject.
1897
1898         * bindings/js/JSEventListener.cpp:
1899         (WebCore::JSAbstractEventListener::handleEvent): Use noValue.
1900         (WebCore::JSLazyEventListener::parseCode): Use asObject.
1901
1902         * bindings/js/JSHTMLCollectionCustom.cpp:
1903         (WebCore::JSHTMLCollection::nameGetter): Use asObject.
1904         * bindings/js/JSHTMLDocumentCustom.cpp:
1905         (WebCore::JSHTMLDocument::nameGetter): Ditto.
1906         * bindings/js/JSHTMLElementCustom.cpp:
1907         (WebCore::JSHTMLElement::pushEventHandlerScope): Ditto.
1908         * bindings/js/JSHTMLFormElementCustom.cpp:
1909         (WebCore::JSHTMLFormElement::nameGetter): Ditto.
1910         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1911         (WebCore::JSHTMLFrameSetElement::nameGetter): Ditto.
1912         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1913         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
1914         (WebCore::constructHTMLOptionElement): Ditto.
1915         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1916         (WebCore::JSHTMLOptionsCollection::remove): Ditto.
1917         * bindings/js/JSImageConstructor.cpp:
1918         (WebCore::JSImageConstructor::JSImageConstructor): Ditto.
1919         (WebCore::constructImage): Ditto.
1920         * bindings/js/JSInspectedObjectWrapper.cpp:
1921         (WebCore::JSInspectedObjectWrapper::wrap): Ditto.
1922         * bindings/js/JSInspectorCallbackWrapper.cpp:
1923         (WebCore::JSInspectorCallbackWrapper::wrap): Ditto.
1924
1925         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1926         (WebCore::JSJavaScriptCallFrame::evaluate): Use noValue.
1927
1928         * bindings/js/JSMessageChannelConstructor.cpp:
1929         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): Use asObject.
1930         (WebCore::JSMessageChannelConstructor::construct): Ditto.
1931         * bindings/js/JSMimeTypeArrayCustom.cpp:
1932         (WebCore::JSMimeTypeArray::nameGetter): Ditto.
1933         * bindings/js/JSNamedNodeMapCustom.cpp:
1934         (WebCore::JSNamedNodeMap::nameGetter): Ditto.
1935         * bindings/js/JSNamedNodesCollection.cpp:
1936         (WebCore::JSNamedNodesCollection::lengthGetter): Ditto.
1937         (WebCore::JSNamedNodesCollection::indexGetter): Ditto.
1938         * bindings/js/JSNodeFilterCustom.cpp:
1939         (WebCore::toNodeFilter): Ditto.
1940         * bindings/js/JSNodeListCustom.cpp:
1941         (WebCore::JSNodeList::nameGetter): Ditto.
1942         * bindings/js/JSPluginArrayCustom.cpp:
1943         (WebCore::JSPluginArray::nameGetter): Ditto.
1944         * bindings/js/JSPluginCustom.cpp:
1945         (WebCore::JSPlugin::nameGetter): Ditto.
1946         * bindings/js/JSPluginElementFunctions.cpp:
1947         (WebCore::runtimeObjectGetter): Ditto.
1948         (WebCore::runtimeObjectPropertyGetter): Ditto.
1949         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1950         (WebCore::JSQuarantinedObjectWrapper::asWrapper): Ditto.
1951         (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot): Ditto.
1952         (WebCore::JSQuarantinedObjectWrapper::construct): Ditto.
1953         * bindings/js/JSRGBColor.cpp:
1954         (jsRGBColorRed): Ditto.
1955         (jsRGBColorGreen): Ditto.
1956         (jsRGBColorBlue): Ditto.
1957
1958         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1959         (WebCore::JSSQLResultSetRowList::item): Use noValue.
1960
1961         * bindings/js/JSStorageCustom.cpp:
1962         (WebCore::JSStorage::nameGetter): Use asObject.
1963         (WebCore::JSStorage::deleteProperty): Ditto.
1964         (WebCore::JSStorage::customPut): Ditto.
1965         * bindings/js/JSStyleSheetListCustom.cpp:
1966         (WebCore::JSStyleSheetList::nameGetter): Ditto.
1967         * bindings/js/JSXMLHttpRequestConstructor.cpp:
1968         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): Ditto.
1969         * bindings/js/JSXSLTProcessorCustom.cpp:
1970         (WebCore::JSXSLTProcessor::importStylesheet): Ditto.
1971         (WebCore::JSXSLTProcessor::transformToFragment): Ditto.
1972         (WebCore::JSXSLTProcessor::transformToDocument): Ditto.
1973
1974         * bindings/js/ScriptController.cpp:
1975         (WebCore::ScriptController::evaluate): Use noValue.
1976         * bindings/objc/DOMInternal.mm:
1977         (-[WebScriptObject _initializeScriptDOMNodeImp]): Ditto.
1978
1979         * bindings/objc/WebScriptObject.mm:
1980         (-[WebScriptObject evaluateWebScript:]): Use JSValuePtr.
1981         (-[WebScriptObject valueForKey:]): Ditto.
1982         (-[WebScriptObject webScriptValueAtIndex:]): Ditto.
1983         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1984         Use asObject and asString.
1985
1986         * bindings/scripts/CodeGeneratorJS.pm: Use asObject.
1987
1988         * bridge/c/c_instance.h: Use JSValuePtr.
1989         * bridge/c/c_runtime.cpp:
1990         (JSC::Bindings::CField::setValueToInstance): Ditto.
1991
1992         * bridge/c/c_utility.cpp:
1993         (JSC::Bindings::convertValueToNPVariant): Use asObject.
1994
1995         * bridge/jni/jni_instance.cpp:
1996         (JavaInstance::booleanValue): Use JSValuePtr.
1997         (JavaInstance::invokeMethod): Ditto. And noValue.
1998         * bridge/jni/jni_jsobject.mm:
1999         (JavaJSObject::getSlot): Ditto.
2000         (JavaJSObject::convertValueToJObject): Ditto.
2001         * bridge/jni/jni_runtime.cpp:
2002         (JavaField::dispatchValueFromInstance): Ditto.
2003         (JavaField::valueFromInstance): Ditto.
2004         (JavaField::dispatchSetValueToInstance): Ditto.
2005         (JavaField::setValueToInstance): Ditto.
2006         (JavaArray::setValueAt): Ditto.
2007         (JavaArray::valueAt): Ditto.
2008         * bridge/jni/jni_runtime.h: Ditto.
2009
2010         * bridge/jni/jni_utility.cpp:
2011         (JSC::Bindings::convertArrayInstanceToJavaArray): Take a JSArray*
2012         instead of a JSValue*.
2013         (JSC::Bindings::convertValueToJValue): Use asObject and asArray.
2014
2015         * bridge/objc/objc_class.h: Use JSValuePtr.
2016         * bridge/objc/objc_instance.h: Ditto.
2017         * bridge/objc/objc_runtime.h: Ditto.
2018
2019         * bridge/objc/objc_runtime.mm:
2020         (JSC::Bindings::callObjCFallbackObject): Use asObject.
2021
2022         * bridge/objc/objc_utility.h: Use JSValuePtr.
2023         * bridge/objc/objc_utility.mm:
2024         (JSC::Bindings::convertValueToObjcValue): Use JSValuePtr and asObject.
2025         (JSC::Bindings::convertObjcValueToValue): Use jsUndefined() instead of 0.
2026
2027         * bridge/runtime.cpp:
2028         (JSC::Bindings::Instance::getValueOfField): Use JSValuePtr.
2029         (JSC::Bindings::Instance::setValueOfField): Ditto.
2030
2031         * bridge/runtime_array.cpp:
2032         (JSC::RuntimeArray::lengthGetter): Use JSValuePtr and asObject.
2033         (JSC::RuntimeArray::indexGetter): Ditto.
2034         * bridge/runtime_array.h: Ditto.
2035         * bridge/runtime_method.cpp:
2036         (JSC::RuntimeMethod::lengthGetter): Ditto.
2037         (JSC::callRuntimeMethod): Ditto.
2038         * bridge/runtime_object.cpp:
2039         (JSC::RuntimeObjectImp::fallbackObjectGetter): Ditto.
2040         (JSC::RuntimeObjectImp::fieldGetter): Ditto.
2041         (JSC::RuntimeObjectImp::methodGetter): Ditto.
2042
2043         * loader/FrameLoader.cpp:
2044         (WebCore::FrameLoader::executeScript): Use noValue.
2045
2046         * page/Console.cpp:
2047         (WebCore::Console::trace): Use asInternalFunction.
2048
2049 2008-10-19  Dan Bernstein  <mitz@apple.com>
2050
2051         Reviewed by Timothy Hatcher.
2052
2053         - lower the default button repaint frequency
2054
2055         * rendering/RenderButton.cpp:
2056         (WebCore::RenderButton::styleDidChange): Changed the timer interval from
2057         0.01 to 0.03.
2058
2059 2008-10-18  Dan Bernstein  <mitz@apple.com>
2060
2061         Reviewed by Mark Rowe.
2062
2063         - Windows build fix
2064
2065         * rendering/RenderThemeSafari.cpp:
2066         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
2067         (WebCore::RenderThemeSafari::paintMediaMuteButton):
2068         (WebCore::RenderThemeSafari::paintMediaPlayButton):
2069         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
2070         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
2071         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
2072
2073 2008-10-18  Dan Bernstein  <mitz@apple.com>
2074
2075         Reviewed by Sam Weinig.
2076
2077         - WebCore part of https://bugs.webkit.org/show_bug.cgi?id=21736
2078           Long-dead decoded image data make up for most of the object cache's memory use over time
2079
2080         Add a cache setting for how long decoded image data should be allowed to
2081         persist in memory after the image has died. By default, this is set to
2082         0, which means "forever".
2083
2084         * loader/Cache.cpp:
2085         (WebCore::Cache::Cache): Initialize m_deadDecodedDataDeletionInterval.
2086         * loader/Cache.h:
2087         (WebCore::Cache::setDeadDecodedDataDeletionInterval): Added a setter.
2088         (WebCore::Cache::deadDecodedDataDeletionInterval): Added a getter.
2089         * loader/CachedImage.cpp:
2090         (WebCore::CachedImage::CachedImage): Initialize the decoded data
2091         deletion timer.
2092         (WebCore::CachedImage::decodedDataDeletionTimerFired): Added. Destroys
2093         the decoded image data.
2094         (WebCore::CachedImage::addClient): Stop the timer if it is active.
2095         (WebCore::CachedImage::allClientsRemoved): Start the decoded data
2096         deletion timer.
2097         * loader/CachedImage.h:
2098
2099 2008-10-18  Darin Adler  <darin@apple.com>
2100
2101         Reviewed by Dan Bernstein.
2102
2103         - fix https://bugs.webkit.org/show_bug.cgi?id=21645
2104           REGRESSION (r37469-r37605): File Input not Uploaded in Multipart/Form-data Form
2105
2106         * html/HTMLFormElement.cpp:
2107         (WebCore::HTMLFormElement::formData):
2108         Fix loop that goes through the FormDataList to go two at a time in a clearer
2109         way. My last patch screwed up the way it got form content from the items.
2110         This "two at a time" approach is a confusing way to do things, which explains
2111         why I got it wrong last time through, but I decided to just fix it locally for
2112         now rather than changing the design of FormDataList.
2113
2114 2008-10-18  Darin Adler  <darin@apple.com>
2115
2116         Reviewed by Cameron Zwarich.
2117
2118         - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
2119           improve performance by eliminating JSValue as a base class for JSCell
2120
2121         Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
2122         changing JSValuePtr to be a class, and then eventually renaming it
2123         to JSValue once that's done.
2124
2125         * bindings/js/JSAttrCustom.cpp:
2126         * bindings/js/JSCSSRuleCustom.cpp:
2127         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2128         * bindings/js/JSCSSValueCustom.cpp:
2129         * bindings/js/JSCanvasPixelArrayCustom.h:
2130         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2131         * bindings/js/JSClipboardCustom.cpp:
2132         * bindings/js/JSConsoleCustom.cpp:
2133         * bindings/js/JSCustomSQLStatementCallback.cpp:
2134         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2135         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2136         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2137         * bindings/js/JSCustomVoidCallback.cpp:
2138         * bindings/js/JSCustomVoidCallback.h:
2139         * bindings/js/JSCustomXPathNSResolver.cpp:
2140         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2141         * bindings/js/JSDOMBinding.cpp:
2142         * bindings/js/JSDOMBinding.h:
2143         * bindings/js/JSDOMWindowBase.cpp:
2144         * bindings/js/JSDOMWindowBase.h:
2145         * bindings/js/JSDOMWindowCustom.cpp:
2146         * bindings/js/JSDOMWindowCustom.h:
2147         * bindings/js/JSDOMWindowShell.cpp:
2148         * bindings/js/JSDOMWindowShell.h:
2149         * bindings/js/JSDatabaseCustom.cpp:
2150         * bindings/js/JSDocumentCustom.cpp:
2151         * bindings/js/JSElementCustom.cpp:
2152         * bindings/js/JSEventCustom.cpp:
2153         * bindings/js/JSEventListener.cpp:
2154         * bindings/js/JSEventTarget.cpp:
2155         * bindings/js/JSEventTargetBase.h:
2156         * bindings/js/JSEventTargetNodeCustom.cpp:
2157         * bindings/js/JSHTMLAllCollection.h:
2158         * bindings/js/JSHTMLAppletElementCustom.cpp:
2159         * bindings/js/JSHTMLCollectionCustom.cpp:
2160         * bindings/js/JSHTMLDocumentCustom.cpp:
2161         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2162         * bindings/js/JSHTMLFormElementCustom.cpp:
2163         * bindings/js/JSHTMLFrameElementCustom.cpp:
2164         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2165         * bindings/js/JSHTMLIFrameElementCustom.cpp:
2166         * bindings/js/JSHTMLInputElementCustom.cpp:
2167         * bindings/js/JSHTMLObjectElementCustom.cpp:
2168         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2169         * bindings/js/JSHTMLSelectElementCustom.cpp:
2170         * bindings/js/JSHTMLSelectElementCustom.h:
2171         * bindings/js/JSHistoryCustom.cpp:
2172         * bindings/js/JSImageDataCustom.cpp:
2173         * bindings/js/JSInspectedObjectWrapper.cpp:
2174         * bindings/js/JSInspectedObjectWrapper.h:
2175         * bindings/js/JSInspectorCallbackWrapper.cpp:
2176         * bindings/js/JSInspectorCallbackWrapper.h:
2177         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2178         * bindings/js/JSLocationCustom.cpp:
2179         * bindings/js/JSMessagePortCustom.cpp:
2180         * bindings/js/JSMimeTypeArrayCustom.cpp:
2181         * bindings/js/JSNamedNodeMapCustom.cpp:
2182         * bindings/js/JSNamedNodesCollection.cpp:
2183         * bindings/js/JSNamedNodesCollection.h:
2184         * bindings/js/JSNavigatorCustom.cpp:
2185         * bindings/js/JSNodeCustom.cpp:
2186         * bindings/js/JSNodeFilterCondition.cpp:
2187         * bindings/js/JSNodeFilterCustom.cpp:
2188         * bindings/js/JSNodeIteratorCustom.cpp:
2189         * bindings/js/JSNodeListCustom.cpp:
2190         * bindings/js/JSPluginArrayCustom.cpp:
2191         * bindings/js/JSPluginCustom.cpp:
2192         * bindings/js/JSPluginElementFunctions.cpp:
2193         * bindings/js/JSPluginElementFunctions.h:
2194         * bindings/js/JSQuarantinedObjectWrapper.cpp:
2195         * bindings/js/JSQuarantinedObjectWrapper.h:
2196         * bindings/js/JSRGBColor.cpp:
2197         * bindings/js/JSRGBColor.h:
2198         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2199         * bindings/js/JSSQLTransactionCustom.cpp:
2200         * bindings/js/JSSVGElementInstanceCustom.cpp:
2201         * bindings/js/JSSVGLengthCustom.cpp:
2202         * bindings/js/JSSVGMatrixCustom.cpp:
2203         * bindings/js/JSSVGPathSegCustom.cpp:
2204         * bindings/js/JSSVGPathSegListCustom.cpp:
2205         * bindings/js/JSSVGPointListCustom.cpp:
2206         * bindings/js/JSSVGTransformListCustom.cpp:
2207         * bindings/js/JSStorageCustom.cpp:
2208         * bindings/js/JSStyleSheetCustom.cpp:
2209         * bindings/js/JSStyleSheetListCustom.cpp:
2210         * bindings/js/JSTextCustom.cpp:
2211         * bindings/js/JSTreeWalkerCustom.cpp:
2212         * bindings/js/JSXMLHttpRequestCustom.cpp:
2213         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2214         * bindings/js/JSXSLTProcessorCustom.cpp:
2215         * bindings/js/ScheduledAction.cpp:
2216         * bindings/js/ScheduledAction.h:
2217         * bindings/js/ScriptController.cpp:
2218         * bindings/js/ScriptController.h:
2219         * bindings/objc/WebScriptObject.mm:
2220         * bindings/scripts/CodeGeneratorJS.pm:
2221         * bridge/NP_jsobject.cpp:
2222         * bridge/c/c_instance.cpp:
2223         * bridge/c/c_instance.h:
2224         * bridge/c/c_runtime.cpp:
2225         * bridge/c/c_runtime.h:
2226         * bridge/c/c_utility.cpp:
2227         * bridge/jni/jni_instance.cpp:
2228         * bridge/jni/jni_instance.h:
2229         * bridge/jni/jni_jsobject.mm:
2230         * bridge/jni/jni_objc.mm:
2231         * bridge/jni/jni_runtime.cpp:
2232         * bridge/jni/jni_runtime.h:
2233         * bridge/jni/jni_utility.cpp:
2234         * bridge/objc/objc_class.mm:
2235         * bridge/objc/objc_instance.h:
2236         * bridge/objc/objc_instance.mm:
2237         * bridge/objc/objc_runtime.h:
2238         * bridge/objc/objc_runtime.mm:
2239         * bridge/objc/objc_utility.h:
2240         * bridge/objc/objc_utility.mm:
2241         * bridge/runtime.h:
2242         * bridge/runtime_array.cpp:
2243         * bridge/runtime_array.h:
2244         * bridge/runtime_method.cpp:
2245         * bridge/runtime_method.h:
2246         * bridge/runtime_object.cpp:
2247         * bridge/runtime_object.h:
2248         * inspector/JavaScriptCallFrame.cpp:
2249         * inspector/JavaScriptCallFrame.h:
2250         * inspector/JavaScriptProfile.cpp:
2251         * inspector/JavaScriptProfileNode.cpp:
2252         * loader/FrameLoader.cpp:
2253         * loader/FrameLoader.h:
2254         * page/Console.cpp:
2255         * page/Console.h:
2256         * plugins/MimeTypeArray.h:
2257         * plugins/Plugin.h:
2258         * plugins/PluginArray.h:
2259         * xml/XMLHttpRequest.cpp:
2260         Replace JSValue* with JSValuePtr.
2261
2262 2008-10-18  Darin Adler  <darin@apple.com>
2263
2264         Reviewed by Oliver Hunt.
2265
2266         - first step of https://bugs.webkit.org/show_bug.cgi?id=21732
2267           improve performance by eliminating JSValue as a base class for JSCell
2268
2269         Update for change to make PreferredPrimitiveType no longer
2270         a member of JSValue.
2271
2272         * bridge/c/c_instance.cpp:
2273         (JSC::Bindings::CInstance::defaultValue): Removed JSValue:: prefix.
2274         * bridge/jni/jni_instance.cpp:
2275         (JavaInstance::defaultValue): Ditto.
2276         * bridge/objc/objc_instance.mm:
2277         (ObjcInstance::defaultValue): Ditto.
2278         * bridge/qt/qt_instance.cpp:
2279         (JSC::Bindings::QtInstance::defaultValue): Ditto.
2280         * bridge/runtime.h: Ditto. Also removed typedef.
2281
2282 2008-10-18  Darin Adler  <darin@apple.com>
2283
2284         - try to fix Windows build
2285
2286         * rendering/RenderThemeSafari.cpp:
2287         (WebCore::RenderThemeSafari::paintCheckbox): Explicitly qualify part name with
2288         SafariTheme namespace, since there is now an identically named constant in
2289         the ControlPart enum.
2290         (WebCore::RenderThemeSafari::paintButton): Ditto.
2291         (WebCore::RenderThemeSafari::paintTextField): Ditto.
2292         (WebCore::RenderThemeSafari::paintTextArea): Ditto.
2293         (WebCore::RenderThemeSafari::paintSearchField): Ditto.
2294         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton): Ditto.
2295         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): Ditto.
2296         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): Ditto.
2297
2298 2008-10-18  Jan Michael Alonzo  <jmalonzo@webkit.org>
2299
2300         Reviewed by Alp Toker.
2301
2302         [GTK] crash after selecting a file on an <input type=file>
2303         https://bugs.webkit.org/show_bug.cgi?id=21385
2304
2305         Follow Mac and Win's behaviors for Icon::paint
2306
2307         * platform/graphics/gtk/IconGtk.cpp:
2308         (WebCore::Icon::paint): check if painting is enabled before
2309         painting the icon
2310
2311 2008-10-18  Zan Dobersek  <zandobersek@gmail.com>
2312
2313         Reviewed by Oliver Hunt.
2314
2315         Qt port build fix.
2316
2317         * platform/qt/RenderThemeQt.h:
2318
2319 2008-10-17  Kevin Watters  <kevinwatters@gmail.com>
2320
2321         Reviewed by Kevin Ollivier
2322         
2323         Fix wx port's scrollbar and drawing handling after recent changes.
2324         
2325         https://bugs.webkit.org/show_bug.cgi?id=21720
2326
2327         * platform/ScrollView.h:
2328         * platform/wx/ScrollViewWx.cpp:
2329         (WebCore::ScrollView::platformVisibleContentRect):
2330         (WebCore::ScrollView::platformContentsSize):
2331         (WebCore::ScrollView::platformSetContentsSize):
2332         * platform/wx/WidgetWx.cpp:
2333         (WebCore::Widget::paint):
2334
2335 2008-10-17  Kevin Ollivier  <kevino@theolliviers.com>
2336
2337         wx build fix. EAppearance -> ControlPart.
2338
2339         * platform/wx/RenderThemeWx.cpp:
2340         (WebCore::RenderThemeWx::isControlStyled):
2341         (WebCore::RenderThemeWx::adjustRepaintRect):
2342         (WebCore::RenderThemeWx::controlSupportsTints):
2343         (WebCore::RenderThemeWx::supportsFocus):
2344         (WebCore::RenderThemeWx::paintButton):
2345
2346 2008-10-17  David Hyatt  <hyatt@apple.com>
2347
2348         Eliminate the EAppearance enum in favor of the new ControlPart enum.  Cut out the scrollbar
2349         values from the enum since they are handled by ScrollbarTheme instead.
2350
2351         Reviewed by Tim Hatcher
2352
2353         * css/CSSPrimitiveValueMappings.h:
2354         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2355         (WebCore::CSSPrimitiveValue::operator ControlPart):
2356         * css/CSSStyleSelector.cpp:
2357         (WebCore::CSSStyleSelector::adjustRenderStyle):
2358         * css/CSSValueKeywords.in:
2359         * platform/gtk/RenderThemeGtk.cpp:
2360         (WebCore::supportsFocus):
2361         (WebCore::RenderThemeGtk::baselinePosition):
2362         (WebCore::setToggleSize):
2363         (WebCore::RenderThemeGtk::setCheckboxSize):
2364         (WebCore::RenderThemeGtk::setRadioSize):
2365         (WebCore::RenderThemeGtk::adjustButtonStyle):
2366         * platform/qt/RenderThemeQt.cpp:
2367         (WebCore::RenderThemeQt::baselinePosition):
2368         (WebCore::RenderThemeQt::controlSupportsTints):
2369         (WebCore::RenderThemeQt::adjustRepaintRect):
2370         (WebCore::RenderThemeQt::isControlStyled):
2371         (WebCore::computeSizeBasedOnStyle):
2372         (WebCore::RenderThemeQt::paintButton):
2373         (WebCore::RenderThemeQt::paintTextField):
2374         (WebCore::RenderThemeQt::paintMenuList):
2375         (WebCore::RenderThemeQt::supportsFocus):
2376         (WebCore::RenderThemeQt::applyTheme):
2377         (WebCore::RenderThemeQt::adjustSliderThumbSize):
2378         * platform/qt/RenderThemeQt.h:
2379         * rendering/RenderSlider.cpp:
2380         (WebCore::RenderSlider::createThumbStyle):
2381         (WebCore::RenderSlider::layout):
2382         (WebCore::RenderSlider::setValueForPosition):
2383         (WebCore::RenderSlider::setPositionFromValue):
2384         (WebCore::RenderSlider::positionForOffset):
2385         (WebCore::RenderSlider::currentPosition):
2386         (WebCore::RenderSlider::setCurrentPosition):
2387         (WebCore::RenderSlider::trackSize):
2388         * rendering/RenderTheme.cpp:
2389         (WebCore::RenderTheme::adjustStyle):
2390         (WebCore::RenderTheme::paint):
2391         (WebCore::RenderTheme::paintBorderOnly):
2392         (WebCore::RenderTheme::paintDecorations):
2393         (WebCore::RenderTheme::isControlContainer):
2394         (WebCore::RenderTheme::isControlStyled):
2395         (WebCore::RenderTheme::supportsFocusRing):
2396         (WebCore::RenderTheme::isDefault):
2397         * rendering/RenderTheme.h:
2398         * rendering/RenderThemeMac.mm:
2399         (WebCore::RenderThemeMac::isControlStyled):
2400         (WebCore::RenderThemeMac::adjustRepaintRect):
2401         (WebCore::RenderThemeMac::baselinePosition):
2402         (WebCore::RenderThemeMac::controlSupportsTints):
2403         (WebCore::RenderThemeMac::adjustButtonStyle):
2404         (WebCore::RenderThemeMac::setButtonCellState):
2405         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
2406         (WebCore::RenderThemeMac::popupInternalPaddingRight):
2407         (WebCore::RenderThemeMac::popupInternalPaddingTop):
2408         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
2409         (WebCore::RenderThemeMac::paintSliderTrack):
2410         (WebCore::RenderThemeMac::paintSliderThumb):
2411         (WebCore::RenderThemeMac::adjustSliderThumbSize):
2412         * rendering/RenderThemeSafari.cpp:
2413         (WebCore::RenderThemeSafari::isControlStyled):
2414         (WebCore::RenderThemeSafari::adjustRepaintRect):
2415         (WebCore::RenderThemeSafari::baselinePosition):
2416         (WebCore::RenderThemeSafari::controlSupportsTints):
2417         (WebCore::RenderThemeSafari::adjustButtonStyle):
2418         (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
2419         (WebCore::RenderThemeSafari::popupInternalPaddingRight):
2420         (WebCore::RenderThemeSafari::popupInternalPaddingTop):
2421         (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
2422         (WebCore::RenderThemeSafari::paintSliderTrack):
2423         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2424         * rendering/RenderThemeWin.cpp:
2425         (WebCore::RenderThemeWin::supportsFocus):
2426         (WebCore::RenderThemeWin::determineClassicState):
2427         (WebCore::RenderThemeWin::getClassicThemeData):
2428         (WebCore::RenderThemeWin::getThemeData):
2429         (WebCore::drawControl):
2430         (WebCore::RenderThemeWin::paintSliderTrack):
2431         (WebCore::RenderThemeWin::adjustSliderThumbSize):
2432         * rendering/RenderThemeWin.h:
2433         * rendering/style/RenderStyle.h:
2434         (WebCore::InheritedFlags::hasAppearance):
2435         (WebCore::InheritedFlags::appearance):
2436         (WebCore::InheritedFlags::setAppearance):
2437         (WebCore::InheritedFlags::initialAppearance):
2438         * rendering/style/RenderStyleConstants.h:
2439
2440 2008-10-17  David Hyatt  <hyatt@apple.com>
2441
2442         Beginning of the RenderTheme re-architecture (to share more code).  Add the new Theme API header
2443         file.  Add new USE(NEW_THEME) switch that is enabled on Mac.  The Mac theme will be converted first.
2444
2445         Reviewed by Tim Hatcher
2446
2447         * WebCore.vcproj/WebCore.vcproj:
2448         * WebCore.xcodeproj/project.pbxproj:
2449         * config.h:
2450         * platform/Theme.h: Added.
2451         (WebCore::Theme::Theme):
2452         (WebCore::Theme::~Theme):
2453         (WebCore::Theme::baselinePositionAdjustment):
2454         (WebCore::Theme::controlHasInactiveAppearance):
2455         (WebCore::Theme::controlsCanHaveInactiveAppearance):
2456         (WebCore::Theme::controlsCanHaveHoveredAppearance):
2457         (WebCore::Theme::controlDrawsBorder):
2458         (WebCore::Theme::controlDrawsBackground):
2459         (WebCore::Theme::controlDrawsFocusOutline):
2460         (WebCore::Theme::selectionColor):
2461         (WebCore::Theme::textSearchHighlightColor):
2462         (WebCore::Theme::systemColor):
2463         (WebCore::Theme::systemFont):
2464         (WebCore::Theme::caretBlinkFrequency):
2465         (WebCore::Theme::themeChanged):
2466         (WebCore::Theme::controlSize):
2467         (WebCore::Theme::controlFont):
2468         (WebCore::Theme::controlPadding):
2469         (WebCore::Theme::controlInternalPadding):
2470         (WebCore::Theme::controlBorder):
2471         (WebCore::Theme::controlBorderRadius):
2472         (WebCore::Theme::paint):
2473         (WebCore::Theme::inflateControlPaintRect):
2474         * platform/ThemeTypes.h: Added.
2475         (WebCore::):
2476         (WebCore::ControlBox::ControlBox):
2477         (WebCore::ControlBox::top):
2478         (WebCore::ControlBox::right):
2479         (WebCore::ControlBox::bottom):
2480         (WebCore::ControlBox::left):
2481         * platform/mac/ThemeMac.h: Added.
2482         (WebCore::ThemeMac::ThemeMac):
2483         (WebCore::ThemeMac::~ThemeMac):
2484         * platform/mac/ThemeMac.mm: Added.
2485         (WebCore::platformTheme):
2486         * rendering/RenderTheme.cpp:
2487         (WebCore::RenderTheme::RenderTheme):
2488         * rendering/RenderTheme.h:
2489
2490 2008-10-17  Marco Barisione  <marco.barisione@collabora.co.uk>
2491
2492         Reviewed by Sam Weinig. Landed by Jan Alonzo.
2493
2494         https://bugs.webkit.org/show_bug.cgi?id=21603
2495         [GTK] Minor fixes to GOwnPtr
2496
2497         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2498         (WebCore::mediaPlayerPrivateErrorCallback):
2499
2500 2008-10-17  Timothy Hatcher  <timothy@apple.com>
2501
2502         Recompile the JavaScript functions when removing any listener, so functions that are
2503         not being debugged can resume normal speed again.
2504
2505         https://bugs.webkit.org/show_bug.cgi?id=21715
2506
2507         Reviewed by Geoffrey Garen.
2508
2509         * bindings/js/JSDOMWindowBase.cpp:
2510         (WebCore::JSDOMWindowBase::globalExec): Changed an assert into an if check. This assert
2511         was firing when closing the window and having the recompile fire after. This was an
2512         overzelious assert now.
2513         * inspector/JavaScriptDebugServer.cpp:
2514         (WebCore::JavaScriptDebugServer::didRemoveListener): Start the recompile timer.
2515         (WebCore::JavaScriptDebugServer::didRemoveLastListener): Removed the recompile timer start.
2516
2517 2008-10-17  Timothy Hatcher  <timothy@apple.com>
2518
2519         Fixes a regression where starting a debugging session in
2520         another Web Inspector window would not show any scripts.
2521         Also only attach the debugger to only the required Pages.
2522
2523         https://bugs.webkit.org/show_bug.cgi?id=21708
2524
2525         Reviewed by Darin Adler.
2526
2527         * inspector/JavaScriptDebugServer.cpp:
2528         (WebCore::JavaScriptDebugServer::addListener): Add an assert and
2529         remove the call to willAddFirstListener(). Add a call to
2530         didAddListener().
2531         (WebCore::JavaScriptDebugServer::removeListener): Add an assert
2532         and call to didRemoveListener().
2533         (WebCore::JavaScriptDebugServer::pageCreated): Attach the debugger
2534         if there is a listener interested in the new Page.
2535         (WebCore::JavaScriptDebugServer::hasListenersInterestedInPage):
2536         Use hasGlobalListeners() instead of isEmpty().
2537         (WebCore::JavaScriptDebugServer::sourceParsed): Ditto.
2538         (WebCore::JavaScriptDebugServer::didAddListener): Added. Attach the
2539         debugger to the page if non-null, or all pages if page is null.
2540         (WebCore::JavaScriptDebugServer::didRemoveListener): Added. Detach
2541         the debugger only if there are no interested listeners.
2542         (WebCore::JavaScriptDebugServer::didRemoveLastListener): Remove the
2543         call to Page::setDebuggerForAllPages().
2544         * inspector/JavaScriptDebugServer.h:
2545         (WebCore::JavaScriptDebugServer::hasGlobalListeners): Added.
2546
2547 2008-10-15  Brett Wilson  <brettw@chromium.org>
2548
2549         Reviewed by Timothy Hatcher.
2550
2551         Have ImageDocument generate its own filename for the title of images
2552         without relying on the suggested filename from the network layer, which
2553         may be nonexistant or not relevant.
2554         https://bugs.webkit.org/show_bug.cgi?id=21565
2555
2556         * loader/ImageDocument.cpp:
2557         (WebCore::ImageTokenizer::finish):
2558
2559 2008-10-17  Alexey Proskuryakov  <ap@webkit.org>
2560
2561         Non-Mac build fix.
2562
2563         * GNUmakefile.am:
2564         * WebCore.pro:
2565         * WebCore.vcproj/WebCore.vcproj:
2566         * WebCoreSources.bkl:
2567         Added ActiveDOMObject to the build.
2568
2569 2008-10-17  Alexey Proskuryakov  <ap@webkit.org>
2570
2571         Reviewed by Sam Weinig.
2572
2573         https://bugs.webkit.org/show_bug.cgi?id=21642
2574         Abstract out active object tracking
2575
2576         * WebCore.xcodeproj/project.pbxproj:
2577         * bindings/js/JSDOMBinding.cpp:
2578         (WebCore::markActiveObjectsForDocument):
2579         * dom/ActiveDOMObject.cpp: Added.
2580         (WebCore::ActiveDOMObject::ActiveDOMObject):
2581         (WebCore::ActiveDOMObject::~ActiveDOMObject):
2582         (WebCore::ActiveDOMObject::contextDestroyed):
2583         (WebCore::ActiveDOMObject::stop):
2584         * dom/ActiveDOMObject.h: Added.
2585         (WebCore::ActiveDOMObject::document):
2586         (WebCore::ActiveDOMObject::hasPendingActivity):
2587         (WebCore::ActiveDOMObject::setPendingActivity):
2588         (WebCore::ActiveDOMObject::unsetPendingActivity):
2589         * dom/Document.cpp:
2590         (WebCore::Document::~Document):
2591         (WebCore::Document::stopActiveDOMObjects):
2592         (WebCore::Document::createdActiveDOMObject):
2593         (WebCore::Document::destroyedActiveDOMObject):
2594         * dom/Document.h:
2595         (WebCore::Document::activeDOMObjects):
2596         * dom/MessagePort.cpp:
2597         (WebCore::MessagePort::contextDestroyed):
2598         * dom/MessagePort.h:
2599         * loader/FrameLoader.cpp:
2600         (WebCore::FrameLoader::stopLoading):
2601         * xml/XMLHttpRequest.cpp:
2602         (WebCore::XMLHttpRequest::XMLHttpRequest):
2603         (WebCore::XMLHttpRequest::~XMLHttpRequest):
2604         (WebCore::XMLHttpRequest::associatedFrame):
2605         (WebCore::XMLHttpRequest::responseXML):
2606         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2607         (WebCore::XMLHttpRequest::initSend):
2608         (WebCore::XMLHttpRequest::send):
2609         (WebCore::XMLHttpRequest::createRequest):
2610         (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
2611         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
2612         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
2613         (WebCore::XMLHttpRequest::loadRequestSynchronously):
2614         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
2615         (WebCore::XMLHttpRequest::dropProtection):
2616         (WebCore::XMLHttpRequest::setRequestHeader):
2617         (WebCore::XMLHttpRequest::processSyncLoadResults):
2618         (WebCore::XMLHttpRequest::didFinishLoading):
2619         (WebCore::XMLHttpRequest::didFinishLoadingPreflight):
2620         (WebCore::XMLHttpRequest::willSendRequest):
2621         (WebCore::XMLHttpRequest::accessControlCheck):
2622         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
2623         (WebCore::XMLHttpRequest::stop):
2624         (WebCore::XMLHttpRequest::contextDestroyed):
2625         * xml/XMLHttpRequest.h:
2626         Move activity tracking to a new ActiveDOMObject class.
2627
2628 2008-10-16  David Hyatt  <hyatt@apple.com>
2629
2630         Simplify styleForRenderer to avoid confusion.  Callers in the SVG filter code thought "forRenderer" meant
2631         they would be given a style that corresponded to the RenderObject* passed in.  This is not what the code
2632         did though.  This patch removes the renderer argument and the Element subclass shadow implementation
2633         so that confusion like this can't occur again.
2634
2635         Reviewed by Oliver Hunt
2636
2637         * dom/Element.cpp:
2638         * dom/Element.h:
2639         * dom/Node.cpp:
2640         (WebCore::Node::createRendererIfNeeded):
2641         (WebCore::Node::styleForRenderer):
2642         * dom/Node.h:
2643         * html/HTMLOptGroupElement.cpp:
2644         (WebCore::HTMLOptGroupElement::attach):
2645         * html/HTMLOptionElement.cpp:
2646         (WebCore::HTMLOptionElement::attach):
2647         * svg/SVGClipPathElement.cpp:
2648         (WebCore::SVGClipPathElement::canvasResource):
2649         * svg/SVGFEDiffuseLightingElement.cpp:
2650         (WebCore::SVGFEDiffuseLightingElement::build):
2651         * svg/SVGFEFloodElement.cpp:
2652         (WebCore::SVGFEFloodElement::build):
2653         * svg/SVGFESpecularLightingElement.cpp:
2654         (WebCore::SVGFESpecularLightingElement::build):
2655         * svg/SVGGradientElement.cpp:
2656         (WebCore::SVGGradientElement::buildStops):
2657         * svg/SVGUseElement.cpp:
2658         (WebCore::SVGUseElement::attachShadowTree):
2659
2660 2008-10-16  David Hyatt  <hyatt@apple.com>
2661
2662         https://bugs.webkit.org/attachment.cgi?bugid=21647
2663
2664         Make RenderStyle inherit from RefCounted so that it works with RefPtr.  RenderStyle was being malloced
2665         out of the RenderArena.  Years and years ago (before TCMalloc), the plan was to make RenderStyles and
2666         all their associated sub-structs use the arena.  However only the RenderStyle itself was ever changed
2667         to use the arena.
2668
2669         At a later point style sharing was implemented, which made using the arena for styles pretty pointless,
2670         as the bulk of the styles on a given page are actually shared.  Not ever making the sub-structs use the
2671         arena also limited the usefulness.
2672
2673         Now that we have RefPtr/PassRefPtr to eliminate manual ref/deref and now that we use TCMalloc for fast
2674         mallocs, there is no reason to keep RenderStyles in the arena.  The benefits of being able to eliminate
2675         manual ref/deref far outweigh keeping them in the arena.
2676
2677         Reviewed by Adam Roben
2678
2679         * css/CSSStyleSelector.cpp:
2680         (WebCore::CSSStyleSelector::CSSStyleSelector):
2681         (WebCore::CSSStyleSelector::~CSSStyleSelector):
2682         (WebCore::CSSStyleSelector::styleForElement):
2683         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
2684         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2685         These methods now return a PassRefPtr.  They will null out the m_style variable as they hand it back
2686         so that it isn't left pointing to the previous style resolve RenderStyle (which is what the old code did).
2687
2688         (WebCore::CSSStyleSelector::updateFont):
2689         (WebCore::CSSStyleSelector::checkSelector):
2690         (WebCore::CSSStyleSelector::applyProperty):
2691         (WebCore::CSSStyleSelector::mapFillSize):
2692         (WebCore::CSSStyleSelector::mapFillXPosition):
2693         (WebCore::CSSStyleSelector::mapFillYPosition):
2694         * css/CSSStyleSelector.h:
2695         (WebCore::CSSStyleSelector::style):
2696         * dom/Document.cpp:
2697         (WebCore::Document::recalcStyle):
2698         * dom/Element.cpp:
2699         (WebCore::Element::styleForRenderer):
2700         (WebCore::Element::recalcStyle):
2701         (WebCore::Element::computedStyle):
2702         * dom/Element.h:
2703         * dom/ElementRareData.h:
2704         (WebCore::ElementRareData::ElementRareData):
2705         (WebCore::ElementRareData::resetComputedStyle):
2706         * dom/Node.cpp:
2707         (WebCore::Node::diff):
2708         (WebCore::Node::createRendererIfNeeded):
2709         (WebCore::Node::styleForRenderer):
2710         (WebCore::Node::setRenderStyle):
2711         * dom/Node.h:
2712         * html/CanvasRenderingContext2D.cpp:
2713         (WebCore::CanvasRenderingContext2D::setFont):
2714         * html/HTMLOptGroupElement.cpp:
2715         (WebCore::HTMLOptGroupElement::attach):
2716         (WebCore::HTMLOptGroupElement::detach):
2717         (WebCore::HTMLOptGroupElement::setRenderStyle):
2718         (WebCore::HTMLOptGroupElement::nonRendererRenderStyle):
2719         * html/HTMLOptGroupElement.h:
2720         * html/HTMLOptionElement.cpp:
2721         (WebCore::HTMLOptionElement::attach):
2722         (WebCore::HTMLOptionElement::detach):
2723         (WebCore::HTMLOptionElement::setRenderStyle):
2724         (WebCore::HTMLOptionElement::nonRendererRenderStyle):
2725         * html/HTMLOptionElement.h:
2726         * page/animation/AnimationBase.h:
2727         (WebCore::AnimationBase::animate):
2728         * page/animation/AnimationController.cpp:
2729         (WebCore::AnimationController::updateAnimations):
2730         * page/animation/AnimationController.h:
2731         * page/animation/CompositeAnimation.cpp:
2732         (WebCore::CompositeAnimationPrivate::updateTransitions):
2733         (WebCore::CompositeAnimationPrivate::updateKeyframeAnimations):
2734         (WebCore::CompositeAnimationPrivate::animate):
2735         (WebCore::CompositeAnimation::animate):
2736         * page/animation/CompositeAnimation.h:
2737         * page/animation/ImplicitAnimation.cpp:
2738         (WebCore::ImplicitAnimation::ImplicitAnimation):
2739         (WebCore::ImplicitAnimation::~ImplicitAnimation):
2740         (WebCore::ImplicitAnimation::animate):
2741         (WebCore::ImplicitAnimation::reset):
2742         (WebCore::ImplicitAnimation::isTargetPropertyEqual):
2743         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
2744         * page/animation/ImplicitAnimation.h:
2745         (WebCore::ImplicitAnimation::create):
2746         * page/animation/KeyframeAnimation.cpp:
2747         (WebCore::KeyframeAnimation::KeyframeAnimation):
2748         (WebCore::KeyframeAnimation::~KeyframeAnimation):
2749         (WebCore::KeyframeAnimation::animate):
2750         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2751         * page/animation/KeyframeAnimation.h:
2752         (WebCore::KeyframeAnimation::create):
2753         (WebCore::KeyframeAnimation::unanimatedStyle):
2754         * rendering/InlineTextBox.cpp:
2755         (WebCore::InlineTextBox::paint):
2756         * rendering/MediaControlElements.cpp:
2757         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
2758         (WebCore::MediaControlInputElement::MediaControlInputElement):
2759         * rendering/RenderBlock.cpp:
2760         (WebCore::RenderBlock::styleDidChange):
2761         (WebCore::RenderBlock::updateFirstLetter):
2762         * rendering/RenderContainer.cpp:
2763         (WebCore::RenderContainer::addChild):
2764         (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
2765         * rendering/RenderFileUploadControl.cpp:
2766         (WebCore::RenderFileUploadControl::updateFromElement):
2767         (WebCore::RenderFileUploadControl::createButtonStyle):
2768         * rendering/RenderFileUploadControl.h:
2769         * rendering/RenderFlow.cpp:
2770         (WebCore::RenderFlow::createAnonymousFlow):
2771         * rendering/RenderFlow.h:
2772         * rendering/RenderInline.cpp:
2773         (WebCore::RenderInline::addChildToFlow):
2774         * rendering/RenderLayer.cpp:
2775         (WebCore::RenderLayer::updateScrollCornerStyle):
2776         (WebCore::RenderLayer::updateResizerStyle):
2777         (WebCore::RenderLayer::updateReflectionStyle):
2778         * rendering/RenderListItem.cpp:
2779         (WebCore::RenderListItem::styleDidChange):
2780         * rendering/RenderMedia.cpp:
2781         (WebCore::RenderMedia::createPanel):
2782         (WebCore::RenderMedia::createTimeDisplay):
2783         (WebCore::RenderMedia::changeOpacity):
2784         * rendering/RenderObject.cpp:
2785         (WebCore::RenderObject::selectionBackgroundColor):
2786         (WebCore::RenderObject::selectionForegroundColor):
2787         (WebCore::RenderObject::createAnonymousBlock):
2788         (WebCore::RenderObject::setAnimatableStyle):
2789         (WebCore::RenderObject::setStyle):
2790         (WebCore::RenderObject::setStyleInternal):
2791         (WebCore::RenderObject::arenaDelete):
2792         (WebCore::RenderObject::firstLineStyle):
2793         (WebCore::RenderObject::getPseudoStyle):
2794         * rendering/RenderObject.h:
2795         (WebCore::RenderObject::style):
2796         * rendering/RenderSVGBlock.cpp:
2797         (WebCore::RenderSVGBlock::setStyle):
2798         * rendering/RenderSVGBlock.h:
2799         * rendering/RenderScrollbar.cpp:
2800         (WebCore::RenderScrollbar::getScrollbarPseudoStyle):
2801         (WebCore::RenderScrollbar::updateScrollbarPart):
2802         * rendering/RenderScrollbar.h:
2803         * rendering/RenderSlider.cpp:
2804         (WebCore::RenderSlider::styleDidChange):
2805         (WebCore::RenderSlider::createThumbStyle):
2806         (WebCore::RenderSlider::updateFromElement):
2807         * rendering/RenderSlider.h:
2808         * rendering/RenderTable.cpp:
2809         (WebCore::RenderTable::addChild):
2810         * rendering/RenderTableRow.cpp:
2811         (WebCore::RenderTableRow::addChild):
2812         * rendering/RenderTableSection.cpp:
2813         (WebCore::RenderTableSection::addChild):
2814         * rendering/RenderTextControl.cpp:
2815         (WebCore::RenderTextControl::styleDidChange):
2816         (WebCore::RenderTextControl::createInnerBlockStyle):
2817         (WebCore::RenderTextControl::createInnerTextStyle):
2818         (WebCore::RenderTextControl::createResultsButtonStyle):
2819         (WebCore::RenderTextControl::createCancelButtonStyle):
2820         (WebCore::RenderTextControl::createSubtreeIfNeeded):
2821         (WebCore::RenderTextControl::updatePlaceholderVisibility):
2822         * rendering/RenderTextControl.h:
2823         * rendering/TextControlInnerElements.cpp:
2824         (WebCore::TextControlInnerElement::attachInnerElement):
2825         * rendering/TextControlInnerElements.h:
2826         * rendering/style/KeyframeList.cpp:
2827         (WebCore::KeyframeList::clear):
2828         (WebCore::KeyframeList::operator==):
2829         (WebCore::KeyframeList::insert):
2830         * rendering/style/KeyframeList.h:
2831         (WebCore::KeyframeValue::KeyframeValue):
2832         (WebCore::KeyframeValue::~KeyframeValue):
2833         (WebCore::KeyframeValue::key):
2834         (WebCore::KeyframeValue::style):
2835         * rendering/style/RenderStyle.cpp:
2836         (WebCore::defaultStyle):
2837         (WebCore::RenderStyle::create):
2838         (WebCore::RenderStyle::createDefaultStyle):
2839         (WebCore::RenderStyle::clone):
2840         (WebCore::RenderStyle::RenderStyle):
2841         (WebCore::RenderStyle::getCachedPseudoStyle):
2842         (WebCore::RenderStyle::addCachedPseudoStyle):
2843         * rendering/style/RenderStyle.h:
2844         (WebCore::):
2845         (WebCore::InheritedFlags::operator!=):
2846         * svg/SVGClipPathElement.cpp:
2847         (WebCore::SVGClipPathElement::canvasResource):
2848         * svg/SVGGradientElement.cpp:
2849         (WebCore::SVGGradientElement::buildStops):
2850         * svg/SVGStyledElement.cpp:
2851         (WebCore::SVGStyledElement::resolveStyle):
2852         * svg/SVGStyledElement.h:
2853         * svg/SVGUseElement.cpp:
2854         (WebCore::SVGUseElement::recalcStyle):
2855         (WebCore::SVGUseElement::attachShadowTree):
2856
2857 2008-10-16  Kenneth Russell  <kenneth.russell@sun.com>
2858
2859         Reviewed and landed by Anders Carlsson.
2860
2861         https://bugs.webkit.org/show_bug.cgi?id=21587
2862         NPN_PluginThreadAsyncCall does not work properly
2863         
2864         * plugins/PluginMainThreadScheduler.cpp:
2865         (WebCore::PluginMainThreadScheduler::dispatchCalls):
2866         Make sure to set m_callPending to false once the queue has been cleared.
2867
2868 2008-10-15  Alexey Proskuryakov  <ap@webkit.org>
2869
2870         Reviewed by Darin Adler.
2871
2872         https://bugs.webkit.org/show_bug.cgi?id=21609
2873         Make MessagePorts protect their peers across heaps
2874
2875         * dom/MessagePort.cpp:
2876         (WebCore::MessagePort::MessagePort):
2877         * dom/MessagePort.h:
2878         (WebCore::MessagePort::setJSWrapperIsKnownToBeInaccessible):
2879         (WebCore::MessagePort::jsWrapperIsKnownToBeInaccessible):
2880         Track objects whose JS wrappers are no longer reachable in MessagePort. Unfortunately, this
2881         means that the implementation object knows about JS bindings - but it is not possible to
2882         access JS wrappers from another heap/thread.
2883
2884         * bindings/js/JSDOMBinding.cpp:
2885         (WebCore::markCrossHeapDependentObjectsForDocument):
2886         * bindings/js/JSDOMBinding.h:
2887         * bindings/js/JSDOMWindowBase.cpp:
2888         (WebCore::JSDOMWindowBase::markCrossHeapDependentObjects):
2889         * bindings/js/JSDOMWindowBase.h:
2890         Implement cross-heap dependency tracking for entangled MessagePorts. If a wrapper object
2891         hasn't been marked normally, it is marked as inaccessible. It is then marked manually,
2892         as long as its entangled port is accessible itself.
2893
2894 2008-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2895
2896         Remove unneeded check of whether a Page defers loading before running it
2897         in a modal dialog.
2898
2899         No test possible.
2900
2901         Reviewed by Tim Hatcher.
2902
2903         * page/Chrome.cpp:
2904
2905 2008-10-15  Geoffrey Garen  <ggaren@apple.com>
2906
2907         Reviewed by Cameron Zwarich.
2908
2909         Fixed https://bugs.webkit.org/show_bug.cgi?id=21345
2910         Start the debugger without reloading the inspected page
2911
2912         * WebCore.base.exp: New symbols.
2913
2914         * ForwardingHeaders/kjs/CollectorHeapIterator.h: Copied from ForwardingHeaders/kjs/ustring.h.
2915         * ForwardingHeaders/kjs/Parser.h: Copied from ForwardingHeaders/kjs/ustring.h.
2916         * WebCore.xcodeproj/project.pbxproj: New forwarding headers.
2917
2918         * inspector/InspectorController.cpp:
2919         (WebCore::InspectorController::setWindowVisible):
2920         (WebCore::InspectorController::windowScriptObjectAvailable):
2921         (WebCore::InspectorController::startDebugging):
2922         * inspector/InspectorController.h: Renamed startDebuggingAndReloadInspectedPage
2923         to startDebugging, and changed its behavior to match.
2924
2925         * inspector/JavaScriptDebugListener.h:
2926         * inspector/JavaScriptDebugServer.cpp:
2927         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
2928         (WebCore::JavaScriptDebugServer::addListener):
2929         (WebCore::JavaScriptDebugServer::removeListener):
2930         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
2931         (WebCore::JavaScriptDebugServer::willAddFirstListener):
2932         (WebCore::JavaScriptDebugServer::didRemoveLastListener):
2933         * inspector/JavaScriptDebugServer.h: Refactored the
2934         JavaScriptDebugServer to centralize handling of adding the first listener
2935         and removing the last. Then, added a feature to recompile all JS functions
2936         in these cases. This allows us to dynamically add and remove hooks like
2937         the debugger hooks without reloading the page.
2938
2939         * inspector/front-end/ScriptsPanel.js:
2940         * English.lproj/localizedStrings.js: Updated for startDebuggingAndReloadInspectedPage =>
2941         startDebugging rename. Removed all UI that claimed that starting the
2942         debugger would reload the page.
2943
2944 2008-10-15  Adele Peterson  <adele@apple.com>
2945
2946         Attempt to fix the Tiger build.
2947
2948         * platform/network/mac/ResourceHandleMac.mm:
2949
2950 2008-10-15  Holger Hans Peter Freyther  <zecke@selfish.org>
2951
2952         Build fix attempt.
2953
2954         Try to fix static/non-static declaration of g_string_append_uri_escape
2955         by renaming that string. Another look needs to be taken.
2956
2957         * platform/gtk/guriescape.c:
2958         (_webcore_g_string_append_uri_escaped):
2959         (_webcore_g_uri_escape_string):
2960
2961 2008-10-15  Holger Hans Peter Freyther  <zecke@selfish.org>
2962
2963         Build fix.
2964
2965         m_animatingImageType is gone.
2966
2967         * platform/graphics/cairo/ImageCairo.cpp:
2968         (WebCore::BitmapImage::BitmapImage):
2969
2970 2008-10-15  Jeff Cook <cookiecaper@gmail.com>
2971
2972         Reviewed by Holger Freyther.
2973
2974         Stop SIGSEGV when leaving a page with a Flash object by reordering
2975         window destruction and plugin stop.
2976
2977         See https://bugs.webkit.org/show_bug.cgi?id=20779
2978
2979         * plugins/gtk/PluginViewGtk.cpp:
2980         (WebCore::PluginView::stop):
2981
2982 2008-10-15  Adele Peterson  <adele@apple.com>
2983
2984         Reviewed by Sam Weinig.
2985
2986         Implement didSendBodyData delegate method, and use older code path when that delegate doesn't exist. 
2987
2988         * platform/network/ResourceHandle.h:
2989         * platform/network/mac/FormDataStreamMac.mm: (WebCore::formRead):
2990         * platform/network/mac/ResourceHandleMac.mm:
2991         (WebCore::ResourceHandle::didSendBodyDataDelegateExists):
2992         (WebCore::ResourceHandle::start):
2993         (WebCore::ResourceHandle::cancel):
2994         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2995         (-[WebCoreResourceHandleAsDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]):
2996         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
2997         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
2998
2999 2008-10-15  Peter Kasting  <pkasting@google.com>
3000
3001         Reviewed by David Hyatt.
3002
3003         Qt build bustage fix.
3004
3005         * platform/graphics/qt/StillImageQt.h:
3006         (WebCore::StillImage::destroyDecodedData):
3007
3008 2008-10-15  David Hyatt  <hyatt@apple.com>
3009
3010         Make sure scrollbar styles get deleted if they aren't assigned to a renderer.
3011
3012         Reviewed by Mark Rowe
3013
3014         * rendering/RenderScrollbar.cpp:
3015         (WebCore::RenderScrollbar::getScrollbarPseudoStyle):
3016         (WebCore::RenderScrollbar::updateScrollbarPart):
3017
3018 2008-10-15  Peter Kasting  <pkasting@google.com>
3019
3020         Reviewed by David Hyatt.
3021
3022         https://bugs.webkit.org/show_bug.cgi?id=19663 (Second attempt)
3023         Account for paint and timer lag when animating images.  Also pretend
3024         that images whose animations were paused (by becoming invisible)
3025         continued to animate, by "catching up" to the correct frame when they're
3026         shown again.
3027
3028         * platform/graphics/BitmapImage.cpp:
3029         (WebCore::BitmapImage::BitmapImage):
3030         (WebCore::BitmapImage::destroyDecodedData):
3031         (WebCore::BitmapImage::cacheFrame):
3032         (WebCore::BitmapImage::frameIsCompleteAtIndex):
3033         (WebCore::BitmapImage::frameDurationAtIndex):
3034         (WebCore::BitmapImage::frameHasAlphaAtIndex):
3035         (WebCore::BitmapImage::repetitionCount):
3036         (WebCore::BitmapImage::shouldAnimate):
3037         (WebCore::BitmapImage::startAnimation):
3038         (WebCore::BitmapImage::resetAnimation):
3039         (WebCore::BitmapImage::advanceAnimation):
3040         (WebCore::BitmapImage::internalAdvanceAnimation):
3041         (WebCore::BitmapImage::notifyObserverAndTrimDecodedData):
3042         * platform/graphics/BitmapImage.h:
3043         (WebCore::FrameData::FrameData):
3044         (WebCore::BitmapImage::):
3045         * platform/graphics/GeneratedImage.h:
3046         (WebCore::GeneratedImage::destroyDecodedData):
3047         * platform/graphics/Image.h:
3048         * platform/graphics/cairo/ImageCairo.cpp:
3049         (WebCore::FrameData::clear):
3050         (WebCore::BitmapImage::BitmapImage):
3051         (WebCore::BitmapImage::draw):
3052         * platform/graphics/cg/ImageCG.cpp:
3053         (WebCore::FrameData::clear):
3054         (WebCore::BitmapImage::BitmapImage):
3055         (WebCore::BitmapImage::draw):
3056         * platform/graphics/cg/PDFDocumentImage.h:
3057         (WebCore::PDFDocumentImage::destroyDecodedData):
3058         * platform/graphics/qt/ImageQt.cpp:
3059         (WebCore::FrameData::clear):
3060         (WebCore::BitmapImage::draw):
3061         * platform/graphics/wx/ImageWx.cpp:
3062         (WebCore::FrameData::clear):
3063         (WebCore::BitmapImage::draw):
3064         * svg/graphics/SVGImage.h:
3065         (WebCore::SVGImage::destroyDecodedData):
3066
3067 2008-10-14  Maxime Britto  <britto@apple.com>
3068
3069         Reviewed by Darin Adler, tweaked and landed by Beth.
3070
3071         * WebCore.base.exp: Exposes two functions to be able to create a 
3072         selection from a point on the screen. Also exposes the new 
3073         TextIterator::currentNode function.
3074         * WebCore/editing/TextIterator.cpp:
3075         (TextIterator::currentNode) : New function that returns the current 
3076         text node or NULL if there is no text node.
3077
3078 2008-10-15  Marco Barisione  <marco.barisione@collabora.co.uk>
3079
3080         Reviewed by Holger Freyther.
3081
3082         http://bugs.webkit.org/show_bug.cgi?id=21211
3083         [CURL] Upload doesn't work because cancel is called
3084
3085         FormDataStream::read returns 0 when retrieving data from the form
3086         fails, but also when there is no more data to send. This means that
3087         ResourceHandleManager::cancel is always called even when the data was
3088         successfully sent.
3089
3090         Check if there are more elements in the form before calling
3091         FormDataStream::read.
3092
3093         * platform/network/curl/FormDataStreamCurl.cpp:
3094         (WebCore::FormDataStream::hasMoreElements):
3095         * platform/network/curl/FormDataStreamCurl.h:
3096         * platform/network/curl/ResourceHandleManager.cpp:
3097         (WebCore::readCallback):
3098
3099 2008-10-15  Marco Barisione  <marco.barisione@collabora.co.uk>
3100
3101         Reviewed by Holger Freyther.
3102
3103         http://bugs.webkit.org/show_bug.cgi?id=20664
3104         [GTK] File names are not always encodable in UTF-8
3105
3106         On Linux file names are just raw data and cannot always be directly
3107         encoded in UTF-8 or in any other encodings, so we escape them before
3108         storing the file name in a String and unescape them before passing
3109         them to native functions handling files.
3110
3111         * GNUmakefile.am:
3112         * platform/FileSystem.h:
3113         * platform/gtk/FileChooserGtk.cpp:
3114         (WebCore::stringByAdoptingFileSystemRepresentation):
3115         (WebCore::FileChooser::basenameForWidth):
3116         * platform/gtk/FileSystemGtk.cpp:
3117         (WebCore::filenameToString):
3118         (WebCore::filenameFromString):
3119         (WebCore::filenameForDisplay):
3120         (WebCore::fileExists):
3121         (WebCore::deleteFile):
3122         (WebCore::deleteEmptyDirectory):
3123         (WebCore::getFileSize):
3124         (WebCore::getFileModificationTime):
3125         (WebCore::makeAllDirectories):
3126         (WebCore::homeDirectoryPath):
3127         (WebCore::pathGetFileName):
3128         (WebCore::listDirectory):
3129         * platform/gtk/KURLGtk.cpp:
3130         (WebCore::KURL::fileSystemPath):
3131         * platform/gtk/SharedBufferGtk.cpp:
3132         (WebCore::SharedBuffer::createWithContentsOfFile):
3133         * platform/gtk/guriescape.c: Added.
3134         (is_valid):
3135         (gunichar_ok):
3136         (g_string_append_uri_escaped):
3137         (_webcore_g_uri_escape_string):
3138         * platform/gtk/guriescape.h: Added.
3139
3140 2008-10-15  Dirk Schulze  <vbs85@gmx.de>
3141
3142         Reviewed by Eric Seidel.
3143
3144         - part of https://bugs.webkit.org/show_bug.cgi?id=20543
3145           Moved gradient spread method out of SVG into the GraphicsContext.
3146
3147         * platform/graphics/GraphicsContext.cpp:
3148         (WebCore::GraphicsContext::spreadMethod):
3149         (WebCore::GraphicsContext::setSpreadMethod):
3150         * platform/graphics/GraphicsContext.h:
3151         (WebCore::):
3152         * platform/graphics/GraphicsContextPrivate.h:
3153         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3154         (WebCore::applySpreadMethod):
3155         (WebCore::GraphicsContext::fillPath):
3156         (WebCore::GraphicsContext::strokePath):
3157         * platform/graphics/qt/GraphicsContextQt.cpp:
3158         (WebCore::applySpreadMethod):
3159         (WebCore::GraphicsContext::fillPath):
3160         (WebCore::GraphicsContext::strokePath):
3161         * svg/GradientAttributes.h:
3162         (WebCore::GradientAttributes::GradientAttributes):
3163         (WebCore::GradientAttributes::spreadMethod):
3164         (WebCore::GradientAttributes::setSpreadMethod):
3165         * svg/SVGGradientElement.cpp:
3166         (WebCore::SVGGradientElement::parseMappedAttribute):
3167         * svg/SVGGradientElement.h:
3168         * svg/SVGLinearGradientElement.cpp:
3169         (WebCore::SVGLinearGradientElement::collectGradientProperties):
3170         * svg/SVGRadialGradientElement.cpp:
3171         (WebCore::SVGRadialGradientElement::collectGradientProperties):
3172         * svg/graphics/SVGPaintServerGradient.cpp:
3173         (WebCore::operator<<):
3174         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
3175         (WebCore::SVGPaintServerGradient::spreadMethod):
3176         (WebCore::SVGPaintServerGradient::setGradientSpreadMethod):
3177         (WebCore::SVGPaintServerGradient::externalRepresentation):
3178         * svg/graphics/SVGPaintServerGradient.h:
3179         * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp:
3180         (WebCore::SVGPaintServerGradient::setup):
3181         * svg/graphics/qt/SVGPaintServerGradientQt.cpp:
3182         (WebCore::SVGPaintServerGradient::setup):
3183
3184 2008-10-09  Darin Fisher  <darin@chromium.org>
3185
3186         Reviewed by Sam Weinig.
3187
3188         Make pan scrolling a platform configurable option
3189         https://bugs.webkit.org/show_bug.cgi?id=21515
3190
3191         * page/EventHandler.cpp:
3192         (WebCore::EventHandler::handleAutoscroll):
3193         (WebCore::EventHandler::autoscrollTimerFired):
3194         (WebCore::EventHandler::stopAutoscrollTimer):
3195         (WebCore::EventHandler::handleMousePressEvent):
3196         (WebCore::EventHandler::keyEvent):
3197
3198 2008-10-10  Darin Fisher  <darin@chromium.org>
3199
3200         Reviewed by Darin Adler.
3201
3202         Add some PLATFORM(CHROMIUM) ifdefs to WebCore
3203         https://bugs.webkit.org/show_bug.cgi?id=21511
3204
3205         * loader/FTPDirectoryDocument.cpp:
3206         * loader/FTPDirectoryParser.cpp:
3207         * loader/FrameLoader.cpp:
3208         (WebCore::FrameLoader::finishedLoadingDocument):
3209         * platform/ContextMenuItem.h:
3210         * platform/Cursor.h:
3211         * platform/DragData.h:
3212         * platform/DragImage.h:
3213         * platform/Pasteboard.h:
3214         * platform/PlatformKeyboardEvent.h:
3215         (WebCore::PlatformKeyboardEvent::isSystemKey):
3216         * platform/PlatformMenuDescription.h:
3217         * platform/PlatformMouseEvent.h:
3218         * platform/PlatformWheelEvent.h:
3219         * platform/PopupMenu.h:
3220         * platform/ScrollView.h:
3221         * platform/Widget.h:
3222         * platform/network/NetworkStateNotifier.h:
3223
3224 2008-10-14  Chris Marrin  <cmarrin@apple.com>
3225
3226         Reviewed by Darin Adler.
3227
3228         Fixed https://bugs.webkit.org/show_bug.cgi?id=21490
3229         Optimize keyframe style sheet changes by avoiding styleSheetChanged()
3230
3231         Test: css3/change-keyframes.html
3232
3233         * css/WebKitCSSKeyframesRule.cpp:
3234         (WebCore::WebKitCSSKeyframesRule::append):
3235         (WebCore::WebKitCSSKeyframesRule::deleteRule):
3236
3237 2008-10-14  David Hyatt  <hyatt@apple.com>
3238
3239         https://bugs.webkit.org/show_bug.cgi?id=21595
3240
3241         Clean up background and overflow propagation from the body to the viewport.  Make it match the
3242         latest CSS2.1 spec thinking.
3243
3244         Reviewed by Adam Roben
3245
3246         Added many tests at fast/body-propagation/.  These are Simon Pieters' tests of propagation handling
3247         (available at http://simon.html5.org/test/css/magic-body/).
3248
3249         * dom/Document.cpp:
3250         (WebCore::Document::body):
3251         * page/FrameView.cpp:
3252         (WebCore::FrameView::layout):
3253         * rendering/RenderBox.cpp:
3254         (WebCore::RenderBox::styleDidChange):
3255         (WebCore::RenderBox::paintRootBoxDecorations):
3256         (WebCore::RenderBox::paintBoxDecorations):
3257         (WebCore::RenderBox::repaintLayerRectsForImage):
3258
3259 2008-10-14  Dimitri Glazkov  <dglazkov@chromium.org>
3260
3261         Reviewed and landed by Sam Weinig.
3262
3263         Due to change in spec (http://dev.w3.org/2006/webapi/selectors-api/#namespace),
3264         remove NSResolver code, leaving only checking for selectors that need
3265         NS resolution and throwing a coresponding error.
3266
3267         * WebCore.pro:
3268         * WebCore.vcproj/WebCore.vcproj:
3269         * WebCore.xcodeproj/project.pbxproj:
3270         * WebCoreSources.bkl:
3271         * bindings/js/JSDocumentCustom.cpp:
3272         * bindings/js/JSDocumentFragmentCustom.cpp:
3273         * bindings/js/JSElementCustom.cpp:
3274         * bindings/js/JSNSResolver.cpp: Removed.
3275         * bindings/js/JSNSResolver.h: Removed.
3276         * dom/Document.idl:
3277         * dom/DocumentFragment.idl:
3278         * dom/Element.idl:
3279         * dom/NSResolver.h: Removed.
3280         * dom/NSResolver.idl: Removed.
3281         * dom/Node.h:
3282         * dom/Node.cpp:
3283         (WebCore::forEachTagSelector):
3284         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
3285         (WebCore::selectorNeedsNamespaceResolution):
3286         (WebCore::Node::querySelector):
3287         (WebCore::Node::querySelectorAll):
3288
3289 2008-10-14  Darin Adler  <darin@apple.com>
3290
3291         Reviewed by Sam Weinig (all but the FormDataListItem rename).
3292
3293         - https://bugs.webkit.org/show_bug.cgi?id=21593
3294           Bug 21593: add multiple-file support to HTMLFormElement
3295
3296         * html/FormDataList.cpp: Removed appendFile since it's now inline.
3297         Also took incorrect old copyrights off of this file that are left
3298         over from when it was split.
3299         * html/FormDataList.h: Ditto. Renamed FormDataListItem to Item and
3300         made it a member of FormDataList. Changed it to hold a File object
3301         instead of a path. And made its data members private. Changed
3302         FormDataList::appendFile accordingly.
3303
3304         * html/HTMLFormElement.cpp:
3305         (WebCore::HTMLFormElement::formData): Updated for above changes.
3306         Removed the code that special-cases HTMLInputElement, because now
3307         the FormDataListItem has everything we need. And if there are
3308         multiple files, we'll get multiple list items for them.
3309
3310         * html/HTMLInputElement.cpp:
3311         (WebCore::HTMLInputElement::appendFormData): Changed the code for
3312         <input type=file> to use File objects instead of path strings and
3313         also to append multiple files if the file list has them.
3314
3315 2008-10-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
3316
3317         Reviewed by Simon.
3318         
3319         Fix QtWebKit scrollbar painting errors
3320
3321         * platform/qt/ScrollbarThemeQt.cpp:
3322         (WebCore::ScrollbarThemeQt::paint):
3323         (WebCore::ScrollbarThemeQt::paintScrollCorner):
3324
3325 2008-10-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
3326
3327         Reviewed by Simon.
3328
3329         Fix scrollbar arrows for horizontal scrollbars
3330
3331         * platform/qt/ScrollbarThemeQt.cpp:
3332         (WebCore::styleOptionSlider):
3333
3334 2008-10-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
3335
3336         Reviewed by Simon.
3337
3338         Use style-painter to draw scrollbars in ScrollbarThemeQt
3339         
3340         This has the benefit of setting up the painter properly without
3341         antialiasing and saving and restoring the brush. It also ensures
3342         that we use the style of the QWebView over the QApplication style
3343         if possible.
3344
3345         * platform/qt/RenderThemeQt.cpp:
3346         (WebCore::StylePainter::StylePainter):
3347         (WebCore::StylePainter::init):
3348         * platform/qt/RenderThemeQt.h:
3349         * platform/qt/ScrollbarThemeQt.cpp:
3350         (WebCore::ScrollbarThemeQt::paint):
3351
3352 2008-10-13  David Hyatt  <hyatt@apple.com>
3353
3354         Add support for CSS transitions on some SVG properties.  This patch is intended to be a guideline
3355         for how to add support for the rest.
3356
3357         Reviewed by Oliver Hunt
3358
3359         * page/animation/AnimationBase.cpp:
3360         (WebCore::ensurePropertyMap):
3361         * rendering/style/RenderStyle.h:
3362         (WebCore::RenderStyle::fillOpacity):
3363         (WebCore::RenderStyle::setFillOpacity):
3364         (WebCore::RenderStyle::strokeOpacity):
3365         (WebCore::RenderStyle::setStrokeOpacity):
3366         (WebCore::RenderStyle::floodOpacity):
3367         (WebCore::RenderStyle::setFloodOpacity):
3368
3369 2008-10-13  David Hyatt  <hyatt@apple.com>
3370
3371         <rdar://problem/6289712> REGRESSION(r37432-37490): Scroll bar is not drawn in Bookmark View, Preferences sheets.
3372
3373         Fix for disabled scrollbars not painting in Windows Safari.  Make sure that the Windows theme
3374         implements paintTrackBackground so that when the thumb is not present the track still paints.
3375
3376         Reviewed by Oliver Hunt
3377
3378         * platform/ScrollbarThemeComposite.cpp:
3379         (WebCore::ScrollbarThemeComposite::paint):
3380         * platform/win/ScrollbarThemeWin.cpp:
3381         (WebCore::ScrollbarThemeWin::paintTrackBackground):
3382         * platform/win/ScrollbarThemeWin.h:
3383
3384 2008-10-13  David Hyatt  <hyatt@apple.com>
3385
3386         Fix over-invalidation of native scrollbars.
3387
3388         Reviewed by Oliver Hunt
3389
3390         * platform/Scrollbar.h:
3391         (WebCore::Scrollbar::styleChanged):
3392         * platform/mac/ScrollbarThemeMac.mm:
3393         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
3394         * rendering/RenderScrollbar.cpp:
3395         (WebCore::RenderScrollbar::styleChanged):
3396
3397 2008-10-13  Alp Toker  <alp@nuanti.com>
3398
3399         Fix autotools dist build target by listing recently added header
3400         files only. Not reviewed.
3401
3402         * GNUmakefile.am:
3403
3404 2008-10-13  Mark Rowe  <mrowe@apple.com>
3405
3406         Reviewed by Brady Eidson.
3407
3408         Don't run a SQLite query on every iteration of the sync thread when the query
3409         will touch a large portion of the icon database while performing no useful work.
3410
3411         * loader/icon/IconDatabase.cpp:
3412         (WebCore::IconDatabase::writeToDatabase): Don't call checkForDanglingPageURLs unless
3413         we modified the database.
3414         (WebCore::IconDatabase::checkForDanglingPageURLs): Don't do any work in a release build
3415         unless we've been asked to prune any dangling pageURLs that we find.
3416
3417 2008-10-13  Maciej Stachowiak  <mjs@apple.com>
3418
3419         Rubber stamped by Mark Rowe.
3420         
3421         - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default
3422
3423         * Configurations/DebugRelease.xcconfig:
3424
3425 2008-10-13  David Hyatt  <hyatt@apple.com>
3426
3427         Make dropdown lists on Windows work with CSS custom scrollbars.
3428
3429         Reviewed by Adele
3430
3431         * platform/PopupMenu.h:
3432         (WebCore::PopupMenu::scrollbarCornerPresent):
3433         * platform/PopupMenuClient.h:
3434         * platform/win/PopupMenuWin.cpp:
3435         (WebCore::PopupMenu::show):
3436         * rendering/RenderMenuList.cpp:
3437         (WebCore::RenderMenuList::createScrollbar):
3438         * rendering/RenderMenuList.h:
3439         * rendering/RenderTextControl.cpp:
3440         (WebCore::RenderTextControl::createScrollbar):
3441         * rendering/RenderTextControl.h:
3442
3443 2008-10-13  Chris Fleizach  <cfleizach@apple.com>
3444
3445         Reviewed by Beth Dakin.
3446
3447         <rdar://problem/6271864> Links from image maps not being included in AXLinkUIElements
3448
3449         Links from image maps were not being included in the web area's AXLinkUIElements attribute.
3450         The position of image map links was being reported incorrectly and the parent-chain
3451         hierarchy for image map links was incorrect because image map links did not have a reference
3452         to their parent image. 
3453
3454         Test: accessibility/document-links.html
3455
3456         * page/AccessibilityImageMapLink.cpp:
3457         (WebCore::AccessibilityImageMapLink::parentObject):
3458         (WebCore::AccessibilityImageMapLink::actionElement):
3459         (WebCore::AccessibilityImageMapLink::elementRect):
3460         * page/AccessibilityImageMapLink.h:
3461         (WebCore::AccessibilityImageMapLink::setHTMLMapElement):
3462         (WebCore::AccessibilityImageMapLink::setParent):
3463         * page/AccessibilityObject.cpp:
3464         * page/AccessibilityObject.h:
3465         * page/AccessibilityRenderObject.cpp:
3466         (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
3467         (WebCore::AccessibilityRenderObject::getDocumentLinks):
3468         (WebCore::AccessibilityRenderObject::addChildren):
3469         * page/AccessibilityRenderObject.h:
3470         * page/mac/AccessibilityObjectWrapper.mm:
3471         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
3472
3473 2008-10-13  David Hyatt  <hyatt@apple.com>
3474
3475         Make RenderListBox work with CSS scrollbars.  Refactoring this code to support creation/destruction in
3476         the same way RenderLayer does also fixes a bug where the PLT would assert on the next-to-last page (no
3477         idea how to make a test case for that, though, since I couldn't repro without running the whole PLT).
3478
3479         Reviewed by Tim Hatcher
3480
3481         Added scrollbars/listbox-scrollbar-combinations.html
3482
3483         * rendering/RenderListBox.cpp:
3484         (WebCore::RenderListBox::~RenderListBox):
3485         (WebCore::RenderListBox::updateFromElement):
3486         (WebCore::RenderListBox::createScrollbar):
3487         (WebCore::RenderListBox::destroyScrollbar):
3488         (WebCore::RenderListBox::setHasVerticalScrollbar):
3489         * rendering/RenderListBox.h:
3490
3491 2008-10-13  David Hyatt  <hyatt@apple.com>
3492
3493         In order to always match the :corner-present pseudo-class properly, delay initial updating of
3494         scrollbar styles until the layer has the scrollbars in its member variables.
3495
3496         Reviewed by Tim Hatcher
3497
3498         * rendering/RenderLayer.cpp:
3499         (WebCore::RenderLayer::setHasHorizontalScrollbar):
3500         (WebCore::RenderLayer::setHasVerticalScrollbar):
3501         * rendering/RenderScrollbar.cpp:
3502         (WebCore::RenderScrollbar::RenderScrollbar):
3503
3504 2008-10-13  Sam Weinig  <sam@webkit.org>
3505
3506         Reviewed by Dan Bernstein.
3507
3508         Fix for https://bugs.webkit.org/show_bug.cgi?id=21577
3509         5 false positive StructureID leaks
3510
3511         In WebCore, we intentionally leak the common JSGlobalData which in turn
3512         leaks 5 StructureIDs.  Use the new JSGlobalData::createLeaked in order to
3513         ignore the StructureIDs leaked within.
3514
3515         * bindings/js/JSDOMWindowBase.cpp:
3516         (WebCore::JSDOMWindowBase::commonJSGlobalData):
3517
3518 2008-10-13  David Hyatt  <hyatt@apple.com>
3519
3520         Add support for the :corner-present pseudoclass, which enables scrollbar pieces to change their
3521         artwork based on whether there is a scrollbar corner present.
3522
3523         Reviewed by Tim Hatcher
3524
3525         * css/CSSSelector.cpp:
3526         (WebCore::CSSSelector::extractPseudoType):
3527         * css/CSSSelector.h:
3528         (WebCore::CSSSelector::):
3529         * css/CSSStyleSelector.cpp:
3530         (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass):
3531         * platform/ScrollView.cpp:
3532         (WebCore::ScrollView::scrollbarCornerPresent):
3533         * platform/ScrollView.h:
3534         * platform/ScrollbarClient.h:
3535         * rendering/RenderLayer.cpp:
3536         (WebCore::cornerRect):
3537         (WebCore::scrollCornerRect):
3538         (WebCore::resizerCornerRect):
3539         (WebCore::RenderLayer::scrollbarCornerPresent):
3540         (WebCore::RenderLayer::setHasHorizontalScrollbar):
3541         (WebCore::RenderLayer::setHasVerticalScrollbar):
3542         * rendering/RenderLayer.h:
3543         (WebCore::RenderLayer::horizontalScrollbar):
3544         (WebCore::RenderLayer::verticalScrollbar):
3545         * rendering/RenderListBox.h:
3546         (WebCore::RenderListBox::scrollbarCornerPresent):
3547
3548 2008-10-13  David Hyatt  <hyatt@apple.com>
3549
3550         Make resizers and scrollbar corners respect :window-inactive (one more bug fix and then Tim's master
3551         test case for all this can land).
3552
3553         Reviewed by Tim Hatcher
3554
3555         * css/CSSStyleSelector.cpp:
3556         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
3557         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
3558         (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass):
3559         * rendering/RenderLayer.cpp:
3560         (WebCore::RenderLayer::paintOverflowControls):
3561         (WebCore::RenderLayer::paintScrollCorner):
3562         (WebCore::RenderLayer::paintResizer):
3563         (WebCore::RenderLayer::styleChanged):
3564         (WebCore::RenderLayer::updateScrollCornerStyle):
3565         (WebCore::RenderLayer::updateResizerStyle):
3566         * rendering/RenderLayer.h:
3567         * rendering/RenderScrollbar.cpp:
3568         (WebCore::RenderScrollbar::paint):
3569         * rendering/RenderScrollbarPart.cpp:
3570         (WebCore::RenderScrollbarPart::paintIntoRect):
3571