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