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