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