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