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