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