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