Reviewed by Eric Seidel.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
2
3         Reviewed by Eric Seidel.
4
5         https://bugs.webkit.org/show_bug.cgi?id=18681
6         <rdar://problem/5888130> WebKit should not remove BOM characters from content.
7
8         We were only trying to match Firefox, and it doesn't do this any more.
9
10         Tests: fast/encoding/bom-in-content.html
11                fast/encoding/bom-in-content-utf16.html
12
13         * platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): Skip the BOM if it's
14         at the start of input stream.
15
16         * platform/text/TextCodec.cpp:
17         * platform/text/TextCodec.h:
18         * platform/text/TextCodecICU.cpp:
19         (WebCore::TextCodecICU::decode):
20         * platform/text/TextCodecUTF16.cpp:
21         (WebCore::TextCodecUTF16::decode):
22         * platform/text/mac/TextCodecMac.cpp:
23         (WebCore::TextCodecMac::decode):
24         Don't remove the BOM.
25
26 2008-05-13  Anders Carlsson  <andersca@apple.com>
27
28         Reviewed by Darin.
29
30         Don't crash when a document loader is destroyed while an initial caching attempt
31         is in progress.
32
33         * loader/appcache/ApplicationCacheGroup.cpp:
34         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
35         Stop loading.
36         
37         (WebCore::ApplicationCacheGroup::stopLoading):
38         New method that stops a cache update.
39         
40         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
41         Delete ourselves here.
42         
43         * loader/appcache/ApplicationCacheGroup.h:
44
45 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
46
47         Reviewed by Darin.
48
49         <rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as windows-1254
50
51         Match IE and upgrade ISO-8859-9 to windows-1254, which is its strict superset.
52
53         Test: fast/encoding/char-decoding.html
54
55         * platform/text/TextCodecICU.cpp:
56         (WebCore::TextCodecICU::registerExtendedEncodingNames): Register the standard name
57         unconditionally. Previously, we registered windows-949-2000 as a special case that lacked 
58         an IANA standard name, and got away with not registering GBK because it happened
59         to be reported by ICU normally earlier than any encoding upgraded to it.
60
61 2008-05-13  Tor Arne Vestbø  <tavestbo@trolltech.com>
62
63         Reviewed by Simon
64
65         Fix QtWebKit build on Qt embedded.
66
67         * WebCore.pro:
68         * platform/FileSystem.h:
69         * platform/qt/FileSystemQt.cpp:
70
71 2008-05-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
72
73         Reviewed by Simon.
74
75         For Gtk/X11 and Qt/X11, use a more extensive plug-ins scan directories set
76
77         * plugins/PluginDatabase.cpp:
78         (WebCore::addMozillaPluginDirectories):
79         (WebCore::PluginDatabase::isPreferredPluginDirectory):
80
81 2008-05-12  Adam Roben  <aroben@apple.com>
82
83         Turn on warnings as errors in WebCore.vcproj
84
85         Rubberstamped by Anders Carlsson.
86
87         * WebCore.vcproj/WebCore.vcproj: Also let VS reformat the file as it
88         saw fit. The important part is the removal of the WarnAsError="false"
89         lines.
90
91 2008-05-12  Adam Roben  <aroben@apple.com>
92
93         Fix a MSVC warning in PluginViewWin
94
95         Reviewed by Anders Carlsson.
96
97         Test: http/tests/plugins/post-url-file.html
98
99         * plugins/win/PluginViewWin.cpp:
100         (WebCore::PluginView::handlePostReadFile): Added a missing return
101         statement.
102
103 2008-05-12  Adam Roben  <aroben@apple.com>
104
105         Fix a MSVC warning in GetEOTHeader
106
107         Reviewed by Dan Bernstein.
108
109         * platform/graphics/win/GetEOTHeader.cpp:
110         (WebCore::getEOTHeader): MSVC complains that having a 0-sized array in
111         a struct is a non-standard extension. I've replaced the 0-sized arrays
112         with arrays of 1 element, and replaced sizeof(structType) with
113         offsetof(structType, arrayMember).
114
115 2008-05-09  Adam Roben  <aroben@apple.com>
116
117         Fix a MSVC warning in TextCodecICU
118
119         Reviewed by John Sullivan and Dan Bernstein.
120
121         * platform/text/TextCodecICU.cpp:
122         (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter):
123         UCNV_SUB_STOP_ON_ILLEGAL is a string literal, so using == with it
124         doesn't really do what we want. Use strcmp instead. It's OK to pass an
125         unknown value to strcmp here since 1) UCNV_SUB_STOP_ON_ILLEGAL is only
126         a single character long so we're not going to ready more than 2 bytes
127         from oldContext, and 2) we're inside an ASSERT which will cause a
128         crash anyway if it fails.
129
130 2008-05-09  Adam Roben  <aroben@apple.com>
131
132         Fix a MSVC warning in CSSComputedStyleDeclaration
133
134         Reviewed by Geoff Garen.
135
136         * css/CSSComputedStyleDeclaration.cpp:
137         (WebCore::valueForRepeatRule): Removed some unreachable code.
138
139 2008-05-09  Adam Roben  <aroben@apple.com>
140
141         Fix a MSVC warning in InlineTextBox
142
143         Reviewed by Dan Bernstein.
144
145         * rendering/InlineTextBox.cpp:
146         (WebCore::InlineTextBox::paint): Initialize some variables that MSVC
147         isn't smart enough to figure out will always be initialized in the
148         cases where they are used.
149
150 2008-05-09  Adam Roben  <aroben@apple.com>
151
152         Fix a MSVC warning in Position
153
154         Reviewed by Darin Adler.
155
156         * dom/Position.cpp:
157         (WebCore::Position::getInlineBoxAndOffset): Use parentheses to make
158         the precedence of our expressions explicit.
159
160 2008-05-09  Adam Roben  <aroben@apple.com>
161
162         Fix a MSVC warning in String
163
164         Reviewed by Geoff Garen.
165
166         * platform/text/String.cpp:
167         (WebCore::toIntegralType): Disable a bogus warning about using unary -
168         on an unsigned value. MSVC isn't smart enough to figure out that
169         isNegative will always be false when value is unsigned.
170
171 2008-05-09  Adam Roben  <aroben@apple.com>
172
173         Fix a MSVC warning in XMLHttpRequest
174
175         Reviewed by Geoff Garen.
176
177         * xml/XMLHttpRequest.cpp:
178         (WebCore::XMLHttpRequest::XMLHttpRequest): Added static_cast<unsigned
179         long>.
180
181 2008-05-12  Anders Carlsson  <andersca@apple.com>
182
183         Reviewed by Adam.
184
185         Handle the case when a resource with the same URL as the manifest is listed in the manifest.
186
187         * loader/appcache/ApplicationCacheGroup.cpp:
188         (WebCore::ApplicationCacheGroup::addEntry):
189
190 2008-05-12  Sam Weinig  <sam@webkit.org>
191
192         Reviewed by Dan Bernstein.
193
194         Add parsing of AccessControlHeader and AccessItemRule.
195
196         * xml/AccessControlList.cpp:
197         (WebCore::AccessControlList::parseAccessControlHeader): When multiple http headers are sent
198         in the response, the engine will concatenate them with commas separating the rules.  This simply
199         reverses that process by splitting on the commas.
200         (WebCore::AccessControlList::show):
201         * xml/AccessControlList.h:
202         * xml/AccessItem.cpp:
203         (WebCore::AccessItem::AccessItem):
204         (WebCore::AccessItem::show):
205         * xml/AccessItem.h:
206         (WebCore::AccessItem::isValid):
207         * xml/AccessItemRule.cpp:
208         (WebCore::skipLWS):
209         (WebCore::AccessItemRule::parseAccessItemRule): Parse the rule according to the BNF provided by
210         the Access Control spec.
211         (WebCore::AccessItemRule::parsePatternList):
212         (WebCore::AccessItemRule::invalidate):
213         (WebCore::AccessItemRule::show):
214         * xml/AccessItemRule.h:
215
216 2008-05-12  David Kilzer  <ddkilzer@apple.com>
217
218         Fix logic error in DocLoader::clearPreloads()
219
220         Reviewed by Antti.
221
222         * loader/DocLoader.cpp:
223         (WebCore::DocLoader::clearPreloads): Be sure to decrease the preload count for
224         the cached resource before trying to remove it from the cache.  A non-zero
225         preload count can prevent the resource from being removed from the cache.
226
227 2008-05-12  Anders Carlsson  <andersca@apple.com>
228
229         Reviewed by Adam.
230
231         Handle empty manifest files without crashing.
232         
233         * loader/appcache/ApplicationCacheGroup.cpp:
234         (WebCore::ApplicationCacheGroup::startLoadingEntry):
235
236 2008-05-12  Alp Toker  <alp@nuanti.com>
237
238         GTK+ build fix for breakage in r33056. Include limits.h for INT_MAX.
239
240         * platform/graphics/FontCache.h:
241
242 2008-05-12  Anders Carlsson  <andersca@apple.com>
243
244         Reviewed by Adam.
245
246         Add user agent to requests when loading/updating the cache.
247     
248         * loader/FrameLoader.h:
249         * loader/appcache/ApplicationCacheGroup.cpp:
250         (WebCore::ApplicationCacheGroup::update):
251         (WebCore::ApplicationCacheGroup::startLoadingEntry):
252
253 2008-05-12  Anders Carlsson  <andersca@apple.com>
254
255         Reviewed by Adam.
256
257         Make it possible to perform synchronous loads from the application cache.
258         
259         * loader/DocumentLoader.cpp:
260         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
261         Factor out code from scheduleApplicationCacheLoad in its own method.
262         
263         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
264         Call shouldLoadResourceFromApplicationCache here instead.
265         
266         * loader/DocumentLoader.h:
267         
268         * loader/FrameLoader.cpp:
269         (WebCore::FrameLoader::loadResourceSynchronously):
270         Call shouldLoadResourceFromApplicationCache.
271
272 2008-05-12  Dan Bernstein  <mitz@apple.com>
273
274         Reviewed by Ada Chan and Sam Weinig.
275
276         - WebCore changes for https://bugs.webkit.org/show_bug.cgi?id=17097
277           <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
278
279         Added a way for clients to let the cache know that they no longer need
280         font data, which lets the cache release it. Changed clients to track
281         most of the font data they get from the cache so that they can later
282         release it. Some instances of font data -- namely, those used for system
283         font fallback -- are still not tracked and will therefore remain in the
284         cache indefinitely.
285
286         * WebCore.base.exp: Added exports for WebCoreStatistics in WebKit.
287
288         * platform/graphics/Font.cpp:
289         (WebCore::Font::Font): Changed to use FontFallbackList::create().
290         (WebCore::Font::update): Ditto.
291
292         * platform/graphics/FontCache.cpp:
293         (WebCore::FontCache::getCachedFontData): Added code to track the number
294         of times a SimpleFontData instance has been requested from the cache,
295         remove requested instances from the inactive list, and purge inactive
296         font data if the inactive list has grown above its maximum allowed size.
297         (WebCore::FontCache::releaseFontData): Added. Called by clients to let
298         the cache know that they no longer need the font data. Adds the font
299         data to the inactive list if the last client has released it.
300         (WebCore::FontCache::purgeInactiveFontData): Added. Removes inactive
301         font data from the cache (and the inactive list).
302         (WebCore::FontCache::fontDataCount): Added to provide statistics.
303         (WebCore::FontCache::inactiveFontDataCount): Ditto.
304
305         * platform/graphics/FontCache.h:
306
307         * platform/graphics/FontData.h:
308         (WebCore::FontData::FontData): Added a member variable to store the
309         highest glyph page tree level in which there is a node for this FontData.
310         This is used to limit the depth of the search when pruning glyph page
311         trees.
312         (WebCore::FontData::setMaxGlyphPageTreeLevel): Added this accessor.
313         (WebCore::FontData::maxGlyphPageTreeLevel): Ditto.
314
315         * platform/graphics/FontFallbackList.cpp:
316         (WebCore::FontFallbackList::FontFallbackList): Changed to start with a
317         refcount of 1.
318         (WebCore::FontFallbackList::invalidate): Added a call to
319         releaseFontData().
320         (WebCore::FontFallbackList::releaseFontData): Added. Lets the font cache
321         know that we no longer need the FontData in our font list.
322         (WebCore::FontFallbackList::fontDataAt): Changed to record in the font
323         list whether the font data is a custom font data or not.
324         (WebCore::FontFallbackList::setPlatformFont): Ditto.
325
326         * platform/graphics/FontFallbackList.h:
327         (WebCore::FontFallbackList::create): Added and made the constructor
328         private.
329         (WebCore::FontFallbackList::~FontFallbackList): Added a call to
330         releaseFontData().
331
332         * platform/graphics/GlyphPageTreeNode.cpp:
333         (WebCore::GlyphPageTreeNode::treeGlyphPageCount): Added to provide
334         statistics.
335         (WebCore::GlyphPageTreeNode::pageCount): Ditto.
336
337         (WebCore::GlyphPageTreeNode::pruneTreeFontData): Added.
338         (WebCore::GlyphPageTreeNode::getChild): Added code to update the font
339         data's maximum glyph page tree level.
340         (WebCore::GlyphPageTreeNode::pruneFontData): Added.
341
342         * platform/graphics/GlyphPageTreeNode.h:
343
344         * platform/graphics/SimpleFontData.cpp:
345         (WebCore::SimpleFontData::~SimpleFontData): Added code to let the font
346         cache know that we no longer need the small caps font data and to prune
347         the glyph page trees.
348
349 2008-05-12  Anders Carlsson  <andersca@apple.com>
350
351         Reviewed by Alexey.
352
353         Add ApplicationCacheStorage::empty() method which will empty
354         the application cache database.
355         
356         * WebCore.base.exp:
357         * loader/appcache/ApplicationCache.cpp:
358         (WebCore::ApplicationCache::clearStorageID):
359         * loader/appcache/ApplicationCache.h:
360         * loader/appcache/ApplicationCacheGroup.cpp:
361         (WebCore::ApplicationCacheGroup::clearStorageID):
362         * loader/appcache/ApplicationCacheGroup.h:
363         * loader/appcache/ApplicationCacheResource.h:
364         (WebCore::ApplicationCacheResource::clearStorageID):
365         * loader/appcache/ApplicationCacheStorage.cpp:
366         (WebCore::ApplicationCacheStorage::empty):
367         * loader/appcache/ApplicationCacheStorage.h:
368
369 2008-05-12  Anders Carlsson  <andersca@apple.com>
370
371         Reviewed by John.
372
373         Don't throw an exception if the string passed in is an invalid URL.
374         
375         * loader/appcache/DOMApplicationCache.cpp:
376         (WebCore::DOMApplicationCache::remove):
377
378 2008-05-12  Anders Carlsson  <andersca@apple.com>
379
380         Reviewed by Mitz.
381
382         Add the variable enums for getting the input vtables.
383         
384         * bridge/npapi.h:
385
386 2008-05-12  Adam Roben  <aroben@apple.com>
387
388         Windows build fix
389
390         * WebCorePrefix.cpp: Touched this so that it will rebuild now that
391         ENABLE_CROSS_DOCUMENT_MESSAGING has been removed.
392
393 2008-05-12  Alexey Proskuryakov  <ap@webkit.org>
394
395         Roll out recent  threading changes (r32807, r32810, r32819, r32822) to simplify
396         SquirrelFish merging.
397
398         * bindings/js/GCController.cpp:
399         (WebCore::collect):
400         (WebCore::GCController::gcTimerFired):
401         (WebCore::GCController::garbageCollectNow):
402         * bindings/js/JSAudioConstructor.cpp:
403         (WebCore::JSAudioConstructor::JSAudioConstructor):
404         * bindings/js/JSCSSRuleCustom.cpp:
405         (WebCore::toJS):
406         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
407         (WebCore::JSCSSStyleDeclaration::nameGetter):
408         * bindings/js/JSCSSValueCustom.cpp:
409         (WebCore::toJS):
410         * bindings/js/JSCanvasPixelArrayCustom.cpp:
411         (WebCore::JSCanvasPixelArray::indexGetter):
412         (WebCore::toJS):
413         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
414         (WebCore::toJS):
415         * bindings/js/JSClipboardCustom.cpp:
416         (WebCore::JSClipboard::types):
417         (WebCore::JSClipboard::getData):
418         * bindings/js/JSCustomXPathNSResolver.cpp:
419         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
420         * bindings/js/JSDOMApplicationCacheCustom.cpp:
421         (WebCore::JSDOMApplicationCache::addEventListener):
422         (WebCore::JSDOMApplicationCache::removeEventListener):
423         (WebCore::JSDOMApplicationCache::setOnchecking):
424         (WebCore::JSDOMApplicationCache::setOnerror):
425         (WebCore::JSDOMApplicationCache::setOnnoupdate):
426         (WebCore::JSDOMApplicationCache::setOndownloading):
427         (WebCore::JSDOMApplicationCache::setOnprogress):
428         (WebCore::JSDOMApplicationCache::setOnupdateready):
429         (WebCore::JSDOMApplicationCache::setOncached):
430         * bindings/js/JSDOMWindowBase.cpp:
431         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
432         (WebCore::JSDOMWindowBase::getValueProperty):
433         (WebCore::JSDOMWindowBase::setListener):
434         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
435         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
436         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
437         (WebCore::windowProtoFuncAToB):
438         (WebCore::windowProtoFuncBToA):
439         (WebCore::windowProtoFuncSetTimeout):
440         (WebCore::windowProtoFuncSetInterval):
441         (WebCore::windowProtoFuncAddEventListener):
442         * bindings/js/JSDOMWindowBase.h:
443         * bindings/js/JSDOMWindowShell.cpp:
444         * bindings/js/JSDOMWindowShell.h:
445         * bindings/js/JSDocumentCustom.cpp:
446         (WebCore::toJS):
447         * bindings/js/JSEventCustom.cpp:
448         (WebCore::toJS):
449         * bindings/js/JSEventTargetBase.cpp:
450         (WebCore::jsEventTargetAddEventListener):
451         * bindings/js/JSEventTargetBase.h:
452         (WebCore::JSEventTargetPrototype::self):
453         * bindings/js/JSEventTargetNode.cpp:
454         (WebCore::JSEventTargetNode::setListener):
455         * bindings/js/JSHTMLCollectionCustom.cpp:
456         (WebCore::getNamedItems):
457         (WebCore::toJS):
458         * bindings/js/JSHTMLElementWrapperFactory.cpp:
459         (WebCore::createJSHTMLWrapper):
460         * bindings/js/JSHTMLFormElementCustom.cpp:
461         (WebCore::JSHTMLFormElement::nameGetter):
462         * bindings/js/JSHTMLInputElementBase.cpp:
463         (WebCore::JSHTMLInputElementBase::getValueProperty):
464         * bindings/js/JSHTMLOptionElementConstructor.cpp:
465         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
466         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
467         (WebCore::JSHTMLOptionsCollection::length):
468         * bindings/js/JSInspectedObjectWrapper.cpp:
469         (WebCore::JSInspectedObjectWrapper::wrap):
470         * bindings/js/JSInspectorCallbackWrapper.cpp:
471         (WebCore::JSInspectorCallbackWrapper::wrap):
472         * bindings/js/JSLocationCustom.cpp:
473         (WebCore::JSLocation::toString):
474         * bindings/js/JSNamedNodesCollection.cpp:
475         (WebCore::JSNamedNodesCollection::lengthGetter):
476         * bindings/js/JSNavigatorCustom.cpp:
477         (WebCore::JSNavigator::appVersion):
478         * bindings/js/JSNodeCustom.cpp:
479         (WebCore::toJS):
480         * bindings/js/JSNodeFilterCustom.cpp:
481         (WebCore::JSNodeFilter::acceptNode):
482         * bindings/js/JSRGBColor.cpp:
483         (WebCore::getJSRGBColor):
484         * bindings/js/JSSQLResultSetRowListCustom.cpp:
485         (WebCore::JSSQLResultSetRowList::item):
486         * bindings/js/JSSVGElementWrapperFactory.cpp:
487         (WebCore::createJSSVGWrapper):
488         * bindings/js/JSSVGLazyEventListener.cpp:
489         (WebCore::JSSVGLazyEventListener::eventParameterName):
490         * bindings/js/JSStorageCustom.cpp:
491         (WebCore::JSStorage::nameGetter):
492         * bindings/js/JSStyleSheetCustom.cpp:
493         (WebCore::toJS):
494         * bindings/js/JSXMLHttpRequestConstructor.cpp:
495         (WebCore::JSXMLHttpRequestConstructor::construct):
496         * bindings/js/JSXMLHttpRequestCustom.cpp:
497         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
498         (WebCore::JSXMLHttpRequest::setOnload):
499         (WebCore::JSXMLHttpRequest::setOnprogress):
500         (WebCore::JSXMLHttpRequest::getResponseHeader):
501         (WebCore::JSXMLHttpRequest::addEventListener):
502         (WebCore::JSXMLHttpRequest::removeEventListener):
503         * bindings/js/JSXSLTProcessorConstructor.cpp:
504         (WebCore::JSXSLTProcessorConstructor::construct):
505         * bindings/js/JSXSLTProcessorCustom.cpp:
506         (WebCore::JSXSLTProcessor::getParameter):
507         * bindings/js/kjs_binding.cpp:
508         (WebCore::jsStringOrNull):
509         (WebCore::jsOwnedStringOrNull):
510         (WebCore::jsStringOrUndefined):
511         (WebCore::jsStringOrFalse):
512         (WebCore::nonCachingStaticFunctionGetter):
513         (WebCore::objectToStringFunctionGetter):
514         * bindings/js/kjs_binding.h:
515         (WebCore::DOMObject::DOMObject):
516         (WebCore::cacheDOMObject):
517         (WebCore::cacheSVGDOMObject):
518         * bindings/js/kjs_events.cpp:
519         (WebCore::JSLazyEventListener::eventParameterName):
520         (WebCore::JSLazyEventListener::parseCode):
521         * bindings/js/kjs_html.cpp:
522         (WebCore::getRuntimeObject):
523         * bindings/scripts/CodeGeneratorJS.pm:
524         * bridge/c/c_instance.cpp:
525         (KJS::Bindings::CInstance::defaultValue):
526         (KJS::Bindings::CInstance::stringValue):
527         (KJS::Bindings::CInstance::numberValue):
528         (KJS::Bindings::CInstance::valueOf):
529         * bridge/c/c_instance.h:
530         * bridge/c/c_utility.cpp:
531         (KJS::Bindings::convertNPVariantToValue):
532         * bridge/jni/jni_instance.cpp:
533         (JavaInstance::stringValue):
534         (JavaInstance::numberValue):
535         (JavaInstance::invokeMethod):
536         (JavaInstance::defaultValue):
537         (JavaInstance::valueOf):
538         * bridge/jni/jni_instance.h:
539         * bridge/jni/jni_jsobject.h:
540         * bridge/jni/jni_jsobject.mm:
541         (JavaJSObject::call):
542         (JavaJSObject::setMember):
543         (JavaJSObject::setSlot):
544         (JavaJSObject::convertJObjectToValue):
545         (JavaJSObject::getListFromJArray):
546         * bridge/jni/jni_objc.mm:
547         (KJS::Bindings::dispatchJNICall):
548         * bridge/jni/jni_runtime.cpp:
549         (JavaArray::convertJObjectToArray):
550         (JavaField::dispatchValueFromInstance):
551         (JavaField::valueFromInstance):
552         (JavaField::dispatchSetValueToInstance):
553         (JavaArray::valueAt):
554         * bridge/jni/jni_utility.h:
555         * bridge/objc/objc_class.mm:
556         (KJS::Bindings::ObjcClass::fallbackObject):
557         * bridge/objc/objc_instance.h:
558         * bridge/objc/objc_instance.mm:
559         (ObjcInstance::defaultValue):
560         (ObjcInstance::stringValue):
561         (ObjcInstance::numberValue):
562         (ObjcInstance::valueOf):
563         * bridge/objc/objc_utility.h:
564         * bridge/objc/objc_utility.mm:
565         (KJS::Bindings::convertNSStringToString):
566         (KJS::Bindings::convertObjcValueToValue):
567         * bridge/qt/qt_class.cpp:
568         (KJS::Bindings::QtClass::fallbackObject):
569         * bridge/qt/qt_instance.cpp:
570         (KJS::Bindings::QtRuntimeObjectImp::construct):
571         (KJS::Bindings::QtInstance::getRuntimeObject):
572         (KJS::Bindings::QtInstance::invokeDefaultMethod):
573         (KJS::Bindings::QtInstance::defaultValue):
574         (KJS::Bindings::QtInstance::stringValue):
575         (KJS::Bindings::QtInstance::numberValue):
576         (KJS::Bindings::QtInstance::valueOf):
577         * bridge/qt/qt_instance.h:
578         * bridge/qt/qt_runtime.cpp:
579         (KJS::Bindings::convertValueToQVariant):
580         (KJS::Bindings::convertQVariantToValue):
581         (KJS::Bindings::QtRuntimeMetaMethod::lengthGetter):
582         (KJS::Bindings::QtRuntimeMetaMethod::connectGetter):
583         (KJS::Bindings::QtRuntimeMetaMethod::disconnectGetter):
584         (KJS::Bindings::QtRuntimeConnectionMethod::lengthGetter):
585         (KJS::Bindings::QtConnectionObject::execute):
586         * bridge/runtime.cpp:
587         (KJS::Bindings::Instance::createRuntimeObject):
588         * bridge/runtime.h:
589         (KJS::Bindings::Instance::valueOf):
590         * bridge/runtime_array.cpp:
591         (RuntimeArray::lengthGetter):
592         * bridge/runtime_method.cpp:
593         (RuntimeMethod::lengthGetter):
594         * bridge/runtime_object.cpp:
595         (RuntimeObjectImp::RuntimeObjectImp):
596         (RuntimeObjectImp::methodGetter):
597         (RuntimeObjectImp::defaultValue):
598         * xml/XMLHttpRequest.cpp:
599         (WebCore::XMLHttpRequest::dropProtection):
600
601 2008-05-11  Robin Dunn  <robin@alldunn.com>
602
603         Reviewed by Kevin Ollivier.
604
605         Since wx popup menus dismiss themselves when an item is selected we need to
606         call hidePopup so webkit's internal state is correct.
607         
608         https://bugs.webkit.org/show_bug.cgi?id=19000
609
610         * platform/wx/PopupMenuWx.cpp:
611         (WebCore::PopupMenu::OnMenuItemSelected):
612         (WebCore::PopupMenu::hide):
613
614 2008-05-11  Sam Weinig  <sam@webkit.org>
615
616         Reviewed by Mark Rowe.
617
618         Move some generic parsing functions into a new ParserUtilities header so that
619         they can be used for non-SVG builds too.
620
621         * WebCore.vcproj/WebCore.vcproj:
622         * WebCore.xcodeproj/project.pbxproj:
623         * platform/text/ParserUtilities.h: Added.
624         (WebCore::skipString):
625         * svg/SVGParserUtilities.h:
626         (WebCore::isWhitespace):
627         (WebCore::skipOptionalSpaces):
628         (WebCore::skipOptionalSpacesOrDelimiter):
629
630 2008-05-11  Sam Weinig  <sam@webkit.org>
631
632         Reviewed by Dan Bernstein.
633
634         Add scaffolding for the implementation of Access Control for Cross-site Requests. 
635
636         * GNUmakefile.am:
637         * WebCore.pro:
638         * WebCore.vcproj/WebCore.vcproj:
639         * WebCore.xcodeproj/project.pbxproj:
640         * WebCoreSources.bkl:
641         * xml/AccessControlList.cpp: Added.
642         (WebCore::AccessControlList::AccessControlList):
643         (WebCore::AccessControlList::~AccessControlList):
644         (WebCore::AccessControlList::parseAccessControlHeader):
645         (WebCore::AccessControlList::checkOrigin):
646         * xml/AccessControlList.h: Added.
647         * xml/AccessItem.cpp: Added.
648         (WebCore::AccessItem::AccessItem):
649         (WebCore::AccessItem::parseAccessItem):
650         (WebCore::AccessItem::matches):
651         * xml/AccessItem.h: Added.
652         * xml/AccessItemRule.cpp: Added.
653         (WebCore::AccessItemRule::AccessItemRule):
654         (WebCore::AccessItemRule::parseAccessItemRule):
655         * xml/AccessItemRule.h: Added.
656
657 2008-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
658
659         Debug build fix.
660
661         * loader/appcache/ApplicationCache.cpp: Include stdio.h
662         as we are using printf in ApplicationCache::dump().
663
664 2008-05-10  Dan Bernstein  <mitz@apple.com>
665
666         Reviewed by Jessica Kahn.
667
668         - add a copy assignment operator to FontPlatformData on Mac to properly
669           retain the m_font data member.
670
671         * platform/graphics/mac/FontPlatformData.h:
672         * platform/graphics/mac/FontPlatformDataMac.mm:
673         (WebCore::FontPlatformData::FontPlatformData):
674         (WebCore::~FontPlatformData):
675         (WebCore::FontPlatformData::operator=):
676         (WebCore::FontPlatformData::setFont):
677
678 2008-05-10  Adele Peterson  <adele@apple.com>
679
680         Reviewed by Tim Hatcher.
681
682         Fix crash for WebKit clients that don't set a group name for the WebView/Page.
683
684         * page/PageGroup.cpp: (WebCore::PageGroup::PageGroup): Instead of adding the Page directly to the group,
685           call the addPage method, since it does extra work initializing m_localStorage.
686
687 2008-05-09  Sam Weinig  <sam@webkit.org>
688
689         Reviewed by Mark Rowe.
690
691         Fix for https://bugs.webkit.org/show_bug.cgi?id=18958
692         NULL pointer dereference in NamedAttrMap::setNamedItem
693
694         Test: fast/dom/NamedNodeMap-setNamedItem-crash.html
695
696         * dom/NamedAttrMap.cpp:
697         (WebCore::NamedAttrMap::setNamedItem): Null check the argument.
698
699 2008-05-09  Kevin McCullough  <kmccullough@apple.com>
700
701         Build fix.
702
703         * page/Console.cpp:
704         (WebCore::Console::profile):
705
706 2008-05-09  Sam Weinig  <sam@webkit.org>
707
708         Rubber-stamped by Mark Rowe.
709
710         Remove the ENABLE_CROSS_DOCUMENT_MESSAGING #ifdefs.
711
712         * Configurations/WebCore.xcconfig:
713         * WebCore.vcproj/WebCore.vcproj:
714         * WebCore.vcproj/build-generated-files.sh:
715         * bindings/js/JSDOMWindowCustom.cpp:
716         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
717         (WebCore::JSDOMWindow::postMessage):
718         * bindings/js/JSEventCustom.cpp:
719         (WebCore::toJS):
720         * bindings/objc/DOMEvents.mm:
721         (+[DOMEvent _wrapEvent:WebCore::]):
722         * dom/Document.cpp:
723         (WebCore::Document::createEvent):
724         * dom/Event.cpp:
725         (WebCore::Event::isMessageEvent):
726         * dom/Event.h:
727         * dom/MessageEvent.cpp:
728         * dom/MessageEvent.h:
729         * dom/MessageEvent.idl:
730         * page/DOMWindow.cpp:
731         (WebCore::DOMWindow::postMessageTimerFired):
732         * page/DOMWindow.h:
733         * page/DOMWindow.idl:
734
735 2008-05-09  Adam Barth  <abarth-webkit@adambarth.com>
736
737         Reviewed by Sam Weinig.
738
739         https://bugs.webkit.org/show_bug.cgi?id=18771
740
741         Make postMessage generate an event on the window instead of the
742         document.
743
744         Test: http/tests/messaging/cross-domain-message-event-dispatch.html
745
746         * dom/EventTargetNode.cpp:
747         (WebCore::EventTargetNode::dispatchWindowEvent):
748         * dom/EventTargetNode.h:
749         * page/DOMWindow.cpp:
750         (WebCore::DOMWindow::postMessageTimerFired):
751
752 2008-05-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
753
754         Reviewed by Simon.
755
756         Replaced all instances of qDebug() with LOG(Media, ...)
757         in MediaPlayerPrivatePhonon.
758
759         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
760         (WebCore::MediaPlayerPrivate::updateStates):
761
762 2008-05-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
763
764         Reviewed by Simon
765
766         Fix the Qt/Mac build.
767
768         * platform/qt/FileSystemQt.cpp:
769
770 2008-05-08  Sam Weinig  <sam@webkit.org>
771
772         Reviewed by Anders Carlsson.
773
774         Rename the XMLHttpRequestState enum values to match the spec.
775
776         * xml/XMLHttpRequest.cpp:
777         (WebCore::XMLHttpRequest::responseXML):
778         (WebCore::XMLHttpRequest::XMLHttpRequest):
779         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
780         (WebCore::XMLHttpRequest::open):
781         (WebCore::XMLHttpRequest::send):
782         (WebCore::XMLHttpRequest::abort):
783         (WebCore::XMLHttpRequest::setRequestHeader):
784         (WebCore::XMLHttpRequest::getAllResponseHeaders):
785         (WebCore::XMLHttpRequest::getResponseHeader):
786         (WebCore::XMLHttpRequest::status):
787         (WebCore::XMLHttpRequest::statusText):
788         (WebCore::XMLHttpRequest::processSyncLoadResults):
789         (WebCore::XMLHttpRequest::didFinishLoading):
790         (WebCore::XMLHttpRequest::didReceiveData):
791         * xml/XMLHttpRequest.h:
792         (WebCore::):
793
794 2008-05-08  Dan Bernstein  <mitz@apple.com>
795
796         Reviewed by Mark Rowe.
797
798         - fix https://bugs.webkit.org/show_bug.cgi?id=18818
799           <rdar://problem/5901544> REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)
800
801         Test: fast/css/first-letter-float-after-float.html
802
803         * rendering/RenderBlock.cpp:
804         (WebCore::RenderBlock::updateFirstLetter): Changed to add the first
805         letter container right before the rest of the text it is taken from,
806         instead of at the beginning of the block.
807
808 2008-05-08  Chris Fleizach  <cfleizach@apple.com>
809
810         Reviewed by Darin Adler.
811
812         <rdar://problem/5921046> AX: list box options have wrong AXPosition
813
814         * page/AccessibilityObject.cpp:
815         (WebCore::AccessibilityObject::documentFrameView):
816         * page/AccessibilityObject.h:
817
818 2008-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
819
820         Reviewed by Eric.
821
822         Bug 18916: make_names.pl --factory needs to support custom c++ guard
823
824         Add --guardFactoryWith to handle the cpp guard around generated factories.
825
826         * DerivedSources.make: Set the guardFactoryWith variable for SVG factory.
827         * GNUmakefile.am: Ditto.
828         * WebCore.pro: Ditto.
829         * dom/make_names.pl: Add guardFactoryWith option.
830
831 2008-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
832
833         Reviewed by Adam Roben.
834
835         wx & Gtk build fix.
836
837         Should also fix the cURL backend for the Windows port.
838
839         * WebCore.vcproj/WebCore.vcproj: Add FormDataStreamCurl information.
840         * platform/network/curl/FormDataStreamCurl.h: Include stdio.h which
841         fixes the build on some machine.
842
843         * webcore-wx.bkl: Add FormDataStreamCurl.cpp.
844
845 2008-05-08  Timothy Hatcher  <timothy@apple.com>
846
847         Fixes the bug where the Web Inspector could not
848         find any localization strings.
849
850         Reviewed by Mark Rowe.
851
852         * WebCore.xcodeproj/project.pbxproj: Add the localizedStrings.js
853         file to the WebCore Copy Resources phase. Also removes an idl from
854         the Copy Resources phase.
855
856 2008-05-08  Dan Bernstein  <mitz@apple.com>
857
858         Reviewed by Adam Roben.
859
860         - fix <rdar://problem/5697957> "No recent searches" label in a narrow search field's history popup is truncated
861
862         * platform/win/PopupMenuWin.cpp:
863         (WebCore::PopupMenu::calculatePositionAndSize): Changed to use a bold
864         font for measuring labels.
865
866 2008-05-08  Dan Bernstein  <mitz@apple.com>
867
868         Reviewed by Geoffrey Garen.
869
870         - cross-platform fix for http://bugs.webkit.org/show_bug.cgi?id=17590 
871           ASSERTION FAILED: subject in jsRegExpExecute()
872
873         * page/Frame.cpp:
874         (WebCore::Frame::matchLabelsAgainstElement):
875
876 2008-05-08  Holger Hans Peter Freyther  <zecke@selfish.org>
877
878         Reviewed by Simon.
879
880         Simple ImageBuffer::image implementation.
881
882         In contrast to cg and cairo we do not use a special BitmapImage because
883         the ownership of the FrameData inside the BitmapImage is a bit backward
884         (actually owned by the ImageDecoderQt...). Further work is needed for image
885         and pixmap handling in the qt port...
886
887         * WebCore.pro:
888         * platform/graphics/ImageBuffer.h:
889         * platform/graphics/qt/ImageBufferQt.cpp:
890         (WebCore::ImageBuffer::image):
891         * platform/graphics/qt/ImageQt.cpp:
892         * platform/graphics/qt/StillImageQt.cpp: Added.
893         (WebCore::StillImage::StillImage):
894         (WebCore::StillImage::size):
895         (WebCore::StillImage::getPixmap):
896         (WebCore::StillImage::draw):
897         * platform/graphics/qt/StillImageQt.h: Added.
898
899 2008-05-08  Holger Hans Peter Freyther  <zecke@selfish.org>
900
901         Reviewed by Simon.
902
903         Update the WebKit.qrc of the inspector to be functional again
904
905         * page/inspector/WebKit.qrc:
906
907 2008-05-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
908
909         Reviewed by Simon
910
911         Fix the Qt/Mac build.
912
913         * platform/FileSystem.h:
914
915 2008-05-08  Ariya Hidayat  <ariya.hidayat@trolltech.com>
916
917         Reviewed by Simon.
918
919         Use native Windows library handling (instead of QLibrary) 
920         for Qt/Win32's PlatformModule.
921
922         * platform/FileSystem.h:
923         (WebCore::PlatformModuleVersion::PlatformModuleVersion):
924         * platform/qt/FileSystemQt.cpp:
925         (WebCore::unloadModule):
926
927 2008-05-08  Simon Hausmann  <hausmann@webkit.org>
928
929         Reviewed and found by Holger.
930
931         Include .css in the list of extensions for text/css. Fixes
932         fast/loader/local-css-allowed-in-strict-mode.html.
933
934         * platform/qt/MIMETypeRegistryQt.cpp:
935
936 2008-05-08  Simon Hausmann  <hausmann@webkit.org>
937
938         Fix the Qt and Wx build when compiling without offline app support.
939
940         * loader/FrameLoader.cpp:
941         (WebCore::FrameLoader::canCachePage):
942
943 2008-05-07  Sam Weinig  <sam@webkit.org>
944
945         Reviewed by Adele Peterson
946
947         Update MessageEvent to match the latest version of the HTML5 spec,
948         adding the lastEventId attribute.
949
950         * dom/MessageEvent.cpp:
951         (WebCore::MessageEvent::MessageEvent):
952         (WebCore::MessageEvent::initMessageEvent):
953         * dom/MessageEvent.h:
954         (WebCore::MessageEvent::lastEventId):
955         * dom/MessageEvent.idl:
956         * page/DOMWindow.cpp:
957         (WebCore::DOMWindow::postMessage):
958
959 2008-05-07  Stephanie Lewis <slewis@apple.com>
960
961         Reviewed by Maciej.
962
963         remove non-functioning code.  If onunload should be fired from these nodes then
964         a WindowEventListener needs to be set.  However, Firefox and IE also do not
965         fire onunload events for these cases.
966
967         Test: fast/events/onunload-not-on-body.html 
968         
969         * html/HTMLFrameElementBase.cpp:
970         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
971         * html/HTMLObjectElement.cpp
972         (WebCore::HTMLObjectElement::parseMappedAttribute):
973
974 2008-05-07  Dan Bernstein  <mitz@apple.com>
975
976         Reviewed by John Sullivan.
977
978         - fix https://bugs.webkit.org/show_bug.cgi?id=18909
979           <rdar://problem/5914165> REGRESSION (r31872-r31878): Viewed photos not closing completely at indycar.com
980
981         Test: fast/dynamic/positioned-movement-with-positioned-children.html
982
983         * rendering/RenderBlock.cpp:
984         (WebCore::RenderBlock::layoutOnlyPositionedObjects): Cover the case of
985         a positioned object that has only moved and has only positioned children
986         that have changed.
987         * rendering/RenderObject.h:
988         (WebCore::RenderObject::needsPositionedMovementLayout): Added this
989         accessor.
990
991 2008-05-07  Anders Carlsson  <andersca@apple.com>
992
993         Reviewed by John.
994
995         When no document loaders are associated with an application cache group,
996         release the reference to the newest cache group. This prevents reference cycles.
997         
998         * loader/appcache/ApplicationCacheGroup.cpp:
999         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
1000         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
1001         (WebCore::ApplicationCacheGroup::cacheDestroyed):
1002         * loader/appcache/ApplicationCacheGroup.h:
1003         
1004         * loader/appcache/ApplicationCacheStorage.cpp:
1005         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
1006         Return early if the datbase wasn't open.
1007         
1008         (WebCore::ApplicationCacheStorage::loadCache):
1009         Add error.
1010
1011 2008-05-07  Anders Carlsson  <andersca@apple.com>
1012
1013         Reviewed by Adam.
1014
1015         Don't put pages with an application cache in the BF cache.
1016         
1017         * loader/FrameLoader.cpp:
1018         (WebCore::FrameLoader::canCachePage):
1019
1020 2008-05-07  Justin Garcia  <justin.garcia@apple.com>
1021
1022         Reviewed by John Sullivan.
1023
1024         <rdar://problem/5666354> Crashes in Mail at WebCore::RemoveNodeCommand::doApply
1025         
1026         When a single tab or series of tabs was copied, we weren't putting them into a 
1027         tab span.  On Paste, we would be given a text node with a single tab or series
1028         of tabs in it, and we would crash when inserting it at the start of a block
1029         (where that kind of text becomes completely unrendered).
1030
1031         * editing/ReplaceSelectionCommand.cpp:
1032         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Clean
1033         up correctly and early return if we removed everything that was inserted.
1034         * editing/markup.cpp:
1035         (WebCore::createMarkup):  Include the tab span when the only thing copied
1036         was a tab or a series of tabs.
1037
1038 2008-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
1039
1040         Reviewed by Adam Roben.
1041
1042         wx & Gtk build fix.
1043
1044         * platform/network/curl/FormDataStreamCurl.cpp: Added stdint.h include. We need to define
1045         __STDC_LIMIT_MACROS to have SIZE_MAX exported.
1046         * platform/network/curl/FormDataStreamCurl.h: Removed cstdint include (replaced by stdint.h)
1047         as it is not present on the build bots.
1048         * plugins/gtk/PluginDatabaseGtk.cpp: Added missing #endif.
1049
1050 2008-05-07  David Kilzer  <ddkilzer@apple.com>
1051
1052         Bug 18900: Password field has focus but can't type text (i.rememberthemilk.com)
1053         <https://bugs.webkit.org/show_bug.cgi?id=18900>
1054         <rdar://problem/5912383>
1055
1056         Original patch by Aaron Golden and Tim Omernick.  Reviewed by Adele.
1057
1058         Test: fast/forms/textfield-to-password-on-focus.html
1059
1060         * html/HTMLInputElement.cpp:
1061         (WebCore::HTMLInputElement::setInputType): If the current node has
1062         focus, call updateFocusAppearance() to make sure its state is correct
1063         after changing its type.
1064
1065 2008-05-07  Chris Fleizach  <cfleizach@apple.com>
1066
1067         Reviewed by Alice Liu
1068
1069         <rdar://problem/4867889> REGRESSION: "Choose File.." buttons are exposed as AXGroup instead of AXButton
1070
1071         * page/AccessibilityObject.h:
1072         (WebCore::AccessibilityObject::isFileUploadButton):
1073         * page/AccessibilityRenderObject.cpp:
1074         (WebCore::AccessibilityRenderObject::isFileUploadButton):
1075         (WebCore::AccessibilityRenderObject::actionElement):
1076         (WebCore::AccessibilityRenderObject::textUnderElement):
1077         (WebCore::AccessibilityRenderObject::stringValue):
1078         (WebCore::AccessibilityRenderObject::roleValue):
1079         * page/AccessibilityRenderObject.h:
1080         * rendering/RenderFileUploadControl.cpp:
1081         (WebCore::RenderFileUploadControl::buttonValue):
1082         (WebCore::RenderFileUploadControl::fileTextValue):
1083         * rendering/RenderFileUploadControl.h:
1084
1085 2008-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
1086
1087         Reviewed by Eric.
1088
1089         Bug 17971: [Curl] FormData processing should be moved to its own class
1090
1091         Move FormData treatment into FormDataStream. The aim is to have FormDataStream behave like a stream that cURL
1092         could manipulate.
1093
1094         First step into having complete file uploading facility in cURL.
1095
1096         No test case as it is only code refactoring.
1097
1098         * GNUmakefile.am: Add FormDataStreamCurl.cpp
1099         * platform/network/ResourceHandleInternal.h: Move code to FormStreamDataCurl.h
1100         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1101         * platform/network/curl/FormDataStreamCurl.cpp: Added.
1102         (WebCore::FormDataStream::~FormDataStream):
1103         (WebCore::FormDataStream::read):
1104         * platform/network/curl/FormDataStreamCurl.h: Added.
1105         (WebCore::FormDataStream::FormDataStream):
1106         * platform/network/curl/ResourceHandleCurl.cpp:
1107         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1108         * platform/network/curl/ResourceHandleManager.cpp:
1109         (WebCore::readCallback): Move code to FormDataStreamCurl.cpp
1110
1111 2008-05-07  Adam Treat  <treat@kde.org>
1112
1113         Reviewed by Simon.
1114
1115         https://bugs.webkit.org/show_bug.cgi?id=18898
1116
1117         Fixed wrong transform being used for creating the pixmap for a new
1118         transparency layer. This fixes the popup menus on dell.com.
1119
1120         * platform/graphics/qt/GraphicsContextQt.cpp:
1121         (WebCore::GraphicsContext::beginTransparencyLayer):
1122
1123 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1124
1125         Reviewed by Simon.
1126
1127         Share the plug-in directories between Gtk and Qt/X11 port.
1128
1129         * platform/qt/FileSystemQt.cpp:
1130         (WebCore::homeDirectoryPath): Implement it for Qt.
1131         * plugins/PluginDatabase.cpp:
1132         (WebCore::addMozillaPluginDirectories): Shared code.
1133         (WebCore::PluginDatabase::defaultPluginDirectories):
1134         (WebCore::PluginDatabase::isPreferredPluginDirectory): Shared code.
1135         * plugins/gtk/PluginDatabaseGtk.cpp:
1136         (WebCore::PluginDatabase::isPreferredPluginDirectory): Refactored.
1137         * plugins/qt/PluginDatabaseQt.cpp: Refactored.
1138
1139 2008-05-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
1140
1141         Reviewed by Simon
1142
1143         Fix build issues on Mac and refeactor the .pro file a bit.
1144
1145         * WebCore.pro:
1146         * platform/qt/TemporaryLinkStubs.cpp:
1147         (PluginPackage::fetchInfo):
1148
1149 2008-05-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
1150
1151         Reviewed by Simon
1152
1153         Draw scrollview corners (between scrollbars) using the Qt style.
1154
1155         https://bugs.webkit.org/show_bug.cgi?id=18894
1156
1157         * platform/qt/ScrollViewQt.cpp:
1158         (WebCore::drawScrollbarCorner):
1159         (WebCore::ScrollView::paint):
1160
1161 2008-05-07  Simon Hausmann  <hausmann@webkit.org>
1162
1163         Fix the Qt build, added AccessibilityListBox and ListBoxOption.cpp to
1164         the build.
1165
1166         * WebCore.pro:
1167
1168 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1169
1170         Rubber-stamped by Holger.
1171
1172         Fix building without storage support.
1173
1174         * page/PageGroup.cpp:
1175         (WebCore::PageGroup::closeLocalStorage): proper #if
1176
1177 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1178
1179         Rubber-stamped by Oliver Hunt.
1180
1181         Fix building without accessibility.
1182
1183         * page/AXObjectCache.cpp:
1184         (WebCore::AXObjectCache::selectedChildrenChanged): proper #if
1185
1186 2008-05-06  Dan Bernstein  <mitz@apple.com>
1187
1188         Reviewed by Darin Adler.
1189
1190         - fix <rdar://problem/5914544> Crash in layoutInlineChildren()
1191
1192         Test: fast/block/float/float-on-zero-height-line.html
1193
1194         * rendering/RenderBlock.cpp:
1195         (WebCore::RenderBlock::markLinesDirtyInVerticalRange):
1196
1197 2008-05-06  Alice Liu  <alice.liu@apple.com>
1198
1199         Reviewed by Adele Peterson and John Sullivan.
1200
1201         changes needed to build on Windows after r32911 and r32927
1202
1203         * WebCore.vcproj/WebCore.vcproj:
1204         * page/AXObjectCache.cpp:
1205         (WebCore::AXObjectCache::selectedChildrenChanged):
1206         * page/AccessibilityObject.h:
1207         (WebCore::AccessibilityObject::document):
1208         (WebCore::AccessibilityObject::topDocumentFrameView):
1209         (WebCore::AccessibilityObject::documentFrameView):
1210         * page/AccessibilityRenderObject.cpp:
1211         (WebCore::AccessibilityRenderObject::document):
1212         (WebCore::AccessibilityRenderObject::topDocumentFrameView):
1213         (WebCore::AccessibilityRenderObject::documentFrameView):
1214         * page/AccessibilityRenderObject.h:
1215         * page/mac/AXObjectCacheMac.mm:
1216         * page/mac/AccessibilityObjectWrapper.mm:
1217         (-[AccessibilityObjectWrapper position]):
1218         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1219
1220 2008-05-06  Brady Eidson  <beidson@apple.com>
1221
1222         Reviewed by Sam Weinig
1223
1224         Fix a few bugs with the final sync'ing of LocalStorageAreas when the thread is shut down.
1225         1 - A sync task actually needs to be scheduled for each LocalStorageArea when the shut down occurs.
1226         2 - Pending sync timers all need to be cancelled.
1227
1228         * storage/LocalStorage.cpp:
1229         (WebCore::LocalStorage::storageArea):
1230         (WebCore::LocalStorage::close): Tell each LocalStorageArea to schedule it's final sync before scheduling
1231           thread termination.
1232         * storage/LocalStorage.h:  Change the map to be of LocalStorageAreas instead of StorageAreas
1233
1234         * storage/LocalStorageArea.cpp:
1235         (WebCore::LocalStorageArea::LocalStorageArea):
1236         (WebCore::LocalStorageArea::~LocalStorageArea): ASSERT the timer has been cancelled, but make SURE it is
1237           in release builds.
1238         (WebCore::LocalStorageArea::scheduleFinalSync): Cancel the sync timer, schedule the final sync, and set the
1239           "final sync scheduled" flag
1240         (WebCore::LocalStorageArea::scheduleItemForSync): ASSERT that the final sync hasn't already been scheduled
1241         (WebCore::LocalStorageArea::scheduleClear): Ditto
1242         * storage/LocalStorageArea.h:
1243
1244 2008-05-06  Kevin Ollivier  <kevino@theolliviers.com>
1245
1246         wx build fix. Adding files added in  r32925 to the bakefiles.
1247
1248         * WebCoreSources.bkl:
1249
1250 2008-05-06  Alp Toker  <alp@nuanti.com>
1251
1252         GTK+ build fix. Add empty stub to keep non-accessible ports building.
1253
1254         * page/AXObjectCache.h:
1255         (WebCore::AXObjectCache::selectedChildrenChanged):
1256
1257 2008-05-06  Beth Dakin  <bdakin@apple.com>
1258
1259         Reviewed by Darin.
1260
1261         Fix for <rdar://problem/5907916> Implement 'aria-labeledby' and 
1262         'aria-describedby' attributes.
1263
1264         * html/HTMLAttributeNames.in: Added new attributes. Added both the 
1265         British spelling (since that is what is specified in the spec), and 
1266         the American spelling (since the bug filer and I are two Americans 
1267         who keep spelling it the American way by accident). 
1268         * page/AccessibilityObject.cpp: Added empty wrappers. These 
1269         functions can't do anything meaningful without a renderer.
1270         (WebCore::AccessibilityObject::ariaAccessiblityName):
1271         (WebCore::AccessibilityObject::ariaLabeledByAttribute):
1272         (WebCore::AccessibilityObject::ariaDescribedByAttribute):
1273         * page/AccessibilityObject.h:
1274
1275         Here is where the real work is done.
1276         * page/AccessibilityRenderObject.h:
1277         * page/AccessibilityRenderObject.cpp:
1278         (WebCore::accessibleNameForNode): Takes a node and finds its 
1279         contribution to the accessible name, as defined by the Mozilla ARIA 
1280         Implementer's Guide. 
1281         (WebCore::AccessibilityRenderObject::ariaAccessiblityName): Takes a 
1282         string of space-separated IDs, fetches the corresponding element 
1283         for each ID, and concatenates an accessible name based on the 
1284         elements.
1285         (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute): 
1286         Retrieve the labeledby attribute and send its contents to 
1287         ariaAccessibilityName().
1288         (WebCore::AccessibilityRenderObject::title): Return the ARIA 
1289         labeledby value if one exists.
1290         (WebCore::AccessibilityRenderObject::ariaDescribedByAttribute): 
1291         Retrieve the describedby attribute and send its contents to 
1292         ariaAccessibilityName().
1293         (WebCore::AccessibilityRenderObject::accessibilityDescription): 
1294         Return the ARIA describedby attribute if one exists. 
1295
1296         These are two bugs I spotted. 
1297         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Don't 
1298         ignore anything with an ARIA role.
1299         (WebCore::AccessibilityRenderObject::roleValue): Button tags maps 
1300         to ButtonRole.
1301
1302 2008-05-06  Anders Carlsson  <andersca@apple.com>
1303
1304         Reviewed by Brady.
1305
1306         Support reading back app caches from the database.
1307     
1308         * loader/appcache/ApplicationCache.cpp:
1309         (WebCore::ApplicationCache::ApplicationCache):
1310         Initialize m_storageID to 0.
1311         
1312         * loader/appcache/ApplicationCacheGroup.cpp:
1313         (WebCore::ApplicationCacheGroup::cacheDestroyed):
1314         If the cache being destroyed is not the newest cache, it should no longer be 
1315         stored in the database. Remove it.
1316         
1317         (WebCore::ApplicationCacheGroup::setNewestCache):
1318         Don't store the cache here.
1319         
1320         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
1321         Store it here instead.
1322         
1323         * loader/appcache/ApplicationCacheStorage.cpp:
1324         (WebCore::ApplicationCacheStorage::loadCacheGroup):
1325         New method that loads a cache group with a given manifest URL (or returns 0 if the load fails).
1326         
1327         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
1328         Search for the group in the database.
1329         
1330         (WebCore::ApplicationCacheStorage::loadManifestHostHashes):
1331         New method that loads the host hashes from the database.
1332         
1333         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
1334         Search in the database for a cache that contains the resource.
1335         
1336         (WebCore::ApplicationCacheStorage::loadCache):
1337         New method that loads a cache with a given ID.
1338         
1339         (WebCore::ApplicationCacheStorage::remove):
1340         New method that removes a cache.
1341         
1342         * loader/appcache/ApplicationCacheStorage.h:
1343         Add definitions.
1344
1345 2008-05-06  Alp Toker  <alp@nuanti.com>
1346
1347         Partial GTK+ build fix. Add files from r32925 to the build and replace
1348         'nil' return with 0.
1349
1350         * GNUmakefile.am:
1351         * page/AccessibilityListBoxOption.cpp:
1352         (WebCore::AccessibilityListBoxOption::parentObject):
1353
1354 2008-05-06  Brady Eidson  <beidson@apple.com>
1355
1356         Reviewed by Anders
1357
1358         Make LocalStorage persistent using a SQLite database.
1359
1360         There's a few things going on here.  Whenever an item is changed, we add it to a set of
1361         "items to be sync'ed."  Instead of immediately scheduling the sync'ing on the background
1362         thread, we set a "sync timer" instead.  This is to shield against a series of rapid changes
1363         to avoid thread churn.
1364
1365         When the sync timer fires, we move the "items to be sync'ed" set to a background thread set
1366         and schedule the sync task which is where the items are actually committed to disk.
1367
1368         Current design for reading items back in from disk is to be as aggressive as possible.
1369         When a page first accesses it's LocalStorage area, we begin to import all items in from disk so
1370         they are immediately available.  A future enhancement will be to being this pre-fetching the
1371         moment we start loading a page when we know that page has LocalStorage.
1372
1373         * storage/LocalStorageArea.cpp:
1374         (WebCore::LocalStorageArea::LocalStorageArea):
1375         (WebCore::LocalStorageArea::length): Return the length, or wait for the import to complete then return it.
1376         (WebCore::LocalStorageArea::key): Return the key, or wait for the import to complete then return it.
1377         (WebCore::LocalStorageArea::getItem): Return the item, or wait for the import to complete then return it.
1378         (WebCore::LocalStorageArea::setItem): Set the item, or hold the import lock and set it.  The second case is
1379           because if the item is set while the import is still in progress, the new value should override whatever
1380           the imported value is.
1381         (WebCore::LocalStorageArea::removeItem): Remove the item, or hold the import lock and remove it.  See the 
1382           explanation for setItem()
1383         (WebCore::LocalStorageArea::contains): Return whether or not the item is contained.  Do the same dance with
1384           the import flag, import lock, and import condition that the above methods do.
1385
1386         (WebCore::LocalStorageArea::itemChanged): Schedule the item for sync'ing
1387         (WebCore::LocalStorageArea::itemRemoved): Schedule the removal of the item for sync'ing
1388         (WebCore::LocalStorageArea::areaCleared): Schedule the clear for sync'ing, and clear all previously 
1389           scheduled items.
1390
1391         (WebCore::LocalStorageArea::scheduleItemForSync): Add an item to the sync set.
1392         (WebCore::LocalStorageArea::scheduleClear): Set a bool flag denoting "All items removed."  If any
1393           items are later set before the actual removal takes place, they will be written *after* the removal.
1394         (WebCore::LocalStorageArea::syncTimerFired): Move the current sync-set to the background thread sync set, then 
1395           schedule a sync task.  Also transfer the "items cleared" flag to the "background thread items cleared" flag
1396         (WebCore::LocalStorageArea::performImport): Import all items from disk, then signal the import complete.
1397         (WebCore::LocalStorageArea::markImported): Set the imported flag and signal the import complete
1398         (WebCore::LocalStorageArea::performSync): If the clear flag is set then drop all items.  Then update or delete 
1399           each item waiting to be sync'ed
1400         * storage/LocalStorageArea.h:
1401
1402 2008-05-06  Brady Eidson  <beidson@apple.com>
1403
1404         Rubberstamped by Mitz Pettel RTL
1405
1406         * storage/LocalStorage.cpp:
1407         (WebCore::LocalStorage::fullDatabaseFilename): Filename extensions for localstorage = all lowercase
1408
1409 2008-05-06  Brady Eidson  <beidson@apple.com>
1410
1411         Reviewed by Darin, Sam Weinig, and Anders
1412
1413         Preparation for upcoming work making LocalStorage persistent.
1414
1415         The final step before code that actually does storage and retrieval of LocalStorage items.
1416
1417         The LocalStorage set is responsible for controlling the path and filenames that individual
1418         LocalStorageAreas will use for their persistent store.  This adds the ability to return that
1419         filename.
1420
1421         Also, add the scheduling methods that LocalStorageArea will use for importing and syncing 
1422         it's persistent items.
1423
1424         * storage/LocalStorage.cpp:
1425         (WebCore::LocalStorage::storageArea):  Add some comments re: the future direction of this
1426           method once we actually do quota tracking.
1427         (WebCore::LocalStorage::fullDatabaseFilename):
1428         (WebCore::LocalStorage::scheduleImport):
1429         (WebCore::LocalStorage::scheduleSync):
1430         * storage/LocalStorage.h:
1431
1432 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
1433
1434         Reviewed by Beth Dakin.
1435
1436         rdar://problem/5408464> REGRESSION: Unable to use Voiceover on combo boxes (disneyjobs.com)
1437
1438         * WebCore.xcodeproj/project.pbxproj:
1439         * html/HTMLOptGroupElement.cpp:
1440         (WebCore::HTMLOptGroupElement::ownerSelectElement):
1441         (WebCore::HTMLOptGroupElement::accessKeyAction):
1442         * html/HTMLOptGroupElement.h:
1443         * html/HTMLOptionElement.cpp:
1444         (WebCore::HTMLOptionElement::accessKeyAction):
1445         (WebCore::HTMLOptionElement::index):
1446         (WebCore::HTMLOptionElement::setSelected):
1447         (WebCore::HTMLOptionElement::childrenChanged):
1448         (WebCore::HTMLOptionElement::ownerSelectElement):
1449         (WebCore::HTMLOptionElement::insertedIntoDocument):
1450         * html/HTMLOptionElement.h:
1451         * html/HTMLSelectElement.cpp:
1452         (WebCore::HTMLSelectElement::childrenChanged):
1453         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
1454         * html/HTMLSelectElement.h:
1455         * page/AXObjectCache.cpp:
1456         (WebCore::AXObjectCache::get):
1457         * page/AccessibilityListBox.cpp: Added.
1458         (WebCore::AccessibilityListBox::AccessibilityListBox):
1459         (WebCore::AccessibilityListBox::~AccessibilityListBox):
1460         (WebCore::AccessibilityListBox::create):
1461         (WebCore::AccessibilityListBox::addChildren):
1462         (WebCore::AccessibilityListBox::selectedChildren):
1463         (WebCore::AccessibilityListBox::visibleChildren):
1464         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
1465         (WebCore::AccessibilityListBox::doAccessibilityHitTest):
1466         * page/AccessibilityListBox.h: Added.
1467         (WebCore::AccessibilityListBox::accessibilityShouldUseUniqueId):
1468         (WebCore::AccessibilityListBox::isListBox):
1469         (WebCore::AccessibilityListBox::canSetFocusAttribute):
1470         (WebCore::AccessibilityListBox::roleValue):
1471         (WebCore::AccessibilityListBox::accessibilityIsIgnored):
1472         * page/AccessibilityListBoxOption.cpp: Added.
1473         (WebCore::AccessibilityListBoxOption::AccessibilityListBoxOption):
1474         (WebCore::AccessibilityListBoxOption::~AccessibilityListBoxOption):
1475         (WebCore::AccessibilityListBoxOption::create):
1476         (WebCore::AccessibilityListBoxOption::isEnabled):
1477         (WebCore::AccessibilityListBoxOption::isSelected):
1478         (WebCore::AccessibilityListBoxOption::elementRect):
1479         (WebCore::AccessibilityListBoxOption::title):
1480         (WebCore::AccessibilityListBoxOption::size):
1481         (WebCore::AccessibilityListBoxOption::actionElement):
1482         (WebCore::AccessibilityListBoxOption::parentObject):
1483         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
1484         (WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
1485         * page/AccessibilityListBoxOption.h: Added.
1486         (WebCore::AccessibilityListBoxOption::setHTMLElement):
1487         (WebCore::AccessibilityListBoxOption::roleValue):
1488         (WebCore::AccessibilityListBoxOption::accessibilityIsIgnored):
1489         (WebCore::AccessibilityListBoxOption::isListBoxOption):
1490         * page/AccessibilityObject.h:
1491         (WebCore::AccessibilityObject::isListBox):
1492         * page/AccessibilityRenderObject.cpp:
1493         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
1494         * page/mac/AccessibilityObjectWrapper.mm:
1495         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1496         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1497         * rendering/RenderListBox.cpp:
1498         (WebCore::RenderListBox::selectionChanged):
1499         * rendering/RenderListBox.h:
1500
1501 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
1502
1503         Reviewed by Beth Dakin.
1504
1505          <rdar://problem/5455287> AXWebArea should include AXURL
1506
1507         * page/AccessibilityRenderObject.cpp:
1508         (WebCore::AccessibilityRenderObject::url):
1509         * page/mac/AccessibilityObjectWrapper.mm:
1510         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1511
1512 2008-05-06  Alice Liu  <alice.liu@apple.com>
1513
1514         Rubber-stamped by Beth
1515         
1516         stab-in-the-dark attempt at fixing non-mac builds.
1517
1518         * GNUmakefile.am:
1519         * WebCore.pro:
1520         * WebCore.vcproj/WebCore.vcproj:
1521         * WebCoreSources.bkl:
1522
1523 2008-05-06  Anders Carlsson  <andersca@apple.com>
1524
1525         Reviewed by Adam.
1526
1527         Only use the toplevel application cache when loading subframes.
1528
1529         * loader/MainResourceLoader.cpp:
1530         (WebCore::MainResourceLoader::load):
1531
1532 2008-05-06  Adam Barth  <abarth-webkit@adambarth.com>
1533
1534         Reviewed by Sam Weinig.
1535
1536         https://bugs.webkit.org/show_bug.cgi?id=18725
1537         Implement asynchronous postMessage.
1538         MessageEvent no longer bubbles as per r1237 in the HTML 5 working draft.
1539
1540         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
1541
1542         Test: http/tests/security/postMessage/delivery-order.html
1543
1544         * dom/MessageEvent.cpp:
1545         (WebCore::MessageEvent::MessageEvent):
1546         * page/DOMWindow.cpp:
1547         (WebCore::PostMessageTimer::PostMessageTimer):
1548         (WebCore::PostMessageTimer::event):
1549         (WebCore::PostMessageTimer::targetOrigin):
1550         (WebCore::PostMessageTimer::fired):
1551         (WebCore::DOMWindow::postMessage):
1552         (WebCore::DOMWindow::postMessageTimerFired):
1553         * page/DOMWindow.h:
1554         * page/DOMWindow.idl:
1555         
1556 2008-05-06  Anders Carlsson  <andersca@apple.com>
1557
1558         Reviewed by Brady.
1559
1560         Store cache to the database.
1561
1562         * loader/appcache/ApplicationCache.cpp:
1563         (WebCore::ApplicationCache::addResource):
1564         If the cache has been saved to disk, save the resource as well.
1565         
1566         * loader/appcache/ApplicationCache.h:
1567         (WebCore::ApplicationCache::onlineWhitelist):
1568         New method which returns the online whitelist.
1569
1570         (WebCore::ApplicationCache::setStorageId):
1571         (WebCore::ApplicationCache::storageId):
1572         Setter/getter for the application cache storage ID.
1573
1574         * loader/appcache/ApplicationCacheGroup.cpp:
1575         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
1576         Save the cache/group to disk.
1577         
1578         * loader/appcache/ApplicationCacheGroup.h:
1579         (WebCore::ApplicationCacheGroup::setStorageID):
1580         (WebCore::ApplicationCacheGroup::storageID):
1581         Setter/getter for the application cache group storage ID.
1582         
1583         * loader/appcache/ApplicationCacheResource.cpp:
1584         (WebCore::ApplicationCacheResource::addType):
1585         We can't add a new type if the resource has been saved to disk.
1586         
1587         * loader/appcache/ApplicationCacheResource.h:
1588         (WebCore::ApplicationCacheResource::setStorageID):
1589         (WebCore::ApplicationCacheResource::storageID):
1590         Setter/getter for the application cache resource storage ID.
1591
1592         * loader/appcache/ApplicationCacheStorage.cpp:
1593         * loader/appcache/ApplicationCacheStorage.cpp:
1594         (WebCore::ApplicationCacheStorage::executeSQLCommand):
1595         New method for executing SQL and logging any errors.
1596         
1597         (WebCore::ApplicationCacheStorage::openDatabase):
1598         Create new tables.
1599         
1600         (WebCore::ApplicationCacheStorage::executeStatement):
1601         New method for executing an SQL statement and logging any errors.
1602         
1603         (WebCore::ApplicationCacheStorage::store):
1604         New methods for storing a cache group, cache and cache resource to the store.
1605
1606         (WebCore::ApplicationCacheStorage::storeNewestCache):
1607         New method which stores the newest cache and updates the newest cache field in the cache group.
1608         
1609         * loader/appcache/ApplicationCacheStorage.h:
1610         Add new methods.
1611         
1612         * platform/sql/SQLiteStatement.h:
1613         (WebCore::SQLiteStatement::query):
1614         Getter for the SQL query.
1615
1616 2008-05-06  Brady Eidson  <beidson@apple.com>
1617
1618         Reviewed by Darin Adler
1619
1620         Preparation for upcoming work making LocalStorage persistent.
1621
1622         Writing persistent values for LocalStorage will take place on a background thread.
1623         Here is that background thread, as well as most of the hooks that will be utilized to
1624         make the whole song and dance work.
1625
1626         The thread itself is very simple and MessageQueue based.  LocalStorageTasks are what 
1627         mark the work that needs to be done and come in 5 flavors:  Import and Sync a LocalStorage set,
1628         Import and Sync a LocalStorageArea, and terminate the thread.
1629
1630         This patch accomplished 2 things:
1631         
1632         1 - Each PageGroup has its own LocalStorage set.  Upon its creation its LocalStorageThread is 
1633             created and started.
1634
1635         2 - At application shutdown, each thread is synchronously terminated.
1636
1637         What happens between steps 1 and 2 will come later.
1638
1639         * GNUmakefile.am:
1640         * WebCore.pro:
1641         * WebCore.vcproj/WebCore.vcproj:
1642         * WebCore.xcodeproj/project.pbxproj:
1643         * WebCoreSources.bkl:
1644
1645         * storage/LocalStorage.cpp: Add some threading ASSERTs to make it clear which thread each
1646           method is meant to be called from.
1647         (WebCore::LocalStorage::LocalStorage):
1648         (WebCore::LocalStorage::storageArea):
1649         (WebCore::LocalStorage::performImport): Placeholder for importing known origins and quotas
1650         (WebCore::LocalStorage::performSync): Placeholder for writing out updated origins and quotas
1651         (WebCore::LocalStorage::close): Synchronously terminate the thread.
1652         * storage/LocalStorage.h:
1653
1654         * storage/LocalStorageArea.cpp: Add some threading ASSERTs to make it clear which thread each
1655           method is meant to be called from.
1656         (WebCore::LocalStorageArea::itemChanged):
1657         (WebCore::LocalStorageArea::itemRemoved):
1658         (WebCore::LocalStorageArea::areaCleared):
1659         (WebCore::LocalStorageArea::dispatchStorageEvent):
1660         (WebCore::LocalStorageArea::performImport): Placeholder for importing all items for this 
1661           LocalStorageArea to prime the page before the items are needed
1662         (WebCore::LocalStorageArea::performSync): Placeholder for writing out dirty items to disk
1663         * storage/LocalStorageArea.h:
1664
1665         * storage/LocalStorageTask.cpp: Added.
1666         (WebCore::LocalStorageTask::LocalStorageTask):
1667         (WebCore::LocalStorageTask::performTask):
1668         * storage/LocalStorageTask.h: Added.
1669         (WebCore::LocalStorageTask::):
1670         (WebCore::LocalStorageTask::createImport):
1671         (WebCore::LocalStorageTask::createSync):
1672         (WebCore::LocalStorageTask::createTerminate):
1673
1674         * storage/LocalStorageThread.cpp: Added.
1675         (WebCore::LocalStorageThread::create):
1676         (WebCore::LocalStorageThread::LocalStorageThread):
1677         (WebCore::LocalStorageThread::start):
1678         (WebCore::LocalStorageThread::localStorageThreadStart):
1679         (WebCore::LocalStorageThread::localStorageThread):
1680         (WebCore::LocalStorageThread::scheduleImport):
1681         (WebCore::LocalStorageThread::scheduleSync):
1682         (WebCore::LocalStorageThread::terminate): 
1683         (WebCore::LocalStorageThread::performTerminate):
1684         * storage/LocalStorageThread.h: Added.
1685
1686 2008-05-06  Anders Carlsson  <andersca@apple.com>
1687
1688         Reviewed by Darin.
1689
1690         Add NPN_PopUpContextMenu.
1691         
1692         * bridge/npapi.h:
1693         * plugins/npfunctions.h:
1694
1695 2008-05-06  Alp Toker  <alp@nuanti.com>
1696
1697         GTK+ build fix. Add file from r32911 to the build.
1698
1699         * GNUmakefile.am:
1700
1701 2008-05-06  Gwenole Beauchesne  <gbeauchesne@splitted-desktop.org>
1702
1703         Reviewed by Alp Toker.
1704
1705         http://bugs.webkit.org/show_bug.cgi?id=18906
1706         [GTK] Fix varargs terminator in g_build_filename()
1707
1708         * plugins/gtk/PluginDatabaseGtk.cpp:
1709         (WebCore::PluginDatabase::isPreferredPluginDirectory): Fix varargs
1710         terminator.
1711
1712 2008-05-06  Kevin McCullough  <kmccullough@apple.com>
1713
1714         - Forgot to update localized Strings from previous checkin.
1715
1716         * English.lproj/localizedStrings.js:
1717
1718 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
1719
1720         Reviewed by Beth Dakin
1721
1722         <rdar://problem/5408464> REGRESSION: Unable to use Voiceover on combo boxes (disneyjobs.com)
1723         <rdar://problem/5895634> AX: AccessibilityObjectWrapper is being leaked all over the place
1724         <rdar://problem/5893907> CrashTracer: [REGRESSION] 44 crashes in Safari at com.apple.WebCore: WebCore::AccessibilityObject::clearChildren + 9
1725         
1726         Initial prep work to support accessibility objects that do not have renderers. 
1727
1728         * WebCore.xcodeproj/project.pbxproj:
1729         * page/AXObjectCache.cpp:
1730         (WebCore::AXObjectCache::~AXObjectCache):
1731         (WebCore::AXObjectCache::get):
1732         (WebCore::AXObjectCache::remove):
1733         (WebCore::AXObjectCache::getAXID):
1734         (WebCore::AXObjectCache::removeAXID):
1735         (WebCore::AXObjectCache::childrenChanged):
1736         * page/AXObjectCache.h:
1737         (WebCore::AXObjectCache::isIDinUse):
1738         * page/AccessibilityObject.cpp:
1739         (WebCore::AccessibilityObject::AccessibilityObject):
1740         (WebCore::AccessibilityObject::create):
1741         (WebCore::AccessibilityObject::detach):
1742         (WebCore::AccessibilityObject::firstChild):
1743         (WebCore::AccessibilityObject::lastChild):
1744         (WebCore::AccessibilityObject::previousSibling):
1745         (WebCore::AccessibilityObject::nextSibling):
1746         (WebCore::AccessibilityObject::parentObject):
1747         (WebCore::AccessibilityObject::layoutCount):
1748         (WebCore::AccessibilityObject::text):
1749         (WebCore::AccessibilityObject::helpText):
1750         (WebCore::AccessibilityObject::textUnderElement):
1751         (WebCore::AccessibilityObject::isARIAInput):
1752         (WebCore::AccessibilityObject::isARIAControl):
1753         (WebCore::AccessibilityObject::intValue):
1754         (WebCore::AccessibilityObject::stringValue):
1755         (WebCore::AccessibilityObject::title):
1756         (WebCore::AccessibilityObject::accessibilityDescription):
1757         (WebCore::AccessibilityObject::boundingBoxRect):
1758         (WebCore::AccessibilityObject::elementRect):
1759         (WebCore::AccessibilityObject::size):
1760         (WebCore::AccessibilityObject::linkedUIElement):
1761         (WebCore::AccessibilityObject::textLength):
1762         (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
1763         (WebCore::AccessibilityObject::selectedText):
1764         (WebCore::AccessibilityObject::accessKey):
1765         (WebCore::AccessibilityObject::selection):
1766         (WebCore::AccessibilityObject::selectedTextRange):
1767         (WebCore::AccessibilityObject::setSelectedTextRange):
1768         (WebCore::AccessibilityObject::url):
1769         (WebCore::AccessibilityObject::setFocused):
1770         (WebCore::AccessibilityObject::setValue):
1771         (WebCore::AccessibilityObject::axObjectCache):
1772         (WebCore::AccessibilityObject::getDocumentLinks):
1773         (WebCore::AccessibilityObject::widget):
1774         (WebCore::AccessibilityObject::widgetForAttachmentView):
1775         (WebCore::AccessibilityObject::anchorElement):
1776         (WebCore::AccessibilityObject::actionElement):
1777         (WebCore::AccessibilityObject::visiblePositionRange):
1778         (WebCore::AccessibilityObject::doAXTextMarkerRangeForLine):
1779         (WebCore::AccessibilityObject::visiblePositionForIndex):
1780         (WebCore::AccessibilityObject::indexForVisiblePosition):
1781         (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange):
1782         (WebCore::AccessibilityObject::doSetAXSelectedTextMarkerRange):
1783         (WebCore::AccessibilityObject::doAXTextMarkerForPosition):
1784         (WebCore::AccessibilityObject::textMarkerForIndex):
1785         (WebCore::AccessibilityObject::rangeForTextMarkerRange):
1786         (WebCore::AccessibilityObject::indexForTextMarker):
1787         (WebCore::AccessibilityObject::doAXRangeForLine):
1788         (WebCore::AccessibilityObject::doAXRangeForPosition):
1789         (WebCore::AccessibilityObject::doAXRangeForIndex):
1790         (WebCore::AccessibilityObject::doAXStyleRangeForIndex):
1791         (WebCore::AccessibilityObject::doAXStringForRange):
1792         (WebCore::AccessibilityObject::doAXBoundsForRange):
1793         (WebCore::AccessibilityObject::doAccessibilityHitTest):
1794         (WebCore::AccessibilityObject::focusedUIElement):
1795         (WebCore::AccessibilityObject::observableObject):
1796         (WebCore::AccessibilityObject::roleValue):
1797         (WebCore::AccessibilityObject::ariaRoleAttribute):
1798         (WebCore::AccessibilityObject::childrenChanged):
1799         (WebCore::AccessibilityObject::addChildren):
1800         (WebCore::AccessibilityObject::removeAXObjectID):
1801         * page/AccessibilityObject.h:
1802         (WebCore::):
1803         (WebCore::PlainTextRange::PlainTextRange):
1804         (WebCore::PlainTextRange::isNull):
1805         (WebCore::AccessibilityObject::isAccessibilityRenderObject):
1806         (WebCore::AccessibilityObject::isAnchor):
1807         (WebCore::AccessibilityObject::isAttachment):
1808         (WebCore::AccessibilityObject::isHeading):
1809         (WebCore::AccessibilityObject::isLink):
1810         (WebCore::AccessibilityObject::isImage):
1811         (WebCore::AccessibilityObject::isNativeImage):
1812         (WebCore::AccessibilityObject::isImageButton):
1813         (WebCore::AccessibilityObject::isPasswordField):
1814         (WebCore::AccessibilityObject::isTextControl):
1815         (WebCore::AccessibilityObject::isNativeTextControl):
1816         (WebCore::AccessibilityObject::isWebArea):
1817         (WebCore::AccessibilityObject::isCheckboxOrRadio):
1818         (WebCore::AccessibilityObject::isChecked):
1819         (WebCore::AccessibilityObject::isEnabled):
1820         (WebCore::AccessibilityObject::isSelected):
1821         (WebCore::AccessibilityObject::isFocused):
1822         (WebCore::AccessibilityObject::isHovered):
1823         (WebCore::AccessibilityObject::isIndeterminate):
1824         (WebCore::AccessibilityObject::isLoaded):
1825         (WebCore::AccessibilityObject::isMultiSelect):
1826         (WebCore::AccessibilityObject::isOffScreen):
1827         (WebCore::AccessibilityObject::isPressed):
1828         (WebCore::AccessibilityObject::isReadOnly):
1829         (WebCore::AccessibilityObject::isVisited):
1830         (WebCore::AccessibilityObject::canSetFocusAttribute):
1831         (WebCore::AccessibilityObject::canSetTextRangeAttributes):
1832         (WebCore::AccessibilityObject::canSetValueAttribute):
1833         (WebCore::AccessibilityObject::hasIntValue):
1834         (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
1835         (WebCore::AccessibilityObject::accessibilityIsIgnored):
1836         (WebCore::AccessibilityObject::children):
1837         (WebCore::AccessibilityObject::hasChildren):
1838         (WebCore::AccessibilityObject::setWrapper):
1839         (WebCore::AccessibilityObject::isDetached):
1840         * page/AccessibilityRenderObject.cpp: Added.
1841         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
1842         (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
1843         (WebCore::AccessibilityRenderObject::create):
1844         (WebCore::AccessibilityRenderObject::detach):
1845         (WebCore::AccessibilityRenderObject::firstChild):
1846         (WebCore::AccessibilityRenderObject::lastChild):
1847         (WebCore::AccessibilityRenderObject::previousSibling):
1848         (WebCore::AccessibilityRenderObject::nextSibling):
1849         (WebCore::AccessibilityRenderObject::parentObject):
1850         (WebCore::AccessibilityRenderObject::isWebArea):
1851         (WebCore::AccessibilityRenderObject::isImageButton):
1852         (WebCore::AccessibilityRenderObject::isAnchor):
1853         (WebCore::AccessibilityRenderObject::isNativeTextControl):
1854         (WebCore::AccessibilityRenderObject::isTextControl):
1855         (WebCore::AccessibilityRenderObject::isNativeImage):
1856         (WebCore::AccessibilityRenderObject::isImage):
1857         (WebCore::AccessibilityRenderObject::isAttachment):
1858         (WebCore::AccessibilityRenderObject::isPasswordField):
1859         (WebCore::AccessibilityRenderObject::isCheckboxOrRadio):
1860         (WebCore::AccessibilityRenderObject::isPressed):
1861         (WebCore::AccessibilityRenderObject::isIndeterminate):
1862         (WebCore::AccessibilityRenderObject::isChecked):
1863         (WebCore::AccessibilityRenderObject::isHovered):
1864         (WebCore::AccessibilityRenderObject::isMultiSelect):
1865         (WebCore::AccessibilityRenderObject::isReadOnly):
1866         (WebCore::AccessibilityRenderObject::isOffScreen):
1867         (WebCore::AccessibilityRenderObject::headingLevel):
1868         (WebCore::AccessibilityRenderObject::isHeading):
1869         (WebCore::AccessibilityRenderObject::isLink):
1870         (WebCore::AccessibilityRenderObject::anchorElement):
1871         (WebCore::AccessibilityRenderObject::actionElement):
1872         (WebCore::AccessibilityRenderObject::mouseButtonListener):
1873         (WebCore::AccessibilityRenderObject::helpText):
1874         (WebCore::AccessibilityRenderObject::textUnderElement):
1875         (WebCore::AccessibilityRenderObject::hasIntValue):
1876         (WebCore::AccessibilityRenderObject::intValue):
1877         (WebCore::AccessibilityRenderObject::stringValue):
1878         (WebCore::labelForElement):
1879         (WebCore::AccessibilityRenderObject::title):
1880         (WebCore::AccessibilityRenderObject::accessibilityDescription):
1881         (WebCore::AccessibilityRenderObject::boundingBoxRect):
1882         (WebCore::AccessibilityRenderObject::elementRect):
1883         (WebCore::AccessibilityRenderObject::size):
1884         (WebCore::AccessibilityRenderObject::linkedUIElement):
1885         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
1886         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1887         (WebCore::AccessibilityRenderObject::isLoaded):
1888         (WebCore::AccessibilityRenderObject::layoutCount):
1889         (WebCore::AccessibilityRenderObject::text):
1890         (WebCore::AccessibilityRenderObject::textLength):
1891         (WebCore::AccessibilityRenderObject::ariaSelectedTextDOMRange):
1892         (WebCore::AccessibilityRenderObject::selectedText):
1893         (WebCore::AccessibilityRenderObject::accessKey):
1894         (WebCore::AccessibilityRenderObject::selection):
1895         (WebCore::AccessibilityRenderObject::selectedTextRange):
1896         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
1897         (WebCore::AccessibilityRenderObject::url):
1898         (WebCore::AccessibilityRenderObject::isVisited):
1899         (WebCore::AccessibilityRenderObject::isSelected):
1900         (WebCore::AccessibilityRenderObject::isFocused):
1901         (WebCore::AccessibilityRenderObject::setFocused):
1902         (WebCore::AccessibilityRenderObject::setValue):
1903         (WebCore::AccessibilityRenderObject::isEnabled):
1904         (WebCore::AccessibilityRenderObject::topRenderer):
1905         (WebCore::AccessibilityRenderObject::widget):
1906         (WebCore::AccessibilityRenderObject::axObjectCache):
1907         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1908         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
1909         (WebCore::AccessibilityRenderObject::frameViewIfRenderView):
1910         (WebCore::AccessibilityRenderObject::visiblePositionRange):
1911         (WebCore::AccessibilityRenderObject::doAXTextMarkerRangeForLine):
1912         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
1913         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
1914         (WebCore::AccessibilityRenderObject::doAXBoundsForTextMarkerRange):
1915         (WebCore::AccessibilityRenderObject::doSetAXSelectedTextMarkerRange):
1916         (WebCore::AccessibilityRenderObject::doAXTextMarkerForPosition):
1917         (WebCore::AccessibilityRenderObject::textMarkerForIndex):
1918         (WebCore::AccessibilityRenderObject::indexForTextMarker):
1919         (WebCore::AccessibilityRenderObject::doAXRangeForLine):
1920         (WebCore::AccessibilityRenderObject::doAXRangeForIndex):
1921         (WebCore::AccessibilityRenderObject::doAXStringForRange):
1922         (WebCore::AccessibilityRenderObject::doAXBoundsForRange):
1923         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
1924         (WebCore::AccessibilityRenderObject::focusedUIElement):
1925         (WebCore::AccessibilityRenderObject::observableObject):
1926         (WebCore::createARIARoleMap):
1927         (WebCore::RoleEntry::):
1928         (WebCore::ariaRoleToWebCoreRole):
1929         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
1930         (WebCore::AccessibilityRenderObject::roleValue):
1931         (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
1932         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
1933         (WebCore::AccessibilityRenderObject::canSetTextRangeAttributes):
1934         (WebCore::AccessibilityRenderObject::childrenChanged):
1935         (WebCore::AccessibilityRenderObject::children):
1936         (WebCore::AccessibilityRenderObject::addChildren):
1937         (WebCore::AccessibilityRenderObject::removeAXObjectID):
1938         (WebCore::AccessibilityRenderObject::actionVerb):
1939         * page/AccessibilityRenderObject.h: Added.
1940         (WebCore::AccessibilityRenderObject::isAccessibilityRenderObject):
1941         (WebCore::AccessibilityRenderObject::areaElement):
1942         (WebCore::AccessibilityRenderObject::setRenderer):
1943         (WebCore::AccessibilityRenderObject::renderer):
1944         (WebCore::AccessibilityRenderObject::setRenderObject):
1945         (WebCore::AccessibilityRenderObject::isDetached):
1946         * page/mac/AXObjectCacheMac.mm:
1947         (WebCore::AXObjectCache::detachWrapper):
1948         (WebCore::AXObjectCache::selectedChildrenChanged):
1949         (WebCore::AXObjectCache::postNotification):
1950         * page/mac/AccessibilityObjectWrapper.mm:
1951         (textMarkerForVisiblePosition):
1952         (CreateCGColorIfDifferent):
1953         (AXAttributeStringSetHeadingLevel):
1954         (AXLinkElementForNode):
1955         (AXAttributeStringSetElement):
1956         (AXAttributedStringAppendText):
1957         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1958         (-[AccessibilityObjectWrapper documentFrameView:]):
1959         (-[AccessibilityObjectWrapper position]):
1960         (RoleEntry::):
1961         (-[AccessibilityObjectWrapper roleDescription]):
1962         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1963         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1964         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1965         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1966         (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]):
1967         (-[AccessibilityObjectWrapper doAXAttributedStringForRange:]):
1968         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1969
1970 2008-05-06  Jonathan Haas  <myrdred@gmail.com>
1971
1972         Reviewed by Rob Buis.
1973
1974         https://bugs.webkit.org/show_bug.cgi?id=18859\
1975         Prevented SVGRootInlineBox from static_casting a
1976         node to a class it doesn't inherit
1977         
1978         * rendering/SVGRootInlineBox.cpp:
1979         (WebCore::SVGRootInlineBox::buildTextChunks):
1980
1981 2008-05-06  Brady Eidson  <beidson@apple.com>
1982
1983         Reviewed by Darin Adler
1984
1985         Preparation for upcoming work making LocalStorage persistent.
1986
1987         When the application terminates, all pending local storage writes need to be
1988         sync'ed out to disk.
1989         This works n combination with platform specific code in WebKit that calls it.
1990
1991         * WebCore.base.exp:
1992
1993         * page/PageGroup.cpp:
1994         (WebCore::PageGroup::closeLocalStorage): Close all open LocalStorage objects
1995         * page/PageGroup.h:
1996
1997         * storage/LocalStorage.cpp:
1998         (WebCore::LocalStorage::close): Placeholder for what will sync and terminate the
1999           local storage thread in the future.
2000         * storage/LocalStorage.h:
2001
2002 2008-05-06  Brady Eidson  <beidson@apple.com>
2003
2004         Rubberstamped by David Kilzer
2005
2006         * WebCore.base.exp:  Sort this mess!
2007
2008 2008-05-05  Mark Rowe  <mrowe@apple.com>
2009
2010         Reviewed by Dan Bernstein.
2011
2012         Fix 60 crashes seen on the buildbots that were misreported as hangs.
2013
2014         * dom/Document.cpp:
2015         (WebCore::Document::detachNodeIterator): Null-check page() before dereferencing it.
2016         (WebCore::Document::nodeWillBeRemoved): Ditto.
2017         (WebCore::Document::textInserted): Ditto.
2018         (WebCore::Document::textNodesMerged): Ditto.
2019         (WebCore::Document::textRemoved): Ditto.
2020
2021 2008-05-05  Brady Eidson  <beidson@apple.com>
2022
2023         Reviewed by Mitz Pettel RTL
2024
2025         Preparation for upcoming work making LocalStorage persistent.
2026
2027         The other half of the StorageMap::importItem() addition.
2028
2029         * storage/StorageArea.cpp:
2030         (WebCore::StorageArea::importItem):
2031         * storage/StorageArea.h:
2032
2033 2008-05-05  Brady Eidson  <beidson@apple.com>
2034
2035         Reviewed by Mitz Pettel RTL
2036
2037         Preparation for upcoming work making LocalStorage persistent.
2038
2039         - Create the LocalStorage object for a PageGroup the moment the first Page is added to it
2040           The Settings of the first Page define what persistent path the LocalStorage will use
2041         - Add a Frame argument for the LocalStorageArea request - this will allow a client object
2042           to be queried before the LocalStorageArea is established
2043
2044         * page/DOMWindow.cpp:
2045         (WebCore::DOMWindow::localStorage):
2046
2047         * page/PageGroup.cpp:
2048         (WebCore::PageGroup::addPage):
2049         (WebCore::PageGroup::localStorage):
2050
2051         * storage/LocalStorage.cpp:
2052         (WebCore::LocalStorage::LocalStorage): Take the path as a constructor argument.  Deep copy
2053           the path as it will be used from another thread.
2054         (WebCore::LocalStorage::storageArea):
2055         * storage/LocalStorage.h:
2056         (WebCore::LocalStorage::create):
2057
2058 2008-05-05  Brady Eidson  <beidson@apple.com>
2059
2060         Reviewed by Mitz Pettel RTL
2061
2062         Preparation for upcoming work making LocalStorage persistent.
2063
2064         StorageMaps normally have copy-on-write semantics to help support SessionStorage.
2065         For LocalStorage, we never want this behavior.  When we forcefully import items into 
2066         a StorageMap from the LocalStorage background thread, this new import method will be used.
2067
2068         * storage/StorageMap.cpp:
2069         (WebCore::StorageMap::importItem): Add a deep-copy of the item to the map without worrying
2070           about copy-on-write.
2071         * storage/StorageMap.h:
2072
2073 2008-05-05  Kevin McCullough  <kmccullough@apple.com>
2074
2075         Reviewed by Tim.
2076
2077         -<rdar://problem/5770054> JavaScript profiler (10928)
2078         -Begininings of a UI for the Profiler in the WebInspector.
2079
2080         * English.lproj/InspectorLocalizedStrings.js: Add new strings to be
2081         localized.
2082         * page/inspector/DatabasesPanel.js: Changed the name of the Databae's
2083         results table to be more generic as it is now also used by the profiler.
2084         * page/inspector/Images/glossySelected.png: Added.
2085         * page/inspector/Images/profilesIcon.png: Added.
2086         * page/inspector/Images/treeUpTriangleBlack.png: Added.
2087         * page/inspector/Images/treeUpTriangleWhite.png: Added.
2088         * page/inspector/ProfileView.js: Added. Sets up the header of the table.
2089         * page/inspector/ProfilesPanel.js: Added.
2090         * page/inspector/ProfilesPanel.js: Added. Sets up the containers of the
2091         profiler's content.
2092         * page/inspector/inspector.css: Change database-result-table to be more
2093         generic as well as add the styles needed by the profiler.
2094         * page/inspector/inspector.html: Add profiler support.
2095
2096 2008-05-05  Brady Eidson  <beidson@apple.com>
2097
2098         Change by Darin, reviewed by Brady
2099
2100         Small efficiency improvement Darin just spotted
2101
2102         * storage/StorageMap.cpp:
2103         (WebCore::StorageMap::setItem):
2104
2105 2008-05-05  Antti Koivisto  <antti@apple.com>
2106
2107         Reviewed by Anders.
2108
2109         Fix https://bugs.webkit.org/show_bug.cgi?id=18899
2110         Bug 18899: REGRESSION (r32871): Non-Safari crash in WTF::HashTable on startup
2111
2112         * loader/loader.cpp:
2113         (WebCore::Loader::Loader):
2114
2115 2008-05-05  Brady Eidson  <beidson@apple.com>
2116
2117         Reviewed by Sam Weinig
2118
2119         Fix a bug in StorageMap iterator tracking where the iterator was not successfully
2120         invalidated at an appropriate time.
2121
2122         * storage/StorageMap.cpp:
2123         (WebCore::StorageMap::setItem): ALWAYS invalidate it here
2124
2125 2008-05-05  Justin Garcia  <justin.garcia@apple.com>
2126
2127         Reviewed by Darin.
2128
2129         <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end
2130         
2131         Disable Range mutation on document modifications in Tiger and Leopard Mail,
2132         since they do their own mutation which interferes with ours.
2133
2134         * WebCore.base.exp:
2135         * dom/Document.cpp:
2136         (WebCore::Document::nodeChildrenChanged):
2137         (WebCore::Document::nodeWillBeRemoved):
2138         (WebCore::Document::textInserted):
2139         (WebCore::Document::textRemoved):
2140         (WebCore::Document::textNodesMerged):
2141         (WebCore::Document::textNodeSplit):
2142         * page/Settings.cpp:
2143         (WebCore::Settings::Settings):
2144         (WebCore::Settings::disableRangeMutationForOldAppleMail):
2145         * page/Settings.h:
2146         (WebCore::Settings::rangeMutationDisabledForOldAppleMail):
2147
2148 2008-05-05  Sam Weinig  <sam@webkit.org>
2149
2150         Reviewed by Tim Hatcher.
2151
2152         Make the Inspector's localizable strings file match the format used by Dashboard widgets.
2153
2154         * English.lproj/InspectorLocalizedStrings.js: Removed.
2155         * English.lproj/localizedStrings.js: Added.
2156         * WebCore.vcproj/WebCore.vcproj:
2157         * WebCore.xcodeproj/project.pbxproj:
2158         * page/inspector/inspector.js:
2159
2160 2008-05-05  Steve Falkenburg  <sfalken@apple.com>
2161
2162         Add support for default button appearance.
2163         Add WebCore setting for app chrome mode.
2164         
2165         Reviewed by Dave Hyatt.
2166
2167         * css/CSSPrimitiveValueMappings.h:
2168         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2169         * css/CSSValueKeywords.in: Added default-button value keyword.
2170         * page/Settings.cpp:
2171         (WebCore::Settings::Settings):
2172         (WebCore::Settings::setApplicationChromeMode):
2173         * page/Settings.h:
2174         (WebCore::Settings::inApplicationChromeMode):
2175         * rendering/RenderButton.cpp:
2176         (WebCore::RenderButton::RenderButton):
2177         (WebCore::RenderButton::setStyle):
2178         (WebCore::RenderButton::timerFired):
2179         * rendering/RenderButton.h:
2180         * rendering/RenderStyle.h:
2181         (WebCore::):
2182         * rendering/RenderTheme.cpp:
2183         (WebCore::RenderTheme::adjustStyle):
2184         (WebCore::RenderTheme::paint):
2185         (WebCore::RenderTheme::paintBorderOnly):
2186         (WebCore::RenderTheme::paintDecorations):
2187         (WebCore::RenderTheme::isControlStyled):
2188         (WebCore::RenderTheme::isDefault):
2189         * rendering/RenderTheme.h:
2190         (WebCore::):
2191         * rendering/RenderThemeSafari.cpp:
2192         (WebCore::RenderThemeSafari::determineState):
2193         (WebCore::RenderThemeSafari::adjustRepaintRect):
2194         (WebCore::RenderThemeSafari::adjustButtonStyle):
2195         * rendering/RenderThemeWin.cpp:
2196         (WebCore::RenderThemeWin::supportsFocus):
2197
2198 2008-05-05  Alexey Proskuryakov  <ap@webkit.org>
2199
2200         Reviewed by Darin.
2201
2202         https://bugs.webkit.org/show_bug.cgi?id=11947
2203         nbsps should be converted to entities in innerHTML
2204
2205         https://bugs.webkit.org/show_bug.cgi?id=18769
2206         replacing &nbsp; with spaces using regexp creates inconsistent result
2207
2208         Tests: fast/dom/innerHTML-nbsp.html
2209                fast/dom/innerHTML-escaping-attribute.html
2210
2211         * editing/markup.cpp:
2212         (WebCore::appendAttributeValue):
2213         (WebCore::escapeContentText):
2214         (WebCore::appendEscapedContent):
2215         Added U+00a0/nbsp to the list of characters to escape.
2216
2217 2008-05-05  David Hyatt  <hyatt@apple.com>
2218
2219         Fix for https://bugs.webkit.org/show_bug.cgi?id=18821.  Fix some bugs in both get/PutImageData of <canvas>.
2220
2221         Reviewed by Eric
2222
2223         New tests added in fast/canvas/
2224
2225         * platform/graphics/cg/ImageBufferCG.cpp:
2226         (WebCore::ImageBuffer::getImageData):
2227         (WebCore::ImageBuffer::putImageData):
2228
2229 2008-05-05  Dan Bernstein  <mitz@apple.com>
2230
2231         Reviewed by Dave Hyatt.
2232
2233         - fix https://bugs.webkit.org/show_bug.cgi?id=18809
2234           Forms with block level generated content and absolutely positioned labels break inline layout (fixed on reflow)
2235
2236         Test: fast/block/basic/adding-near-anonymous-block.html
2237
2238         * rendering/RenderBlock.cpp:
2239         (WebCore::RenderBlock::addChildToFlow): When adding a floating or
2240         positioned object, if it follows an anonymous block, put it
2241         inside the anonymous block. When adding an inline, check if it comes
2242         after an anonymous block and put it in the anonymous block.
2243
2244 2008-05-05  Antti Koivisto  <antti@apple.com>
2245
2246         Reviewed by Darin.
2247
2248         Speculative fix for <rdar://problem/5906790> 
2249         Crash in Loader::servePendingRequests() due to hash table being modified during iteration
2250         
2251         I don't know how to reproduce this. It would require the load to fail (or succeed)
2252         synchronously, something that should not usually happen.
2253
2254         * loader/loader.cpp:
2255         (WebCore::Loader::Loader):
2256         (WebCore::Loader::load):
2257         (WebCore::Loader::servePendingRequests):
2258         (WebCore::Loader::cancelRequests):
2259         (WebCore::Loader::Host::Host):
2260         * loader/loader.h:
2261         (WebCore::Loader::Host::name):
2262
2263 2008-05-05  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2264
2265         Reviewed by Simon.
2266
2267         Disable SVG As Image support in the Qt port again, as it
2268         requires more work. Right now the chrome client is
2269         assumed to be a ChromeClientQt, which the SVG Image support
2270         changes.
2271
2272         * WebCore.pro:
2273
2274 2008-05-02  Antti Koivisto  <antti@apple.com>
2275
2276         Reviewed by Mitz.
2277
2278         Fix <rdar://problem/5840475>
2279         CrashTracer: [USER] 2 crashes in Safari at com.apple.WebCore: WebCore::RenderBlock::insertPositionedObject
2280         
2281         Non-block objects can have transforms so containingBlock() could end up returning null. 
2282         RenderObject::container() needs to match.
2283
2284         Test: fast/transforms/container-transform-crash.html
2285
2286         * rendering/RenderObject.cpp:
2287         (WebCore::RenderObject::containingBlock):
2288         (WebCore::RenderObject::container):
2289
2290 2008-05-04  Sam Weinig  <sam@webkit.org>
2291
2292         Roll out r32851.  It broke tiger builds.
2293
2294         * bindings/objc/DOMUtility.mm:
2295         (KJS::createDOMWrapper):
2296         (WebCore::createDOMWrapper):
2297
2298 2008-05-04  Dan Bernstein  <mitz@apple.com>
2299
2300         Reviewed by Sam Weinig.
2301
2302         - fix https://bugs.webkit.org/show_bug.cgi?id=18879
2303           <rdar://problem/5909481> Reproducible crash when removing a gradient
2304
2305         Test: fast/gradients/crash-on-remove.html
2306
2307         * css/CSSImageGeneratorValue.cpp:
2308         (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
2309         (WebCore::CSSImageGeneratorValue::addClient): Added a call to ref() the
2310         value.
2311         (WebCore::CSSImageGeneratorValue::removeClient): Added code to deref()
2312         the value.
2313
2314 2008-05-03  Sam Weinig  <sam@webkit.org>
2315
2316         Reviewed by Mark Rowe.
2317
2318         Move createDOMWrapper(JSObject* object) out of the KJS namespace and into
2319         the WebCore namespace now that the required compilers don't freak out about
2320         this anymore.
2321
2322         * bindings/objc/DOMUtility.mm:
2323         (WebCore::createDOMWrapper):
2324
2325 2008-05-03  Rob Buis  <buis@kde.org>
2326
2327         Reviewed by Sam.
2328
2329         https://bugs.webkit.org/show_bug.cgi?id=18652
2330         onchange events don't seem to fire for input[type=range] controls.
2331
2332         Fire changeEvent when clicking the slider outside the current
2333         thumb position.
2334
2335         * rendering/RenderSlider.cpp:
2336         (WebCore::RenderSlider::setValueForPosition):
2337
2338 2008-05-03  Sam Weinig  <sam@webkit.org>
2339
2340         Reviewed by Mark Rowe.
2341
2342         Remove unused enums from JSDOMWindowBase.
2343
2344         * bindings/js/JSDOMWindowBase.h:
2345         (WebCore::JSDOMWindowBase::):
2346
2347 2008-05-03  Sam Weinig  <sam@webkit.org>
2348
2349         Real build fix.
2350
2351         * WebCore.xcodeproj/project.pbxproj:
2352
2353 2008-05-03  Sam Weinig  <sam@webkit.org>
2354
2355         Build fix.
2356
2357         * bindings/js/kjs_events.cpp:
2358         (WebCore::JSAbstractEventListener::handleEvent):
2359
2360 2008-05-03  Sam Weinig  <sam@webkit.org>
2361
2362         Rubber-stamped by Geoffrey Garen.
2363
2364         Rename JSDOMWindowWrapper to JSDOMWindowShell.
2365
2366 2008-05-01  Rob Buis  <buis@kde.org>
2367
2368         Reviewed by Eric.
2369
2370         https://bugs.webkit.org/show_bug.cgi?id=18568
2371         background: currentColor fails
2372
2373         Implement currentColor from CSS3 color module.
2374
2375         Tests: fast/css/background-currentcolor.html
2376
2377         * css/CSSParser.cpp:
2378         (WebCore::CSSParser::parseValue):
2379         (WebCore::CSSParser::parseBackgroundColor):
2380         * css/CSSStyleSelector.cpp:
2381         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
2382         * css/CSSValueKeywords.in:
2383         * css/SVGCSSValueKeywords.in:
2384
2385 2008-05-02  Anders Carlsson  <andersca@apple.com>
2386
2387         Reviewed by Mark.
2388
2389         Turns out calling locationInWindow on keyboard events will not throw an exception,
2390         but the point returned is completely bogus, so remove coordinates from the keyboard event struct.
2391         
2392         * bridge/npapi.h:
2393         (_NPCocoaEvent::):
2394
2395 2008-05-02  Benjamin Otte  <otte@gnome.org>
2396
2397         Reviewed by Alp Toker.
2398
2399         http://bugs.webkit.org/show_bug.cgi?id=18856
2400         [GTK] variable initialization missing
2401
2402         Not initializing the m_needsXEmbed variable could have very funny
2403         results. Most often those results would be crashes.
2404
2405         * plugins/PluginView.cpp:
2406         (WebCore::PluginView::PluginView):
2407
2408 2008-05-02  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2409
2410         Reviewed by Eric.
2411
2412         https://bugs.webkit.org/show_bug.cgi?id=18811
2413         Enable dashboard and offline web apps in autotools
2414
2415         * GNUmakefile.am:
2416
2417 2008-05-02  Anders Carlsson  <andersca@apple.com>
2418
2419         Reviewed by Sam.
2420
2421         Name the event union so it will work in plain C.
2422
2423         * bridge/npapi.h:
2424         (_NPCocoaEvent::):
2425
2426 2008-05-02  Dan Bernstein  <mitz@apple.com>
2427
2428         Reviewed by John Sullivan.
2429
2430         - render text shadows with zero offset, as the shadow can be seen behind
2431           the text if the text is translucent
2432
2433         Test: fast/text/shadow-no-blur.html
2434
2435         * platform/graphics/mac/FontMac.mm:
2436         (WebCore::Font::drawComplexText): Removed the isEmpty() condition on the
2437         shadow offset. Since isEmpty() is also true for sizes that have one or
2438         more non-positive components, this also ensures that subpixel
2439         antialiasing of the text is maintained with shadows in all directions.
2440         (WebCore::Font::drawGlyphs): Ditto.
2441         * platform/graphics/win/FontCGWin.cpp:
2442         (WebCore::Font::drawGlyphs): Ditto.
2443
2444 2008-05-02  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2445
2446         Reviewed by Simon.
2447
2448         Build the Qt port with SVG Use and As Image support.
2449
2450         * WebCore.pro:
2451
2452 2008-05-02  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2453
2454         Reviewed by Simon.
2455
2456         Fixed potential crash on SVG animation (added more checks to the assert).
2457
2458         * svg/SVGUseElement.cpp:
2459         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2460
2461 2008-05-02  Alexey Proskuryakov  <ap@webkit.org>
2462
2463         Rubber-stamped by John Sullivan.
2464
2465         Fix a debug-only crash in layout tests.
2466
2467         * loader/CachedResource.cpp:
2468         (WebCore::CachedResource::~CachedResource): Don't call resourceForURL() for null URLs.
2469
2470 2008-05-02  Simon Hausmann  <shausman@trolltech.com>
2471
2472         Fix the Qt build on Windows when Phonon is enabled for Audio/Video support
2473
2474         * WebCore.pro: Don't use QT += phonon as it prepends the phonon
2475         includes to the include paths. Instead add it manually and make sure
2476         phonon comes last, to avoid the conflict of phonon's path.h with
2477         WebCore's Path.h on case-insensitive filesystems.
2478
2479 2008-05-02  Simon Hausmann  <hausmann@webkit.org>
2480
2481         Fix the Qt build. Add ExecState where necessary.
2482
2483         * bridge/qt/qt_class.cpp:
2484         (KJS::Bindings::QtClass::fallbackObject):
2485         * bridge/qt/qt_instance.cpp:
2486         (KJS::Bindings::QtRuntimeObjectImp::construct):
2487         (KJS::Bindings::QtInstance::getRuntimeObject):
2488         (KJS::Bindings::QtInstance::invokeDefaultMethod):
2489         (KJS::Bindings::QtInstance::defaultValue):
2490         (KJS::Bindings::QtInstance::stringValue):
2491         * bridge/qt/qt_instance.h:
2492         (KJS::Bindings::QtInstance::getObject):
2493         * bridge/qt/qt_runtime.cpp:
2494         (KJS::Bindings::convertValueToQVariant):
2495         (KJS::Bindings::convertQVariantToValue):
2496         (KJS::Bindings::QtRuntimeMetaMethod::lengthGetter):
2497         (KJS::Bindings::QtRuntimeMetaMethod::connectGetter):
2498         (KJS::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2499         (KJS::Bindings::QtRuntimeConnectionMethod::lengthGetter):
2500         (KJS::Bindings::QtConnectionObject::execute):
2501         * bridge/runtime.cpp:
2502         (KJS::Bindings::Instance::createRuntimeObject):
2503
2504 2008-05-02  Simon Hausmann  <shausman@trolltech.com>
2505
2506         Fix the Qt/Win build.
2507
2508         * WebCore.pro:
2509         * platform/qt/TemporaryLinkStubs.cpp:
2510         (PluginDatabase::getPluginPathsInDirectories):
2511         (PluginDatabase::defaultPluginDirectories):
2512         (PluginDatabase::isPreferredPluginDirectory):
2513         (PluginView::setNPWindowRect):
2514         (PluginView::userAgent):
2515         (PluginView::invalidateRect):
2516         (PluginView::invalidateRegion):
2517         (PluginView::forceRedraw):
2518         (PluginView::setFocus):
2519         (PluginView::show):
2520         (PluginView::hide):
2521         (PluginView::paint):
2522         (PluginView::setParent):
2523         (PluginView::attachToWindow):
2524         (PluginView::detachFromWindow):
2525         (PluginView::updateWindow):
2526         (PluginView::handleKeyboardEvent):
2527         (PluginView::handleMouseEvent):
2528         (PluginView::handlePostReadFile):
2529         (PluginView::getValue):
2530         * plugins/qt/PluginPackageQt.cpp:
2531         (WebCore::PluginPackage::load):
2532
2533 2008-05-02  Alexey Proskuryakov  <ap@webkit.org>
2534
2535         Reviewed by Geoffrey Garen.
2536
2537         https://bugs.webkit.org/show_bug.cgi?id=18826
2538         Make JavaScript heap per-thread
2539
2540         This is mostly adaptation for JSC changes. The most prominent one is that JSObject
2541         allocator now takes ExecState, e.g. "new (exec) JSXMLHttpRequestConstructor(...)". It is
2542         OK to pass either the current or global one, whichever is faster to get hold of, as both
2543         have the same reference to a per-thread JS heap.
2544
2545         * bindings/scripts/CodeGeneratorJS.pm: Pass ExecState to functions that now need it.
2546         JSDOMWindow, JSDOMWindowPrototype and JSDOMWindowWrapper are special, because they are
2547         constructed before any ExecState comes into existence, so they use Heap::threadHeap()
2548         directly for allocation.
2549
2550         * bindings/js/JSDOMWindowWrapper.cpp:
2551         (WebCore::JSDOMWindowWrapper::operator new):
2552         * bindings/js/JSDOMWindowWrapper.h:
2553         Added a custom operator new to use per-thread heap when there's no ExecState around.
2554
2555         * bindings/js/JSAudioConstructor.cpp:
2556         (WebCore::JSAudioConstructor::JSAudioConstructor):
2557         * bindings/js/JSCSSRuleCustom.cpp:
2558         (WebCore::toJS):
2559         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2560         (WebCore::JSCSSStyleDeclaration::nameGetter):
2561         * bindings/js/JSCSSValueCustom.cpp:
2562         (WebCore::toJS):
2563         * bindings/js/JSCanvasPixelArrayCustom.cpp:
2564         (WebCore::JSCanvasPixelArray::indexGetter):
2565         (WebCore::toJS):
2566         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2567         (WebCore::toJS):
2568         * bindings/js/JSClipboardCustom.cpp:
2569         (WebCore::JSClipboard::types):
2570         (WebCore::JSClipboard::getData):
2571         * bindings/js/JSCustomXPathNSResolver.cpp:
2572         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2573         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2574         (WebCore::JSDOMApplicationCache::addEventListener):
2575         (WebCore::JSDOMApplicationCache::removeEventListener):
2576         (WebCore::JSDOMApplicationCache::setOnchecking):
2577         (WebCore::JSDOMApplicationCache::setOnerror):
2578         (WebCore::JSDOMApplicationCache::setOnnoupdate):
2579         (WebCore::JSDOMApplicationCache::setOndownloading):
2580         (WebCore::JSDOMApplicationCache::setOnprogress):
2581         (WebCore::JSDOMApplicationCache::setOnupdateready):
2582         (WebCore::JSDOMApplicationCache::setOncached):
2583         * bindings/js/JSDOMWindowBase.cpp:
2584         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2585         (WebCore::JSDOMWindowBase::getValueProperty):
2586         (WebCore::JSDOMWindowBase::setListener):
2587         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
2588         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
2589         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
2590         (WebCore::windowProtoFuncAToB):
2591         (WebCore::windowProtoFuncBToA):
2592         (WebCore::windowProtoFuncSetTimeout):
2593         (WebCore::windowProtoFuncSetInterval):
2594         (WebCore::windowProtoFuncAddEventListener):
2595         * bindings/js/JSDOMWindowBase.h:
2596         * bindings/js/JSDocumentCustom.cpp:
2597         (WebCore::toJS):
2598         * bindings/js/JSEventCustom.cpp:
2599         (WebCore::toJS):
2600         * bindings/js/JSEventTargetBase.cpp:
2601         (WebCore::jsEventTargetAddEventListener):
2602         * bindings/js/JSEventTargetBase.h:
2603         (WebCore::JSEventTargetPrototype::self):
2604         * bindings/js/JSEventTargetNode.cpp:
2605         (WebCore::JSEventTargetNode::setListener):
2606         * bindings/js/JSHTMLCollectionCustom.cpp:
2607         (WebCore::getNamedItems):
2608         (WebCore::toJS):
2609         * bindings/js/JSHTMLElementWrapperFactory.cpp:
2610         (WebCore::createJSHTMLWrapper):
2611         * bindings/js/JSHTMLFormElementCustom.cpp:
2612         (WebCore::JSHTMLFormElement::nameGetter):
2613         * bindings/js/JSHTMLInputElementBase.cpp:
2614         (WebCore::JSHTMLInputElementBase::getValueProperty):
2615         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2616         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
2617         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2618         (WebCore::JSHTMLOptionsCollection::length):
2619         * bindings/js/JSInspectedObjectWrapper.cpp:
2620         (WebCore::JSInspectedObjectWrapper::wrap):
2621         * bindings/js/JSInspectorCallbackWrapper.cpp:
2622         (WebCore::JSInspectorCallbackWrapper::wrap):
2623         * bindings/js/JSLocationCustom.cpp:
2624         (WebCore::JSLocation::toString):
2625         * bindings/js/JSNamedNodesCollection.cpp:
2626         (WebCore::JSNamedNodesCollection::lengthGetter):
2627         * bindings/js/JSNavigatorCustom.cpp:
2628         (WebCore::JSNavigator::appVersion):
2629         * bindings/js/JSNodeCustom.cpp:
2630         (WebCore::toJS):
2631         * bindings/js/JSNodeFilterCustom.cpp:
2632         (WebCore::JSNodeFilter::acceptNode):
2633         * bindings/js/JSRGBColor.cpp:
2634         (WebCore::getJSRGBColor):
2635         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2636         (WebCore::JSSQLResultSetRowList::item):
2637         * bindings/js/JSSVGElementWrapperFactory.cpp:
2638         (WebCore::createJSSVGWrapper):
2639         * bindings/js/JSSVGLazyEventListener.cpp:
2640         (WebCore::JSSVGLazyEventListener::eventParameterName):
2641         * bindings/js/JSStorageCustom.cpp:
2642         (WebCore::JSStorage::nameGetter):
2643         * bindings/js/JSStyleSheetCustom.cpp:
2644         (WebCore::toJS):
2645         * bindings/js/JSXMLHttpRequestConstructor.cpp:
2646         (WebCore::JSXMLHttpRequestConstructor::construct):
2647         * bindings/js/JSXMLHttpRequestCustom.cpp:
2648         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
2649         (WebCore::JSXMLHttpRequest::setOnload):
2650         (WebCore::JSXMLHttpRequest::setOnprogress):
2651         (WebCore::JSXMLHttpRequest::getResponseHeader):
2652         (WebCore::JSXMLHttpRequest::addEventListener):
2653         (WebCore::JSXMLHttpRequest::removeEventListener):
2654         * bindings/js/JSXSLTProcessor.cpp:
2655         (WebCore::jsXSLTProcessorPrototypeFunctionGetParameter):
2656         (WebCore::JSXSLTProcessorConstructor::construct):
2657         * bindings/js/kjs_binding.cpp:
2658         (WebCore::jsStringOrNull):
2659         (WebCore::jsOwnedStringOrNull):
2660         (WebCore::jsStringOrUndefined):
2661         (WebCore::jsStringOrFalse):
2662         (WebCore::nonCachingStaticFunctionGetter):
2663         (WebCore::objectToStringFunctionGetter):
2664         * bindings/js/kjs_binding.h:
2665         (WebCore::DOMObject::DOMObject):
2666         (WebCore::cacheDOMObject):
2667         (WebCore::cacheSVGDOMObject):
2668         * bindings/js/kjs_events.cpp:
2669         (WebCore::JSLazyEventListener::eventParameterName):
2670         (WebCore::JSLazyEventListener::parseCode):
2671         * bindings/js/kjs_html.cpp:
2672         (WebCore::getRuntimeObject):
2673         * bridge/c/c_instance.cpp:
2674         (KJS::Bindings::CInstance::defaultValue):
2675         (KJS::Bindings::CInstance::stringValue):
2676         (KJS::Bindings::CInstance::numberValue):
2677         (KJS::Bindings::CInstance::valueOf):
2678         * bridge/c/c_instance.h:
2679         * bridge/c/c_utility.cpp:
2680         (KJS::Bindings::convertNPVariantToValue):
2681         * bridge/jni/jni_instance.cpp:
2682         (JavaInstance::stringValue):
2683         (JavaInstance::numberValue):
2684         (JavaInstance::invokeMethod):
2685         (JavaInstance::defaultValue):
2686         (JavaInstance::valueOf):
2687         * bridge/jni/jni_instance.h:
2688         * bridge/jni/jni_jsobject.h:
2689         * bridge/jni/jni_jsobject.mm:
2690         (JavaJSObject::call):
2691         (JavaJSObject::setMember):
2692         (JavaJSObject::setSlot):
2693         (JavaJSObject::convertJObjectToValue):
2694         (JavaJSObject::getListFromJArray):
2695         * bridge/jni/jni_objc.mm:
2696         (KJS::Bindings::dispatchJNICall):
2697         * bridge/jni/jni_runtime.cpp:
2698         (JavaArray::convertJObjectToArray):
2699         (JavaField::dispatchValueFromInstance):
2700         (JavaField::valueFromInstance):
2701         (JavaField::dispatchSetValueToInstance):
2702         (JavaArray::valueAt):
2703         * bridge/jni/jni_utility.h:
2704         * bridge/objc/objc_class.mm:
2705         (KJS::Bindings::ObjcClass::fallbackObject):
2706         * bridge/objc/objc_instance.h:
2707         * bridge/objc/objc_instance.mm:
2708         (ObjcInstance::defaultValue):
2709         (ObjcInstance::stringValue):
2710         (ObjcInstance::numberValue):
2711         (ObjcInstance::valueOf):
2712         * bridge/objc/objc_utility.h:
2713         * bridge/objc/objc_utility.mm:
2714         (KJS::Bindings::convertNSStringToString):
2715         (KJS::Bindings::convertObjcValueToValue):
2716         * bridge/runtime.cpp:
2717         (KJS::Bindings::Instance::createRuntimeObject):
2718         * bridge/runtime.h:
2719         (KJS::Bindings::Instance::valueOf):
2720         * bridge/runtime_array.cpp:
2721         (RuntimeArray::lengthGetter):
2722         * bridge/runtime_method.cpp:
2723         (RuntimeMethod::lengthGetter):
2724         * bridge/runtime_object.cpp:
2725         (RuntimeObjectImp::RuntimeObjectImp):
2726         (RuntimeObjectImp::methodGetter):
2727         (RuntimeObjectImp::defaultValue):
2728         * xml/XMLHttpRequest.cpp:
2729         (WebCore::XMLHttpRequest::dropProtection):
2730         * bindings/js/GCController.cpp:
2731         (WebCore::GCController::gcTimerFired):
2732         (WebCore::GCController::garbageCollectNow):
2733         Adapted to JSC changes. Pass ExecState to functions that now need it. Removed
2734         collectOnMainThreadOnly, as this is the only way to collect now. Replaced calls to static
2735         Collector methods with calls to per-thread Heap ones.
2736
2737 2008-05-02  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2738
2739         Reviewed by Simon.
2740
2741         Build the Qt port with SVG Animation support.
2742
2743         * WebCore.pro:
2744
2745 2008-05-02  Simon Hausmann  <hausmann@webkit.org>
2746
2747         Build fix for Qt/Gtk. Don't declare NP_InitializeFuncPtr twice
2748         with different signatures.
2749
2750         * plugins/npfunctions.h:
2751
2752 2008-05-01  Robin Dunn  <robin@alldunn.com>
2753
2754         Reviewed by Kevin Ollivier.
2755
2756         Explicitly set the pen style in wx port to keep pen style changes from 
2757         affecting URL underline or text field drawing.
2758         
2759         https://bugs.webkit.org/show_bug.cgi?id=18775
2760
2761         * platform/graphics/wx/GraphicsContextWx.cpp:
2762         (WebCore::GraphicsContext::fillRect):
2763         (WebCore::GraphicsContext::drawLineForText):
2764         * platform/wx/RenderThemeWx.cpp:
2765         (WebCore::RenderThemeWx::paintTextField):
2766
2767 2008-05-01  Robin Dunn  <robin@alldunn.com>
2768
2769         Reviewed by Kevin Ollivier.
2770
2771         Implement popup menu support for wx port.
2772         
2773         https://bugs.webkit.org/show_bug.cgi?id=18776
2774
2775         * platform/PopupMenu.h:
2776         * platform/wx/PopupMenuWx.cpp: Added.
2777         (WebCore::PopupMenu::PopupMenu):
2778         (WebCore::PopupMenu::~PopupMenu):
2779         (WebCore::PopupMenu::show):
2780         (WebCore::PopupMenu::OnMenuItemSelected):
2781         (WebCore::PopupMenu::hide):
2782         (WebCore::PopupMenu::updateFromElement):
2783         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
2784         * platform/wx/TemporaryLinkStubs.cpp:
2785         * webcore-wx.bkl:
2786
2787 2008-05-01  Kevin Ollivier  <kevino@theolliviers.com>
2788
2789         Reviewed by Eric Seidel.
2790
2791         Make sure we properly set the button for all mouse events,
2792         not just mouse down, set the click count to 0
2793         for non-click events, and finally set the timestamp.
2794         
2795         https://bugs.webkit.org/show_bug.cgi?id=18464
2796
2797         * platform/wx/MouseEventWx.cpp:
2798         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2799
2800 2008-05-01  Sam Weinig  <sam@webkit.org>
2801
2802         Reviewed by Mark Rowe (in his infinite wisdom).
2803
2804         Auto-generate the JSXSLTProcessor binding.
2805
2806         * DerivedSources.make:
2807         * GNUmakefile.am:
2808         * WebCore.pro:
2809         * WebCore.vcproj/WebCore.vcproj:
2810         * WebCore.xcodeproj/project.pbxproj:
2811         * WebCoreSources.bkl:
2812         * bindings/js/JSDOMWindowBase.cpp:
2813         (WebCore::JSDOMWindowBase::getValueProperty):
2814         * bindings/js/JSDOMWindowBase.h:
2815         (WebCore::JSDOMWindowBase::):
2816         * bindings/js/JSXSLTProcessor.cpp: Removed.
2817         * bindings/js/JSXSLTProcessor.h: Removed.
2818         * xml/XSLTProcessor.h:
2819
2820 2008-05-01  Sam Weinig  <sam@webkit.org>
2821
2822         Reviewed by Geoffrey Garen.
2823
2824         Fixes:
2825           - https://bugs.webkit.org/show_bug.cgi?id=17249
2826             Incorrect lexical scope after navigation leads to UXSS
2827             <rdar://problem/5738497>
2828
2829           - https://bugs.webkit.org/show_bug.cgi?id=16824
2830             Script authorization should follow lexical (not dynamic) scope
2831             <rdar://problem/5683032>
2832
2833         This patch changes us to perform same-origin checks based on the lexical global object) 
2834         rather than dynamic global object, which is now possible we don't re-use the window on 
2835         navigations, but rather switch in a new one and re-use the outer shell.  This is both
2836         more secure and conforms with the HTML5 specification.  Now that all the checks are
2837         done based on the lexical global object, we can remove the SecurityOrigin::Reason
2838         concept, as it was only around to work around an ebay.com bug that required the check to
2839         be done that way.
2840
2841         An important thing to note is that we currently implement a stricter than necessary policy
2842         and perform the same-origin check based on the currently active global object to avoid leaking
2843         the document in cases when the target frame is navigated before access.  This will be fixed in
2844         an upcoming patch.
2845
2846         * bindings/js/JSDOMWindowBase.cpp:
2847         (WebCore::JSDOMWindowBase::allowsAccessFrom):
2848         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
2849         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
2850         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
2851         (WebCore::JSDOMWindowBase::printErrorMessage):
2852         (WebCore::asJSDOMWindow):
2853         * bindings/js/JSDOMWindowBase.h:
2854         * html/CanvasRenderingContext2D.cpp:
2855         (WebCore::CanvasRenderingContext2D::checkOrigin):
2856         (WebCore::CanvasRenderingContext2D::createPattern):
2857         * loader/FrameLoader.cpp:
2858         (WebCore::FrameLoader::begin):
2859         (WebCore::FrameLoader::write):
2860         (WebCore::FrameLoader::setOpener):
2861         (WebCore::FrameLoader::shouldAllowNavigation):
2862         * page/DOMWindow.h:
2863         (WebCore::DOMWindow::setSecurityOrigin):
2864         (WebCore::DOMWindow::securityOrigin):
2865         (WebCore::DOMWindow::setURL):
2866         (WebCore::DOMWindow::url):
2867         * platform/SecurityOrigin.cpp:
2868         (WebCore::SecurityOrigin::canAccess):
2869         (WebCore::SecurityOrigin::isSecureTransitionTo):
2870         * platform/SecurityOrigin.h:
2871
2872 2008-05-01  Anders Carlsson  <andersca@apple.com>
2873
2874         Reviewed by Mark.
2875
2876         Enable 64-bit NPAPI plugins.
2877         
2878         * WebCore.xcodeproj/project.pbxproj:
2879         Don't remove NPAPI related symbols from the 64-bit .exp file.
2880         
2881         * bridge/npruntime.h:
2882         Remove now unnecessary #error.
2883
2884 2008-05-01  Maciej Stachowiak  <mjs@apple.com>
2885
2886         Reviewed by Oliver (a while ago)
2887
2888         - just a wee bit more bindings speedup
2889         
2890         Store the per-document Node --> JS wrapper cache in the document
2891         instead of an external hashtable.
2892
2893         * bindings/js/kjs_binding.cpp:
2894         (WebCore::ScriptInterpreter::getDOMNodeForDocument):
2895         (WebCore::ScriptInterpreter::forgetDOMNodeForDocument):
2896         (WebCore::ScriptInterpreter::putDOMNodeForDocument):
2897         (WebCore::ScriptInterpreter::forgetAllDOMNodesForDocument):
2898         (WebCore::ScriptInterpreter::markDOMNodesForDocument):
2899         * dom/Document.h:
2900         (WebCore::Document::wrapperCache):
2901
2902 2008-05-01  Anders Carlsson  <andersca@apple.com>
2903
2904         Reviewed by Tim.
2905
2906         Remove duplicate npfunctions.h header from WebKit.
2907         
2908         * WebCore.xcodeproj/project.pbxproj:
2909         Add npfunctions.h and set its role to private.
2910         
2911         * plugins/npfunctions.h:
2912         Merge Mac specific changes.
2913
2914 2008-05-01  Sam Weinig  <sam@webkit.org>
2915
2916         Reviewed by Geoffrey Garen.
2917
2918         Rename toJSDOMWindow(KJS::JSGlobalObject) to asJSDOMWindow, as all it does is
2919         cast.
2920
2921         * bindings/js/JSCustomVoidCallback.cpp:
2922         (WebCore::toVoidCallback):
2923         * bindings/js/JSCustomXPathNSResolver.cpp:
2924         (WebCore::JSCustomXPathNSResolver::create):
2925         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2926         (WebCore::JSDOMApplicationCache::add):
2927         (WebCore::JSDOMApplicationCache::remove):
2928         * bindings/js/JSDOMWindowBase.cpp:
2929         (WebCore::allowPopUp):
2930         (WebCore::createWindow):
2931         (WebCore::windowProtoFuncOpen):
2932         (WebCore::asJSDOMWindow):
2933         * bindings/js/JSDOMWindowBase.h:
2934         * bindings/js/JSDOMWindowCustom.cpp:
2935         (WebCore::JSDOMWindow::setLocation):
2936         (WebCore::JSDOMWindow::postMessage):
2937         * bindings/js/JSDatabaseCustom.cpp:
2938         (WebCore::JSDatabase::changeVersion):
2939         (WebCore::JSDatabase::transaction):
2940         * bindings/js/JSDocumentCustom.cpp:
2941         (WebCore::JSDocument::setLocation):
2942         * bindings/js/JSLocationCustom.cpp:
2943         (WebCore::navigateIfAllowed):
2944         (WebCore::JSLocation::setHref):
2945         (WebCore::JSLocation::replace):
2946         (WebCore::JSLocation::reload):
2947         (WebCore::JSLocation::assign):
2948         * bindings/js/JSSQLTransactionCustom.cpp:
2949         (WebCore::JSSQLTransaction::executeSql):
2950         * bindings/js/JSXMLHttpRequestCustom.cpp:
2951         (WebCore::JSXMLHttpRequest::open):
2952         * page/JavaScriptDebugServer.cpp:
2953         (WebCore::toPage):
2954
2955 2008-05-01  Anatoli Papirovski  <apapirovski@mac.com>
2956
2957         Reviewed by Dave Hyatt.
2958
2959         - fix https://bugs.webkit.org/show_bug.cgi?id=18347
2960           Absolutely positioned image percentage width does not respect container's padding
2961
2962         Test: fast/replaced/absolute-position-percentage-width.html
2963
2964         * rendering/RenderBox.cpp:
2965         (WebCore::RenderBox::calcReplacedWidthUsing):
2966
2967 2008-05-01  Dan Bernstein  <mitz@apple.com>
2968
2969         - Windows build fix
2970
2971         * platform/graphics/win/FontCGWin.cpp:
2972         (WebCore::Font::drawGlyphs):
2973
2974 2008-05-01  Dan Bernstein  <mitz@apple.com>
2975
2976         Reviewed by Darin Adler.
2977
2978         - make synthetic bold and synthetic italics work in GDI text
2979         - account for synthetic bold in complex text on Windows
2980
2981         * platform/graphics/win/FontCGWin.cpp:
2982         (WebCore::Font::drawGlyphs): Adjusted the text rectangle's x coordinates
2983         to fit italics. Added a skew transform for synthetic italics and a
2984         second paint pass for synthetic bold.
2985         * platform/graphics/win/SimpleFontDataWin.cpp:
2986         (WebCore::SimpleFontData::widthForGDIGlyph): Added the synthetic bold
2987         offset.
2988         * platform/graphics/win/UniscribeController.cpp:
2989         (WebCore::UniscribeController::shapeAndPlaceItem): Added the synthetic
2990         bold offset.
2991
2992 2008-05-01  Alp Toker  <alp@nuanti.com>
2993
2994         Qt/Win build fix attempt following plugin changes. Add missing return
2995         statements.
2996
2997         Also fixes some newly introduced coding style issues in the Qt port.
2998
2999         * platform/qt/FileSystemQt.cpp:
3000         (WebCore::openTemporaryFile):
3001         (WebCore::closeFile):
3002         (WebCore::writeToFile):
3003         (WebCore::unloadModule):
3004
3005 2008-05-01  Anders Carlsson  <andersca@apple.com>
3006
3007         Reviewed by Adam.
3008
3009         Export methods needed to subclass Widget.  (See r32770.)
3010
3011         * WebCore.base.exp:
3012
3013 2008-05-01  Marc Ordinas i Llopis  <marc.ordinasillopis@collabora.co.uk>
3014
3015         Reviewed by Alp Toker.
3016         Qt parts OK'ed by Simon Hausmann.
3017
3018         https://bugs.webkit.org/show_bug.cgi?id=14750
3019         Added support for NPAPI plugins on Gtk and Qt-x11 ports.
3020
3021         * GNUmakefile.am: Added Gtk plugin files.
3022         * WebCore.pro: Added Qt plugins files, defined XP_UNIX and
3023         ENABLE_NETSCAPE_PLUGIN_API
3024         * bridge/npruntime_internal.h: Additional undefs that conflict
3025         with Qt headers.
3026         * page/gtk/FrameGtk.cpp: Create js bindings for PluginView.
3027         (WebCore::Frame::createScriptInstanceForWidget):
3028         * page/qt/FrameQt.cpp: Create js bindings for PluginView.
3029         (WebCore::Frame::createScriptInstanceForWidget):
3030         (WebCore::Frame::clearPlatformScriptObjects):
3031         (WebCore::Frame::disconnectPlatformScriptObjects):
3032         * platform/FileSystem.h: Qt FileSystem implementation.
3033         * platform/Widget.h: Members to differentiate between Qt plugins and
3034         NPAPI ones.
3035         * platform/gtk/ScrollViewGtk.cpp:
3036         (WebCore::ScrollView::addChild): Set containing window before calling setParent.
3037         * platform/gtk/TemporaryLinkStubs.cpp: Removed implemented functions.
3038         (PluginView::invalidateRegion):
3039         * platform/qt/FileSystemQt.cpp: Implemented functions necessary for
3040         NPAPI plugins.
3041         (WebCore::openTemporaryFile):
3042         (WebCore::closeFile):
3043         (WebCore::writeToFile):
3044         (WebCore::unloadModule): Delete module if unloaded.
3045         * platform/qt/TemporaryLinkStubs.cpp: Removed implemented functions.
3046         * platform/qt/WidgetQt.cpp: Differentiate between Qt plugins and
3047         NPAPI ones.
3048         (WebCore::WidgetPrivate::WidgetPrivate):
3049         (WebCore::Widget::isNPAPIPlugin):
3050         (WebCore::Widget::setIsNPAPIPlugin):
3051         * plugins/PluginPackage.cpp:
3052         (WebCore::PluginPackage::~PluginPackage): Unload the module before
3053         destruction.
3054         (WebCore::PluginPackage::compare): Moved here as it's platform
3055         independent.
3056         * plugins/PluginView.cpp: Moved platform-independent functions here.
3057         (WebCore::PluginView::PluginView): Initialize m_npWindow.ws_info on
3058         Unix platforms.
3059         (WebCore::PluginView::freeStringArray):
3060         (WebCore::startsWithBlankLine):
3061         (WebCore::locationAfterFirstBlankLine):
3062         (WebCore::findEOL):
3063         (WebCore::capitalizeRFC822HeaderFieldName):
3064         (WebCore::parseRFC822HeaderFields):
3065         (WebCore::PluginView::handlePost):
3066         * plugins/PluginView.h: Moved platform-independent functions here.
3067         Added member to signal plugin needs XEmbed extension.
3068         * plugins/gtk/PluginDataGtk.cpp: Added.
3069         (WebCore::PluginData::initPlugins):
3070         (WebCore::PluginData::refresh):
3071         * plugins/gtk/PluginDatabaseGtk.cpp:
3072         (WebCore::PluginDatabase::defaultPluginDirectories):
3073         (WebCore::PluginDatabase::isPreferredPluginDirectory):
3074         * plugins/gtk/PluginPackageGtk.cpp: Added.
3075         (WebCore::PluginPackage::determineQuirks):
3076         (WebCore::PluginPackage::fetchInfo):
3077         (WebCore::PluginPackage::load):
3078         (WebCore::PluginPackage::hash):
3079         (WebCore::PluginPackage::equal):
3080         (WebCore::PluginPackage::compareFileVersion):
3081         * plugins/gtk/PluginViewGtk.cpp: Added.
3082         (WebCore::PluginView::updateWindow):
3083         (WebCore::PluginView::setFocus):
3084         (WebCore::PluginView::show):
3085         (WebCore::PluginView::hide):
3086         (WebCore::PluginView::paint):
3087         (WebCore::PluginView::handleKeyboardEvent):
3088         (WebCore::PluginView::handleMouseEvent):
3089         (WebCore::PluginView::setParent):
3090         (WebCore::PluginView::setNPWindowRect):
3091         (WebCore::PluginView::attachToWindow):
3092         (WebCore::PluginView::detachFromWindow):
3093         (WebCore::PluginView::stop):
3094         (WebCore::PluginView::userAgent):
3095         (WebCore::PluginView::handlePostReadFile):
3096         (WebCore::PluginView::getValue):
3097         (WebCore::PluginView::invalidateRect):
3098         (WebCore::PluginView::forceRedraw):
3099         (WebCore::PluginView::~PluginView):
3100         (WebCore::plug_removed_cb): Added callback to handle plug removal.
3101         (WebCore::PluginView::init):
3102         * plugins/gtk/xembed.h: Added.
3103         * plugins/npapi.cpp:
3104         (NPN_GetValue): Return error if no view present.
3105         * plugins/qt/PluginDataQt.cpp:
3106         (WebCore::PluginData::initPlugins):
3107         (WebCore::PluginData::refresh):
3108         * plugins/qt/PluginDatabaseQt.cpp: Added.
3109         (WebCore::PluginDatabase::getPluginPathsInDirectories):
3110         (WebCore::addQtWebKitPluginDirectories):
3111         (WebCore::addMozillaPluginDirectories):
3112         (WebCore::PluginDatabase::defaultPluginDirectories):
3113         (WebCore::PluginDatabase::isPreferredPluginDirectory):
3114         * plugins/qt/PluginPackageQt.cpp: Added.
3115         (WebCore::PluginPackage::determineQuirks):
3116         (WebCore::PluginPackage::fetchInfo):
3117         (WebCore::PluginPackage::load):
3118         (WebCore::PluginPackage::hash):
3119         (WebCore::PluginPackage::equal):
3120         (WebCore::PluginPackage::compareFileVersion):
3121         * plugins/qt/PluginViewQt.cpp: Added.
3122         (WebCore::PluginView::updateWindow):
3123         (WebCore::PluginView::setFocus):
3124         (WebCore::PluginView::show):
3125         (WebCore::PluginView::hide):
3126         (WebCore::PluginView::paint):
3127         (WebCore::PluginView::handleKeyboardEvent):
3128         (WebCore::PluginView::handleMouseEvent):
3129         (WebCore::PluginView::setParent):
3130         (WebCore::PluginView::setNPWindowRect):
3131         (WebCore::PluginView::attachToWindow):
3132         (WebCore::PluginView::detachFromWindow):
3133         (WebCore::PluginView::stop):
3134         (WebCore::PluginView::userAgent):
3135         (WebCore::PluginView::handlePostReadFile):
3136         (WebCore::PluginView::getValue):
3137         (WebCore::PluginView::invalidateRect):
3138         (WebCore::PluginView::invalidateRegion):
3139         (WebCore::PluginView::forceRedraw):
3140         (WebCore::PluginView::~PluginView):
3141         (WebCore::PluginView::init):
3142         * plugins/win/PluginPackageWin.cpp: Moved platform-independent code
3143         to plugins/PluginPackage.cpp
3144         * plugins/win/PluginViewWin.cpp: Moved platform-independent code to
3145         plugins/PluginView.cpp
3146         (WebCore::PluginView::stop):
3147         (WebCore::PluginView::handlePostReadFile):
3148         (WebCore::PluginView::getValue): Moved this function to each platform.
3149
3150 2008-05-01  Sam Weinig  <sam@webkit.org>
3151
3152         Fix build.
3153
3154         * ForwardingHeaders/wtf/StrHash.h: Added.
3155
3156 2008-05-01  Anders Carlsson  <andersca@apple.com>
3157
3158         Reviewed by Darin.
3159
3160         Move management of cache groups to ApplicationCacheStorage. Also,
3161         application caches now start out with a null group and will have their group set
3162         when the cache has finished loading. 
3163
3164         * loader/appcache/ApplicationCache.cpp:
3165         (WebCore::ApplicationCache::ApplicationCache):
3166         Initialize m_group to 0.
3167         
3168         (WebCore::ApplicationCache::~ApplicationCache):
3169         Null check the group.
3170         
3171         (WebCore::ApplicationCache::setGroup):
3172         New method for setting the group.
3173         
3174         * loader/appcache/ApplicationCache.h:        
3175         (WebCore::ApplicationCache::create):
3176         Remove the group argument.
3177         
3178         * loader/appcache/ApplicationCacheGroup.cpp:
3179         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
3180         Let the storage know that the cache group has been destroyed.
3181         
3182         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
3183         Call into the storage.
3184         
3185         (WebCore::ApplicationCacheGroup::selectCache):
3186         Call into the storage.
3187         
3188         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
3189         When there are no document loaders associated with the cache group,
3190         set the newest cache to 0.
3191         
3192         (WebCore::ApplicationCacheGroup::cacheDestroyed):
3193         Delete the group if there are no associated caches.
3194         
3195         (WebCore::ApplicationCacheGroup::setNewestCache):
3196         New method that will set the newest cache and associate the group with the cache.
3197         
3198         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
3199         Call setNewestCache instead.
3200         
3201         * loader/appcache/ApplicationCacheStorage.cpp:
3202         (WebCore::urlHostHash):
3203         Move host hash method here.
3204         
3205         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
3206         New method that finds a cache group with a given manifest URL or creates a new one.
3207
3208         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
3209         New method that returns a cache group for a given URL.
3210         
3211         (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
3212         When the cache group has been destroyed, remove it from the hash map.
3213         
3214         * loader/appcache/ApplicationCacheStorage.h:
3215         Add new methods.I b
3216
3217 2008-05-01  Dan Winship  <danw@gnome.org>
3218
3219         Reviewed by Alp Toker.
3220
3221         http://bugs.webkit.org/show_bug.cgi?id=18490
3222         Add mostly-working file: support and mostly-broken ftp: support to
3223         the soup backend.
3224
3225         * platform/network/soup/ResourceHandleSoup.cpp (start): after
3226         doing basic checks, delegate to one of three submethods
3227         (startData): handles data: URLs
3228         (startHttp): handles http: and https: URLs, via libsoup
3229         (startGio, etc): handles file: and ftp: URLs, via gio. Lots of
3230         FIXMEs detailing the parts that don't fully work yet.
3231
3232         * platform/network/ResourceHandle.h:
3233         * platform/network/ResourceHandleInternal.h: add new member
3234         variables for gio-based loading
3235
3236 2008-05-01  Alp Toker  <alp@nuanti.com>
3237
3238         Rubber-stamped by Anders.
3239
3240         GTK+ build fix for changes in r32752. Use int32, not int32_t types in
3241         npapi.h.
3242
3243         Additional fix to use same signedness in npapi.h and Mac for the
3244         interval parameter.
3245
3246         * bridge/npapi.h:
3247
3248 2008-04-30  Anders Carlsson  <andersca@apple.com>
3249
3250         Reviewed by Adam.
3251
3252         Add new Cocoa event model type declarations.
3253         
3254         * bridge/npapi.h:
3255
3256 2008-04-30  Beth Dakin  <bdakin@apple.com>
3257
3258         Reviewed by Sam Weinig.
3259
3260         This patch does three things:
3261         1. Adds support for the "img" ARIA role
3262         2. Switches over to a HashMap for converting ARIA role attributes 
3263         to WebCore's AccessibilityRole type. 
3264         3. Fixes a crash in the new ARIA code that I ran into while 
3265         browsing with VoiceOver enabled.
3266
3267         * page/AccessibilityObject.cpp:
3268         (WebCore::AccessibilityObject::headingLevel): This is the crash 
3269         fix. Make sure the node's renderer is not null before looking up 
3270         its corresponding AccessibilityObject in the cache.
3271         (WebCore::AccessibilityObject::accessibilityIsIgnored): Account for 
3272         ARIA images.
3273         (WebCore::createARIARoleMap): Switch to HashMap, and add "img" to 
3274         the Map.
3275         (WebCore::RoleEntry::): Same.
3276         (WebCore::ariaRoleToWebCoreRole): Same.
3277         (WebCore::AccessibilityObject::ariaRoleAttribute): Same.
3278
3279 2008-04-30  Rob Buis  <buis@kde.org>
3280
3281         Reviewed by Nikolas.
3282
3283         https://bugs.webkit.org/show_bug.cgi?id=16447
3284         onload called too many times for <svg:image>
3285         https://bugs.webkit.org/show_bug.cgi?id=12282
3286         SVG wastes time in malloc to send loadEvents to non-existent listeners
3287
3288         Postpone load event dispatching for image when externalResourcesRequired
3289         is true, delaying parents but not siblings, and make sure the load event
3290         is sent once for image in all cases.
3291
3292         * svg/SVGElement.cpp:
3293         (WebCore::hasLoadListener):
3294         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
3295         * svg/SVGImageElement.cpp:
3296         (WebCore::SVGImageElement::haveLoadedRequiredResources):
3297         * svg/SVGImageLoader.cpp:
3298         (WebCore::SVGImageLoader::dispatchLoadEvent):
3299
3300 2008-04-30  David Hyatt  <hyatt@apple.com>
3301
3302         Fix crashes when dynamically removing <video> elements with layers that establish stacking contexts.  This
3303         won't typically crash release builds because of arena recycling.
3304
3305         Reviewed by Dan Bernstein
3306         
3307         * rendering/RenderLayer.cpp:
3308         (WebCore::RenderLayer::~RenderLayer):
3309         Make sure to remove the reflection's child layer from its parent.
3310
3311         * rendering/RenderMedia.cpp:
3312         (WebCore::RenderMedia::~RenderMedia):
3313         (WebCore::RenderMedia::destroy):
3314         (WebCore::RenderMedia::removeChild):
3315         * rendering/RenderMedia.h:
3316         Adjust the teardown of RenderMedia so that it does all of its teardown inside destroy() (this makes it more
3317         like other renderers and doesn't leave you staring at a trashed layer hierarchy in the RenderMedia
3318         destructor).
3319
3320 2008-04-30  Rémi Zara  <remi_zara@mac.com>
3321
3322         Reviewed by Dave Hyatt.
3323
3324         fix https://bugs.webkit.org/show_bug.cgi?id=18618
3325         <rdar://problem/5876063> REGRESSION (r31823-r31847): Patterns are upside down
3326
3327         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
3328         (WebCore::patternCallback): flip the y axis when drawing the tile
3329
3330 2008-04-30  Timothy Hatcher  <timothy@apple.com>
3331
3332         Fixes an undefined type exception that fires when adding a resource to the inspector
3333         that has a MIME type warning.
3334
3335         Reviewed by Adam Roben.
3336
3337         * page/inspector/Resource.js:
3338         (WebInspector.Resource.prototype._addTip): Call WebInspector.console instead of
3339         WebInspector.consolePanel.
3340         (WebInspector.Resource.prototype._checkWarning): Ditto.
3341
3342 2008-04-30  Timothy Hatcher  <timothy@apple.com>
3343
3344         Fixes the bug where the selected resource would be deselected after
3345         changing the sort order in the Resources panel.
3346
3347         Reviewed by Dan Bernstein.
3348
3349         * page/inspector/ResourcesPanel.js:
3350         (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded):
3351         Rememebr if the tree element that we are sorting was selected, so
3352         the selection can be restored after it is re-inserted. The onSelect
3353         is suppressed since we don't need to show the resource again.
3354
3355 2008-04-29  Timothy Hatcher  <timothy@apple.com>
3356
3357         Fixes the regression where error bubbles in source views always show
3358         "undefined" for the content because the message property on
3359         ConsoleMessage was removed. Adds support for a plain text formated
3360         message that is stored in the message proeprty.
3361
3362         Reviewed by Adam Roben.
3363
3364         * page/inspector/Console.js:
3365         (WebInspector.Console.prototype._format): Add a plainText argument that is passed to
3366         the formatters.
3367         (WebInspector.Console.prototype._formatvalue): Add a plainText argument, and a comment
3368         about needing to honor it if the textContent of the output doesn't make sense.
3369         (WebInspector.Console.prototype._formatvalue): Ditto.
3370         (WebInspector.Console.prototype._formatstring): Ditto.
3371         (WebInspector.Console.prototype._formatregexp): Ditto.
3372         (WebInspector.Console.prototype._formatarray): Ditto.
3373         (WebInspector.Console.prototype._formatnode): Ditto.
3374         (WebInspector.Console.prototype._formatobject): Ditto.
3375         (WebInspector.Console.prototype._formaterror): Ditto.
3376         (WebInspector.ConsoleMessage): Call _format passing true for plainText. Get the 
3377         textContnet of the result and assign to the message proeprty. This property is 
3378         referenced from the SourceView.
3379         (WebInspector.ConsoleMessage.prototype._format): Add a plainText argument. Build the 
3380         result element as a local and return it, instead of using formatedMessage directly.
3381
3382 2008-04-30  Timothy Hatcher  <timothy@apple.com>
3383
3384         Adds a helper function to convert a JSValueRef to a String.
3385
3386         Reviewed by Adam Roben.
3387
3388         * page/InspectorController.cpp:
3389         (WebCore::toString): Converts a JSValueRef to a String.
3390         (WebCore::search): Use toString.
3391         (WebCore::InspectorController::handleException): Ditto.
3392
3393 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3394
3395         Reviewed by Simon.
3396         
3397         Build the Qt port with SVG Foreign Object support.
3398
3399         * WebCore.pro:
3400
3401 2008-04-30  Simon Hausmann  <hausmann@webkit.org>
3402
3403         Reviewed by Holger.
3404
3405         Fix null pointer deference triggered by
3406         LayoutTests/fast/loader/cancel-load-during-port-block-timer.html
3407
3408         * platform/network/qt/ResourceHandleQt.cpp:
3409         (WebCore::ResourceHandle::cancel): Check m_job before dereferencing.
3410
3411 2008-04-29  David Hyatt  <hyatt@apple.com>
3412
3413         Improve the performance of masks by adding code to set more precise clips on the transparency layers
3414         used to paint the content under the mask, and then also avoid creating transparency layers for the masks
3415         themselves in common cases.
3416
3417         Reviewed by Dan Bernstein
3418
3419         * platform/graphics/GraphicsContext.cpp:
3420         (WebCore::GraphicsContext::drawTiledImage):
3421         Fix a bug in drawTiledImage where the composite mode got lost in the double stretch case for nine piece
3422         images.
3423
3424         * rendering/InlineFlowBox.cpp:
3425         (WebCore::InlineFlowBox::paintFillLayers):
3426         (WebCore::InlineFlowBox::paintFillLayer):
3427         (WebCore::InlineFlowBox::paintMask):
3428         Optimize to only push a transparency layer for the mask if multiple images are combining.  Add a new
3429         composite operator argument for use when painting fill layers to do direct destination-in compositing while
3430         painting images.
3431
3432
3433         * rendering/InlineFlowBox.h:
3434         * rendering/RenderBox.cpp:
3435         (WebCore::RenderBox::paintMask):
3436         (WebCore::RenderBox::paintMaskImages):
3437         Optimize to only push a transparency layer for the mask if multiple images are combining.
3438
3439         (WebCore::RenderBox::maskClipRect):
3440         A new method that attempts to compute a precise clip rect for the mask images.
3441
3442         (WebCore::RenderBox::paintFillLayers):
3443         (WebCore::RenderBox::paintFillLayer):
3444         (WebCore::RenderBox::paintFillLayerExtended):
3445         * rendering/RenderBox.h:
3446         Added the composite operator argument to the paintFillLayer methods.
3447
3448         * rendering/RenderFieldset.cpp:
3449         (WebCore::RenderFieldset::paintMask):
3450         Call the new base class paintMaskImages method for optimized mask painting.
3451
3452         * rendering/RenderLayer.cpp:
3453         (WebCore::transparencyClipBox):
3454         Fix a coordinate space issue with transparencyClipBox when masks were used.  The border box was in the
3455         wrong coordinate space.  Moved the code into the layer's boundingBox() method instead.
3456
3457         (WebCore::RenderLayer::paintLayer):
3458         Removed the code that always pushed a transparency layer before painting masks.
3459
3460         (WebCore::RenderLayer::boundingBox):
3461         Call maskClipRect to shrink the bounding box of the layer to fit the mask clip.
3462
3463         * rendering/RenderObject.cpp:
3464         (WebCore::RenderObject::paintNinePieceImage):
3465         Added a composite operator argument for direct destination-in painting of nine piece images.
3466
3467         * rendering/RenderObject.h:
3468         (WebCore::RenderObject::maskClipRect):
3469         (WebCore::RenderObject::paintFillLayerExtended):
3470         Base class stubs for RenderBox-implemented methods.
3471
3472         * rendering/RenderTable.cpp:
3473         (WebCore::RenderTable::paintMask):
3474         * rendering/RenderTableCell.cpp:
3475         (WebCore::RenderTableCell::paintMask):
3476         Modified to call the new paintMaskImages function.
3477
3478         * svg/graphics/SVGImage.cpp:
3479         (WebCore::SVGImage::draw):
3480         SVG images now respect composite modes by pushing a transparency layer when the composite mode
3481         is anything other than source-over.
3482
3483 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3484
3485         Rubber-stamped by Rob Buis.
3486
3487         Fixed crash or assertion if SVG_FOREIGN_OBJECT is not enabled
3488
3489         * svg/SVGUseElement.cpp:
3490         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
3491
3492 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3493
3494         Rubber-stamped by Rob Buis.
3495
3496         Fixed compile, due to API change in XMLSerializer
3497
3498         * svg/SVGUseElement.cpp:
3499         (WebCore::SVGUseElement::buildPendingResource):
3500
3501 2008-04-30  Rob Buis  <buis@kde.org>
3502
3503         Reviewed by Eric.
3504
3505         https://bugs.webkit.org/show_bug.cgi?id=11939
3506         Quirksmode: Ignores media types in stylesheet PIs
3507
3508         Transfer the xml-stylesheet pseudo attribute media to the css
3509         stylesheet created from the ProcessingInstruction.
3510
3511         Tests: fast/css/xml-stylesheet-media-processing.xhtml
3512
3513         * css/StyleSheet.cpp:
3514         (WebCore::StyleSheet::setMedia):
3515         * css/StyleSheet.h:
3516         * dom/ProcessingInstruction.cpp:
3517         (WebCore::ProcessingInstruction::checkStyleSheet):
3518         (WebCore::ProcessingInstruction::setCSSStyleSheet):
3519         * dom/ProcessingInstruction.h:
3520
3521 2008-04-29  David D. Kilzer  <ddkilzer@apple.com>
3522
3523         BUILD FIX for export of WTF::RefCounted<WebCore::FormData>::deref()
3524
3525         On the buildbot, this is a fatal error:
3526
3527         ld: symbols names listed in -exported_symbols_list: WebKitBuild/Release/DerivedSources/WebCore/WebCore.exp not in linked objects
3528         __ZN3WTF10RefCountedIN7WebCore8FormDataEE5derefEv
3529         /usr/bin/libtool: internal link edit command failed
3530
3531         Newer dev tools only produce a warning:
3532
3533         ld warning: cannot export hidden symbol __ZN3WTF10RefCountedIN7WebCore8FormDataEE5derefEv from WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/i386/DocumentLoader.o
3534
3535         * WebCore.base.exp: Remove hidden symbol from export list.
3536
3537 2008-04-29  David Kilzer  <ddkilzer@apple.com>
3538
3539         Another BUILD FIX for ENABLE(DASHBOARD_SUPPORT)
3540
3541         * dom/make_names.pl: Added #if ENABLE(DASHBOARD_SUPPORT) to Dashboard code.
3542
3543 2008-04-29  David Kilzer  <ddkilzer@apple.com>
3544
3545         BUILD FIX for ENABLE(DASHBOARD_SUPPORT)
3546
3547         * DerivedSources.make: Removed duplication of targets for
3548         generating CSSPropertyNames.h and CSSValueKeywords.h.
3549         * GNUmakefile.am: Ditto.  Added support for ENABLE_DASHBOARD_SUPPORT.
3550         * WebCore.pro: Added support for ENABLE_DASHBOARD_SUPPORT.
3551         Made both SVG and non-SVG variables of GENERATOR 6-A use new
3552         DASHBOARDSUPPORTCSSPROPERTIES variable.
3553
3554 2008-04-29  Ada Chan  <adachan@apple.com>
3555
3556         Added missing return.        
3557
3558         * platform/win/COMPtr.h:
3559         (WTF::):
3560
3561 2008-04-29  Alp Toker  <alp@nuanti.com>
3562
3563         GTK+ build fix attempt following breakage in r32700 which
3564         conditionalised dashboard support.
3565
3566         * GNUmakefile.am:
3567
3568 2008-04-29  Adam Roben  <aroben@apple.com>
3569
3570         Restore the beloved COMPtr::operator&
3571
3572         * platform/win/COMPtr.h: Removed the HashTableDeletedValueType
3573         constructor and isHashTableDeletedValue and hashTableDeletedValue
3574         functions.
3575         (WTF::): Changed constructDeletedValue to play nicely with
3576         COMPtr::operator&.
3577
3578 2008-04-29  Adam Roben  <aroben@apple.com>
3579
3580         Fix assertion on launch on Windows
3581
3582         * platform/graphics/win/FontPlatformData.h: Pass
3583         WTF::HashTableDeletedValue to the m_font constructor instead of a
3584         bogus -1 value. This is needed because m_font is a RefPtr.
3585
3586 2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
3587
3588         Reviewed by Darin.
3589
3590         Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
3591
3592         * DerivedSources.make:
3593         * WebCore.DashboardSupport.exp: Added.
3594         * WebCore.base.exp:
3595         * WebCore.xcodeproj/project.pbxproj:
3596         * bindings/js/JSDOMWindowCustom.cpp:
3597         (WebCore::JSDOMWindow::setLocation):
3598         * css/CSSComputedStyleDeclaration.cpp:
3599         (WebCore::):
3600         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3601         * css/CSSParser.cpp:
3602         (WebCore::CSSParser::parseValue):
3603         * css/CSSPrimitiveValue.cpp:
3604         (WebCore::CSSPrimitiveValue::cleanup):
3605         (WebCore::CSSPrimitiveValue::cssText):
3606         * css/CSSPropertyNames.in:
3607         * css/CSSStyleSelector.cpp:
3608         (WebCore::CSSStyleSelector::applyProperty):
3609         * css/DashboardRegion.h:
3610         * css/DashboardSupportCSSPropertyNames.in: Added.
3611         * dom/D