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