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