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