2008-05-15 Ariya Hidayat <ariya.hidayat@trolltech.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-05-15  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2
3         Reviewed by Simon.
4
5         Since WebKitGtk is fully using autotools now, clean-up the .pro/.pri files
6         from gtk-port.
7
8         * WebCore.pro:
9
10 2008-05-16  Simon Hausmann  <hausmann@webkit.org>
11
12         Fix the Gtk build.
13
14         * GNUmakefile.am: Added rendering/style to the include paths.
15
16 2008-05-16  Simon Hausmann  <hausmann@webkit.org>
17
18         Fix the Qt build.
19
20         * WebCore.pro: Added rendering/style to the include paths
21         * page/AXObjectCache.cpp:
22         (WebCore::AXObjectCache::handleActiveDescendantChanged): Don't compile
23         this method unless a17n is enabled.
24
25 2008-05-15  Rob Buis  <buis@kde.org>
26
27         Reviewed by Dave Hyatt.
28
29         https://bugs.webkit.org/show_bug.cgi?id=17433
30         getComputedStyle() -> clip returns empty string
31
32         Make getComputedStyle return a shape value for clip
33         if it is set.
34
35         Tests: fast/css/getPropertyValue-clip.html
36
37         * css/CSSComputedStyleDeclaration.cpp:
38         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
39
40 2008-05-15  Kevin Ollivier  <kevino@theolliviers.com>
41
42         wx build fix. Add rendering/style to includes dir.
43
44         * webcore-base.bkl:
45
46 2008-05-15  Alice Liu  <alice.liu@apple.com>
47
48         Reviewed by Beth Dakin.
49
50         Fixed <rdar://problem/5882283> Implement ARIA aria-activedescendant
51         Also added support for aria roles listbox and option, and aria-selected, 
52         and aria-multiselectable for listboxes
53
54         * dom/Element.cpp:
55         (WebCore::Element::attributeChanged):
56         * dom/Element.h:
57         * dom/StyledElement.cpp:
58         (WebCore::StyledElement::attributeChanged):
59         * html/HTMLAttributeNames.in:
60         * page/AXObjectCache.cpp:
61         (WebCore::AXObjectCache::handleActiveDescendantChanged):
62         * page/AXObjectCache.h:
63         (WebCore::AXObjectCache::accessibilityEnabled):
64         (WebCore::AXObjectCache::handleActiveDescendantChanged):
65         * page/AccessibilityListBox.cpp:
66         (WebCore::AccessibilityListBox::selectedChildren):
67         (WebCore::AccessibilityListBox::visibleChildren):
68         * page/AccessibilityListBox.h:
69         * page/AccessibilityListBoxOption.h:
70         (WebCore::AccessibilityListBoxOption::selectedChildren):
71         (WebCore::AccessibilityListBoxOption::visibleChildren):
72         * page/AccessibilityObject.cpp:
73         * page/AccessibilityObject.h:
74         (WebCore::AccessibilityObject::isListBox):
75         (WebCore::AccessibilityObject::shouldFocusActiveDescendant):
76         (WebCore::AccessibilityObject::activeDescendant):
77         (WebCore::AccessibilityObject::handleActiveDescendantChanged):
78         * page/AccessibilityRenderObject.cpp:
79         (WebCore::AccessibilityRenderObject::title):
80         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
81         (WebCore::AccessibilityRenderObject::focusedUIElement):
82         (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant):
83         (WebCore::AccessibilityRenderObject::activeDescendant):
84         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
85         (WebCore::RoleEntry::):
86         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
87         (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
88         (WebCore::AccessibilityRenderObject::selectedChildren):
89         (WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
90         (WebCore::AccessibilityRenderObject::visibleChildren):
91         * page/AccessibilityRenderObject.h:
92         (WebCore::AccessibilityRenderObject::isDetached):
93         * page/mac/AccessibilityObjectWrapper.mm:
94         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
95
96 2008-05-15  Timothy Hatcher  <timothy@apple.com>
97
98         Fixes a bug in the view source parsing of text within <script>,
99         <style>, <xmp>, <textarea> and other special tags. The text was
100         being parsed as HTML and would be syntax highlighted if a "<"
101         was encountered.
102
103         <rdar://problem/5790805> Inspector's source view missing some words,
104         doubles others in JS source in <script> tag (17752)
105
106         Reviewed by Dave Hyatt.
107
108         Added test: fast/frames/viewsource-plain-text-tags.html
109
110         * html/HTMLTokenizer.cpp:
111         (WebCore::HTMLTokenizer::scriptHandler): Set scriptCodeSize and
112         scriptCodeResync to zero before an early return in view source mode.
113         This was causing text from a previous script tag to show up in
114         then next style tag.
115         (WebCore::HTMLTokenizer::parseTag): Enter an if block in view source
116         mode even if n is null. The n is property guarded in other places
117         and not used by view source mode. Removes a redundant null check on n.
118         Add a new null check of n before setting scriptSrcCharset. Other code
119         in HTMLTokenizer is already guarded for this code path. 
120
121 2008-05-15  Timothy Hatcher  <timothy@apple.com>
122
123         Changes the Web Inspector node highlight to be less aggressive
124         and only highlight when hovering over the selected node in the DOM
125         tree or breadcrumbs. You can highlight on hover for any node if
126         you hold down the Alt/Option key while hovering.
127
128         Reviewed by Kevin McCullough.
129
130         * page/inspector/ElementsPanel.js:
131         * page/inspector/inspector.js:
132
133 2008-05-15  Stephanie Lewis  <slewis@apple.com>
134
135         Fix windows build
136
137         * loader/FrameLoader.cpp:
138         (WebCore::FrameLoader::stopLoading):
139
140 2008-05-15  Stephanie Lewis  <slewis@apple.com>
141
142         Reviewed by Anders.
143         
144         export a symbol needed for fast teardown
145
146         * WebCore.base.exp:
147
148 2008-05-15  Stephanie Lewis  <slewis@apple.com>
149
150         Reviewed by Anders.
151
152         Keep track on pending unload event counts
153
154         No change in behavior so no new tests, but I am dumping the 
155         unload event count to track the new variable.
156
157         * WebCore.base.exp:
158
159         increment/decrement the count when an event is added/removed
160         * dom/Document.cpp:
161         (WebCore::Document::removeHTMLWindowEventListener):
162         (WebCore::Document::addWindowEventListener):
163         (WebCore::Document::removeWindowEventListener):
164         (WebCore::Document::setPendingFrameUnloadEventCount):
165         * dom/Document.h:
166
167         set the count to 0 for each frame after the unload event has been dispatched
168         * loader/FrameLoader.cpp:
169         (WebCore::FrameLoader::stopLoading):
170
171         keep track of the number of pending unload events for the eventHandler's frame
172         * page/EventHandler.cpp:
173         (WebCore::EventHandler::EventHandler):
174        (WebCore::EventHandler::pendingFrameUnloadEventCount):
175         (WebCore::EventHandler::setPendingFrameUnloadEventCount):
176         * page/EventHandler.h:
177
178         keep track of the total number of pending unload events for all of the frames
179         * page/Page.cpp:
180         (WebCore::Page::Page):
181         (WebCore::Page::pendingUnloadEventCount):
182         (WebCore::Page::setPendingUnloadEventCount):
183         * page/Page.h:
184
185 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
186
187         Fix build.
188
189         * WebCore.vcproj/WebCore.vcproj:
190
191 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
192
193         Fix build.
194
195         * WebCore.vcproj/WebCore.vcproj:
196
197 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
198
199         Fix build.
200
201         * WebCore.vcproj/WebCore.vcproj:
202
203 2008-05-15  David Kilzer  <ddkilzer@apple.com>
204
205         Bug 19085: font-family: initial sets font-family differently than font: initial
206
207         <https://bugs.webkit.org/show_bug.cgi?id=19085>
208         <rdar://problem/5939391>
209
210         Reviewed by David Hyatt.
211
212         Test: fast/css/font-family-initial.html
213
214         * css/CSSStyleSelector.cpp:
215         (WebCore::CSSStyleSelector::applyProperty): Don't set family if first
216         family of initial font description is empty.
217
218 2008-05-15  David Hyatt  <hyatt@apple.com>
219
220         Move RenderStyle into a new subdirectory, rendering/style/, in preparation for breaking it up into
221         a bunch of smaller files.
222
223         Reviewed by Dan Bernstein
224
225         * GNUmakefile.am:
226         * WebCore.pro:
227         * WebCore.vcproj/WebCore.vcproj:
228         * WebCore.xcodeproj/project.pbxproj:
229         * WebCoreSources.bkl:
230         * rendering/RenderStyle.cpp: Removed.
231         * rendering/RenderStyle.h: Removed.
232         * rendering/style: Added.
233         * rendering/style/RenderStyle.cpp: Copied from rendering/RenderStyle.cpp.
234         * rendering/style/RenderStyle.h: Copied from rendering/RenderStyle.h.
235
236 2008-05-15  David Kilzer  <ddkilzer@apple.com>
237
238         Fix leaks when stopping a page from loading
239
240         Patch suggested by Antti.  Reviewed by Antti.
241
242         * loader/DocLoader.cpp:
243         (WebCore::DocLoader::clearPreloads): If a resource is in m_preloads but
244         never made it to the cache, delete it to prevent it from leaking.
245
246 2008-05-15  Julien Chaffraix  <jchaffraix@webkit.org>
247
248         Reviewed by Darin.
249
250         https://bugs.webkit.org/show_bug.cgi?id=13942
251         ASSERTION FAILED: !attrName.contains('/') in HTMLTokenizer.cpp:132 when loading http://bamanzi.blogeden.cn/
252
253         In HTML, when an attribute was null (for example when we parse '="somevalue"'
254         (attribute forgotten or there is a space between the attribute and the '=')),
255         the fallback was to assign the value to the attribute. However if the value was
256         a url or did contain a '/', we would trigger the assertion.
257
258         To avoid that, we check the value before assigning it now and do not assign it
259         if it means adding a '/'.
260
261         Test: fast/parser/assertion-empty-attribute.html
262
263         * html/HTMLTokenizer.cpp:
264         (WebCore::HTMLTokenizer::parseTag): Add check for '/' in value before
265         assigning it to an attribute when the attribute is null.
266
267 2008-05-15  Kevin Ollivier  <kevino@theolliviers.com>
268
269         wx build fix for recent breakages. Add EventLoopWx.cpp, update the Bakefiles,
270         and add stubs for new Plugins functions. Also move plugin functions outside of
271         TemporaryLinkStubs.cpp so that they are more noticeable.
272
273         * WebCoreSources.bkl:
274         * platform/wx/EventLoopWx.cpp: Added.
275         (WebCore::EventLoop::cycle):
276         * platform/wx/TemporaryLinkStubs.cpp:
277         * plugins/wx: Added.
278         * plugins/wx/PluginDataWx.cpp: Added.
279         (WebCore::PluginData::initPlugins):
280         (WebCore::PluginData::refresh):
281         * plugins/wx/PluginDatabaseWx.cpp: Added.
282         (WebCore::PluginDatabase::getPluginPathsInDirectories):
283         (WebCore::PluginDatabase::defaultPluginDirectories):
284         (WebCore::PluginDatabase::isPreferredPluginDirectory):
285         * plugins/wx/PluginPackageWx.cpp: Added.
286         (WebCore::PluginPackage::determineQuirks):
287         (WebCore::PluginPackage::fetchInfo):
288         (WebCore::PluginPackage::load):
289         (WebCore::PluginPackage::hash):
290         (WebCore::PluginPackage::equal):
291         (WebCore::PluginPackage::compareFileVersion):
292         * plugins/wx/PluginViewWx.cpp: Added.
293         (WebCore::PluginView::updateWindow):
294         (WebCore::PluginView::setFocus):
295         (WebCore::PluginView::show):
296         (WebCore::PluginView::hide):
297         (WebCore::PluginView::paint):
298         (WebCore::PluginView::handleKeyboardEvent):
299         (WebCore::PluginView::handleMouseEvent):
300         (WebCore::PluginView::setParent):
301         (WebCore::PluginView::setNPWindowRect):
302         (WebCore::PluginView::attachToWindow):
303         (WebCore::PluginView::detachFromWindow):
304         (WebCore::PluginView::stop):
305         (WebCore::PluginView::userAgent):
306         (WebCore::PluginView::handlePostReadFile):
307         (WebCore::PluginView::getValue):
308         (WebCore::PluginView::invalidateRect):
309         (WebCore::PluginView::invalidateRegion):
310         (WebCore::PluginView::forceRedraw):
311         (WebCore::PluginView::~PluginView):
312         (WebCore::PluginView::init):
313         * webcore-wx.bkl:
314
315 2008-05-15  Adam Treat  <treat@kde.org>
316
317         Reviewed by Simon.
318
319         Don't try to setCompositionMode for devices that do not support PorterDuff
320
321         * platform/graphics/qt/GraphicsContextQt.cpp:
322         (WebCore::TransparencyLayer::TransparencyLayer):
323         (WebCore::GraphicsContext::strokeRect):
324         (WebCore::GraphicsContext::clip):
325
326 2008-05-15  Adele Peterson  <adele@apple.com>
327
328         Reviewed and landed by Alexey.
329
330         Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].
331
332         * WebCore.base.exp: Exported TextIterator methods.
333
334 2008-05-15  Simon Hausmann  <hausmann@webkit.org>
335
336         Fix the Qt build by adding NetworkStateNotifier.cpp to the build.
337
338         * WebCore.pro:
339
340 2008-05-14  Dan Bernstein  <mitz@apple.com>
341
342         Reviewed by Mark Rowe.
343
344         - fix <rdar://problem/5907633> Memory corruption after closing a document that uses box-reflect
345
346         Test: fast/reflections/teardown-crash.html
347
348         * rendering/RenderLayer.cpp:
349         (WebCore::RenderLayer::~RenderLayer): Changed to not call removeLayers()
350         on the reflection if the document is being destroyed, because in that
351         case the layer tree is not being maintained.
352
353 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
354
355         Reviewed by Tim.
356
357         <rdar://problem/5770054> JavaScript profiler (10928)
358         - Expose the new Profiler functions to the WebInspector.
359
360         * page/JavaScriptProfileNode.cpp:
361         (WebCore::getTotalPercent):
362         (WebCore::getSelfPercent):
363         (WebCore::ProfileNodeClass):
364
365 2008-05-14  Timothy Hatcher  <timothy@apple.com>
366
367         Fixes a crash in JavaScriptDebugServer::returnEvent when debugging
368         code that contains an eval. This change makes stepping into eval
369         code work as expected.
370
371         http://bugs.webkit.org/show_bug.cgi?id=19038
372
373         Reviewed by Kevin McCullough.
374
375         Tested with: manual-tests/inspector/returnEvent-crash.html
376
377         * manual-tests/inspector/returnEvent-crash.html: Added.
378         * page/JavaScriptDebugServer.cpp:
379         (WebCore::JavaScriptDebugServer::sourceParsed): Adds #ifdefed
380         debugging code to prevent the sourceID and URL.
381         (WebCore::updateCurrentCallFrame): Added. A helper function that
382         is called from all 4 of the debugger hooks below. This function will
383         update and/or create JavaScriptCallFrames to match the exec state,
384         sourceID and lineNumber passed into it. Contains #ifdefed debugging
385         code that was helpful while fixing this bug.
386         (WebCore::JavaScriptDebugServer::callEvent): Call updateCurrentCallFrame
387         before pauseIfNeeded.
388         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
389         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
390         (WebCore::JavaScriptDebugServer::exception): Ditto.
391
392 2008-05-14  Alp Toker  <alp@nuanti.com>
393
394         GTK+ build fix for r33457. Add NetworkStateNotifier.cpp to the build.
395
396         * GNUmakefile.am:
397
398 2008-05-14  Alp Toker  <alp@nuanti.com>
399
400         GTK+ build fix. Include value.h from kjs, not JavaScriptCore.
401
402         * page/JavaScriptProfile.cpp:
403         * page/JavaScriptProfileNode.cpp:
404
405 2008-05-14  Adam Roben  <aroben@apple.com>
406
407         Windows release build fix
408
409         * WebCore.vcproj/WebCore.vcproj: Make sure the warnings we disable on
410         XPathGrammar.cpp are disabled for all configurations, not just
411         Debug_Internal.
412
413 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
414
415         Reviewed by Sam.
416
417         <rdar://problem/5770054> JavaScript profiler (10928)
418         - Rename FunctionCallProfile to ProfileNode
419
420         * ForwardingHeaders/profiler/FunctionCallProfile.h: Removed.
421         * ForwardingHeaders/profiler/ProfileNode.h: Copied from ForwardingHeaders/profiler/FunctionCallProfile.h.
422         * GNUmakefile.am:
423         * WebCore.pro:
424         * WebCore.vcproj/WebCore.vcproj:
425         * WebCore.xcodeproj/project.pbxproj:
426         * WebCoreSources.bkl:
427         * page/JavaScriptFunctionCallProfile.cpp: Removed.
428         * page/JavaScriptFunctionCallProfile.h: Removed.
429         * page/JavaScriptProfile.cpp:
430         * page/JavaScriptProfileNode.cpp: Copied from page/JavaScriptFunctionCallProfile.cpp.
431         (WebCore::ProfileNodeCache):
432         (WebCore::getFunctionName):
433         (WebCore::getTotalTime):
434         (WebCore::getSelfTime):
435         (WebCore::getNumberOfCalls):
436         (WebCore::getChildren):
437         (WebCore::finalize):
438         (WebCore::ProfileNodeClass):
439         (WebCore::toJS):
440         * page/JavaScriptProfileNode.h: Copied from page/JavaScriptFunctionCallProfile.h.
441
442 2008-05-13  Beth Dakin  <bdakin@apple.com>
443
444         Reviewed by Brady.
445
446         This patch adds support for the ARIA progressbar role and the 
447         following ARIA states (ie HTML attributes): aria-checked, aria-
448         level, aria-pressed, aria-valuenow, aria-valuemin, and aria-
449         valuemax.
450
451         * html/HTMLAttributeNames.in:
452         * page/AccessibilityObject.h:
453         (WebCore::AccessibilityObject::isProgressIndicator):
454         (WebCore::AccessibilityObject::valueForRange):
455         (WebCore::AccessibilityObject::maxValueForRange):
456         (WebCore::AccessibilityObject::minValueForRange):
457         * page/AccessibilityRenderObject.cpp:
458         (WebCore::AccessibilityRenderObject::isProgressIndicator):
459         (WebCore::AccessibilityRenderObject::isPressed): Check the aria-
460         pressed attribute if this is an ARIA button.
461         (WebCore::AccessibilityRenderObject::headingLevel): Check the aria-
462         level attribute if this is an ARIA heading.
463         (WebCore::AccessibilityRenderObject::intValue): Check the aria-
464         checked attribute if this is an ARIA radio button or checkbox.
465         (WebCore::AccessibilityRenderObject::valueForRange):
466         (WebCore::AccessibilityRenderObject::maxValueForRange):
467         (WebCore::AccessibilityRenderObject::minValueForRange):
468         (WebCore::RoleEntry::):
469         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
470         * page/AccessibilityRenderObject.h:
471         * page/mac/AccessibilityObjectWrapper.mm:
472         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
473         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
474
475 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
476
477         Reviewed by John.
478
479         -<rdar://problem/5770054> JavaScript profiler (10928)
480         Use the FunctionCallProfile's new total and self time functions.
481
482         * page/JavaScriptFunctionCallProfile.cpp:
483         (WebCore::getTotalTime):
484         (WebCore::getSelfTime):
485
486 2008-05-14  Anders Carlsson  <andersca@apple.com>
487
488         Reviewed by Adam.
489
490         Don't try to store the resource data if it's empty.
491         
492         * loader/appcache/ApplicationCacheStorage.cpp:
493         (WebCore::ApplicationCacheStorage::store):
494
495 2008-05-14  Adam Roben  <aroben@apple.com>
496
497         Windows build fix
498
499         * platform/network/NetworkStateNotifier.cpp: Added a missing #include.
500         * platform/network/NetworkStateNotifier.h:
501         (WebCore::NetworkStateNotifier::NetworkStateNotifier): Removed 'void'
502         return type from the constructor, and fixed the spelling of a member
503         variable.
504
505 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
506
507         Reviewed by Adam.
508
509         <rdar://problem/5770054> JavaScript profiler (10928)
510         - Add support for interacting with the JavaScriptCore profiler.
511
512         * ForwardingHeaders/profiler/FunctionCallProfile.h: Added.
513         * ForwardingHeaders/profiler/Profile.h: Added.
514         * GNUmakefile.am: Add the new files to all the projects.
515         * WebCore.pro:
516         * WebCore.vcproj/WebCore.vcproj:
517         * WebCore.xcodeproj/project.pbxproj:
518         * WebCoreSources.bkl:
519         * page/InspectorController.cpp: Add the ability to retrieve all of the
520         profiles in JavaScript from the InspectorController.
521         (WebCore::allProfiles):
522         (WebCore::InspectorController::windowScriptObjectAvailable):
523         * page/JavaScriptFunctionCallProfile.cpp: Added. Wrapper around the JSC
524         FunctionCallProfile.
525         (WebCore::functionCallProfileCache): This cache makes sure we don't
526         needlessly create duplicate wrappers around the same
527         FunctionCallProfile*.
528         (WebCore::getFunctionName): Callback to return the name of the function.
529         (WebCore::getTotalTime): Callback to return the total time spent in the
530         function.
531         (WebCore::getSelfTime): Callback to return the time spent in self (total
532         - time in children) in the function.
533         (WebCore::getNumberOfCalls): Callback to return the number of times this
534         function was called.
535         (WebCore::getChildren): Callback to return the children of this function
536         where the children are the functions this function called.
537         (WebCore::finalize): Cleanup.
538         (WebCore::functionCallProfileClass): Define the JSClassRef for this
539         object.
540         (WebCore::toJS): Create a conversion function to make a usable JSValue
541         to wrap the FunctionCallProfile in JSC.
542         * page/JavaScriptFunctionCallProfile.h: Added.
543         * page/JavaScriptProfile.cpp: Added. Wrapper around the JSC Profile.
544         (WebCore::profileCache): This cache makes sure we don't needlessly
545         create duplicate wrappers aroudn the same Profile*.
546         (WebCore::getHeadCallback): Callback to return the head of the graph of
547         the functions profiled durring this profile's run.
548         (WebCore::finalize):
549         (WebCore::profileClass): Define the JSClassRef for this object.
550         (WebCore::toJS): Create a conversion function to make a usable JSValue
551         to wrap the Profile from JSC.
552         * page/JavaScriptProfile.h: Added.
553
554 2008-05-14  David Hyatt  <hyatt@apple.com>
555
556         Fix for bug https://bugs.webkit.org/show_bug.cgi?id=16130.
557
558         Opacity, transforms, reflections and masks should not honor z-index unless the element is also
559         positioned.  Always reset to auto if the element is not positioned (and then the following code will
560         adjust auto to 0 as needed).
561
562         Reviewed by Dan Bernstein
563
564         * css/CSSStyleSelector.cpp:
565         (WebCore::CSSStyleSelector::adjustRenderStyle):
566
567 2008-05-14  Anders Carlsson  <andersca@apple.com>
568
569         Reviewed by Brady.
570
571         <rdar://problem/5931742> Support navigator.onLine from HTML5
572         
573         * WebCore.vcproj/WebCore.vcproj:
574         * WebCore.xcodeproj/project.pbxproj:
575         Add NetworkStateNotifier files.
576         
577         * dom/EventNames.h:
578         Add offline and online events.
579         
580         * page/Navigator.cpp:
581         (WebCore::Navigator::onLine):
582         * page/Navigator.h:
583         * page/Navigator.idl:
584         Add navigator.onLine.
585         
586         * page/Page.cpp:
587         (WebCore::networkStateChanged):
588         Dispatch offline/online events to all frames.
589         
590         (WebCore::Page::Page):
591         Set state change callback.
592         
593         * platform/network/NetworkStateNotifier.cpp: Added.
594         * platform/network/NetworkStateNotifier.h: Added.
595
596         * platform/network/mac/NetworkStateNotifierMac.cpp: Added.
597         Mac network state notifier.
598
599 2008-05-14  Adam Roben  <aroben@apple.com>
600
601         Fix Bug 18888: REGRESSION (r32731): console.log always prints
602         "undefined"
603
604         <https://bugs.webkit.org/show_bug.cgi?id=18888>
605
606         Reviewed by Tim Hatcher.
607
608         Tested by pre-existing
609         manual-tests/inspector/console-log-formatting.html.
610
611         * page/inspector/Console.js:
612         (WebInspector.ConsoleMessage.prototype._format): Changed to explicitly
613         wrap Console._format instead of using bind to do it. Using bind was
614         causing us to pass plainText in as the first parameter instead of as
615         the second.
616
617 2008-05-14  Timothy Hatcher  <timothy@apple.com>
618
619         Fixes the bug where stepping out of a function would show the wrong
620         call stack (would look like it stepped out twice.)
621
622         Reviewed by Adam Roben.
623
624         * page/JavaScriptDebugServer.cpp:
625         (WebCore::JavaScriptDebugServer::returnEvent):
626         Call pauseIfNeeded before setting m_currentCallFrame to the caller.
627
628 2008-05-14  Stephanie Lewis  <slewis@apple.com>
629    
630         Fix 64bit build
631
632         * plugins/PluginView.h:
633
634 2008-05-14  David Kilzer  <ddkilzer@apple.com>
635
636         REGRESSION (r26474): WebKit fails jQuery test 64 core module: text(String) subtest 1 Check escaped text (createTextNode)
637
638         <https://bugs.webkit.org/show_bug.cgi?id=18976>
639         <rdar://problem/5924793>
640
641         Reviewed by Darin.
642
643         Tests: fast/dom/dom-parse-serialize-expected.txt:
644                fast/xsl/xslt-processor-expected.txt:
645                fast/xsl/xslt-text-expected.txt:
646
647         Commit r26474 removed escaping of '>' characters to '&gt;' in serialized
648         HTML content, which broke one jQuery test.  This change restores that
649         serialization behavior to both attributes and content for consistency.
650
651         * editing/markup.cpp:
652         (WebCore::appendAttributeValue): Escape '>' as '&gt;'.
653         (WebCore::escapeContentText): Ditto.
654         (WebCore::appendEscapedContent): Ditto.  This is the bug fix for the jQuery test.
655
656 2008-05-14  Adam Roben  <aroben@apple.com>
657
658         Fix Bug 19051: REGRESSION (r33447): Assertion in
659         JSDebugServer::removeListener closing tab with Inspector open
660
661         <https://bugs.webkit.org/show_bug.cgi?id=19051>
662
663         m_inspectedPage is now cleared when the Page is destroyed, which never
664         used to happen. Some of InspectorController's code was not prepared
665         for this.
666
667         Reviewed by Dave Hyatt.
668
669         * page/InspectorController.cpp:
670         (WebCore::InspectorController::~InspectorController): Removed a call
671         to stopDebugging and added an assertion. Debugging should have already
672         been stopped by this point.
673         (WebCore::InspectorController::inspectedPageDestroyed): Moved here
674         from the header file. Added a call to stopDebugging.
675         (WebCore::InspectorController::enabled): Return false if our inspected
676         Page has already been destroyed, since we can't really do much at this
677         point anyway.
678         (WebCore::InspectorController::didCommitLoad):
679         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
680         (WebCore::InspectorController::identifierForInitialRequest):
681         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
682         (WebCore::InspectorController::stopDebugging):
683         (WebCore::InspectorController::drawNodeHighlight):
684         Assert that m_inspectedPage hasn't been cleared.
685         * page/InspectorController.h:
686
687 2008-05-14  Justin Garcia  <justin.garcia@apple.com>
688
689         Reviewed by Darin.
690
691         <rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition
692
693         * editing/Editor.cpp:
694         (WebCore::Editor::confirmComposition): Remove the previous composition
695         when we insert the new one, not with a separate, slower, delete operation.
696         (WebCore::Editor::setComposition): Ditto.
697         * editing/InsertTextCommand.cpp:
698         (WebCore::InsertTextCommand::performTrivialReplace): Remove the selected
699         text with a low level operation that doesn't perform a layout and insert
700         the new text in a way that won't trigger a layout from the removal.
701         (WebCore::InsertTextCommand::input): Call the optimized replace.
702         * editing/InsertTextCommand.h:
703         * editing/htmlediting.cpp:
704         (WebCore::isTabSpanNode): Check to see if the node is a span, to avoid 
705         the expense of getAttribute in the common case.
706         * page/Frame.cpp:
707         (WebCore::Frame::selectionLayoutChanged): Selection::start() and end()
708         will already be at VisiblePosition deepEquivalents. Selection::validate()
709         ensures this.
710
711 2008-05-14  Adam Roben  <aroben@apple.com>
712
713         Make the Inspector able to handle being reloaded
714
715         When Reload was selected from the context menu in the Inspector, the
716         Inspector window would close and never be openable again. Now it
717         closes, then reopens when the page finishes loading.
718
719         Reviewed by Tim Hatcher.
720
721         * page/InspectorController.cpp:
722         (WebCore::InspectorController::close): Removed code that cleared out
723         m_page. This is now handled by pageDestroyed.
724         * page/InspectorController.h:
725         (WebCore::InspectorController::inspectedPageDestroyed): Added.
726         * page/Page.cpp:
727         (WebCore::Page::~Page): Fixed a bug and added a call to the new
728         inspectedPageDestroyed. If we have a parent InspectorController, that
729         means that we are the Page in the Inspector's window (i.e., we are the
730         Inspector's UI), so when we are destroyed we should call
731         InspectorController::pageDestroyed. We also need to call
732         inspectedPageDestroyed on our own InspectorController so that it won't
733         try to call into us.
734
735 2008-05-14  Timothy Hatcher  <timothy@apple.com>
736
737         Add pause on exception support to the Inspector debugger
738         with a toggle buttons to enable or disable it.
739
740         Reviewed by Adam Roben.
741
742         * page/InspectorController.cpp:
743         (WebCore::pauseOnExceptions): Call the InspectorController.
744         (WebCore::setPauseOnExceptions): Ditto.
745         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new
746         setPauseOnExceptions and pauseOnExceptions functions to the JS class.
747         (WebCore::InspectorController::pauseOnExceptions): Call JavaScriptDebugServer.
748         (WebCore::InspectorController::setPauseOnExceptions): Ditto.
749         * page/InspectorController.h:
750         * page/JavaScriptDebugServer.cpp:
751         (WebCore::JavaScriptDebugServer::setPauseOnExceptions): Set m_pauseOnExceptions.
752         (WebCore::JavaScriptDebugServer::exception): Check m_pauseOnExceptions
753         and set m_pauseOnNextStatement to true before calling pauseIfNeeded.
754         * page/JavaScriptDebugServer.h:
755         * page/inspector/Images/pauseOnExceptionButtons.png: Added.
756         * page/inspector/ScriptsPanel.js: Adds a status bar button that calls
757         the new InspectorController functions.
758         * page/inspector/inspector.css: New styles.
759
760 2008-05-14  Timothy Hatcher  <timothy@apple.com>
761
762         Rename the Scope Chain pane to Scope Variables. Name the global
763         object Global. Name objects before the locals "With Block".
764         Name colsure scopes "Closure". Name any element or document
765         after Local, "Event Target" and "Event Document", respectfully.
766
767         Reviewed by Adam Roben.
768
769         * English.lproj/localizedStrings.js: Add new strings.
770         * page/inspector/ObjectPropertiesSection.js:
771         (WebInspector.ObjectPropertiesSection): Add a new argument that is used
772         for the empty placeholder text.
773         (WebInspector.ObjectPropertiesSection.prototype.onpopulate): Use the
774         empty placeholder text.
775         * page/inspector/ScopeChainSidebarPane.js:
776         (WebInspector.ScopeChainSidebarPane): Rename Scope Chain to Scope Variables.
777         (WebInspector.ScopeChainSidebarPane.prototype.update): Use the object name as
778         the subtitle. Use "Global" for the global object title. Use "With Block" for
779         the title of objects before the locals. Use "No Variables" for the empty
780         placeholder text for locals.
781
782 2008-05-14  Michael A. Puls II  <shadow2531@gmail.com>
783
784         Reviewed by Alexey.
785
786         Fix for https://bugs.webkit.org/show_bug.cgi?id=16923 
787         Attr nodes with a value of "" should not have any childNodes
788         
789         In Opera, Firefox and IE, when an attribute node has a value
790         of "", the attribute node doesn't have any childNodes. This
791         is true in WebKit also, but not when you assign "" to the
792         Attr's value when the existing value is non-empty.
793         
794         Test: fast/dom/attribute-empty-value-no-children.html
795
796         * dom/Attr.cpp: (WebCore::Attr::setValue): Use createTextChild(), which only appends
797         a child text node if the value being assigned is not empty.
798
799 2008-05-14  Julien Chaffraix  <jchaffraix@webkit.org>
800
801         Reviewed by Eric.
802
803         GCC 4.3 build fix.
804         Removes some compiler warnings.
805
806         * dom/Document.h:
807         (WebCore::FormElementKey::hashTableDeletedValue): GCC complained about the const keyword
808         so remove it as it is only used inside FormElementKey.
809
810         * html/HTMLSelectElement.cpp:
811         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Correct coding style (removes
812         a warning too).
813
814         * loader/appcache/ApplicationCacheResource.cpp: Include stdio.h for gcc4.3 build.
815
816         * plugins/PluginPackage.cpp:
817         (WebCore::PluginPackage::PluginPackage): Changed initialization order in the constructor.
818         * plugins/PluginView.cpp:
819         (WebCore::PluginView::PluginView): Ditto.
820         * plugins/PluginView.h:
821         * xml/AccessControlList.cpp: Include stdio.h
822         * xml/AccessItem.cpp: Ditto.
823         * xml/AccessItemRule.cpp: Ditto.
824
825 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
826
827         Reviewed by Simon.
828
829         Qt build fix. Add JSJavaScriptCallFrameCustom.cpp to the build
830         and implemented EventLoopQt.
831
832         * WebCore.pro:
833         * platform/qt/EventLoopQt.cpp: Added.
834
835 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
836
837         Reviewed by Simon.
838
839         Qt build fix. Add JavaScriptCallFrame.{idl,cpp} to the build.
840
841         * WebCore.pro:
842
843 2008-05-13  Dan Bernstein  <mitz@apple.com>
844
845         Reviewed by John Sullivan.
846
847         - Windows part of <rdar://problem/5725912> improve render quality of transformed text
848
849         * platform/graphics/win/FontCGWin.cpp:
850         (WebCore::Font::drawGlyphs): Added call to
851         wkSetCGContextFontRenderingStyle().
852
853 2008-05-13  Alp Toker  <alp@nuanti.com>
854
855         GTK+ build fix. Implement EventLoopGtk.cpp.
856
857         * GNUmakefile.am:
858         * platform/gtk/EventLoopGtk.cpp: Added.
859         (WebCore::EventLoop::cycle):
860
861 2008-05-13  Alp Toker  <alp@nuanti.com>
862
863         GTK+ build fix. Fix IDL filename typo and add JavaScriptCallFrame.cpp
864         to the build.
865
866         * GNUmakefile.am:
867
868 2008-05-13  Matt Lilek  <webkit@mattlilek.com>
869
870         Not reviewed, partial Gtk build fix.
871
872         * GNUmakefile.am:
873
874 2008-05-13  Timothy Hatcher  <timothy@apple.com>
875
876         Fixes a crash when stepping out in the Inspector's debugger.
877
878         http://bugs.webkit.org/show_bug.cgi?id=19037
879
880         Reviewed by Dan Bernstein.
881
882         * page/InspectorController.cpp:
883         (WebCore::currentCallFrame): Adds a null check of currentCallFrame,
884         since it can be null. Also returns JSNull to better signify this.
885         * page/inspector/ScriptsPanel.js: Updates the debugger interface
886         when stepping so the currentCallFrame isn't accessed when not paused.
887         Adds a _clearInterface function to remove duplicate code.
888
889 2008-05-13  chris fleizach  <cfleizach@apple.com>
890
891         Reviewed by Beth Dakin
892
893         <rdar://problem/5932677> AX: Submit buttons aren't returning AXTitle
894
895         * page/AccessibilityRenderObject.cpp:
896         (WebCore::AccessibilityRenderObject::title):
897
898 2008-05-13  Timothy Hatcher  <timothy@apple.com>
899
900         Adds an overlay window that covers the scripts panel and
901         informs the user that they need to attach the debugger.
902         Provides an "Attach Debugger" button below the info text.
903
904         Reviewed by Dan Bernstein.
905
906         * English.lproj/localizedStrings.js: New strings.
907         * page/inspector/ScriptsPanel.js:
908         (WebInspector.ScriptsPanel): Create the overlay elements and
909         append to the main panel element.
910         * page/inspector/inspector.css: New styles for the over lay elements.
911
912 2008-05-13  Timothy Hatcher  <timothy@apple.com>
913
914         Fixes the assertion and crash that would happen when inspecting a element from a frame.
915         This change makes JSInspectedObjectWrapper pass unwrapped objects around for global objects
916         that share the same page group identifier. Also returns jsUndefined() instead of 0 to prevent
917         crashing in release builds if the page groups don't match.
918
919         Passes all the tests in: manual-tests/inspector-wrappers
920
921         Reviewed by Adam Roben.
922
923         * bindings/js/JSInspectedObjectWrapper.cpp:
924         (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Return jsUndefined() instead of 0.
925         Call allowsUnwrappedAccessFrom instead of unwrappedExecStateMatches.
926         * bindings/js/JSQuarantinedObjectWrapper.cpp:
927         (WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom): Renamed from unwrappedExecStateMatches.
928         Return true if the pageGroupIdentifier of both wrappers match.
929         (WebCore::JSQuarantinedObjectWrapper::callAsFunction): Return jsUndefined() instead of 0.
930         * bindings/js/JSQuarantinedObjectWrapper.h: Renamed unwrappedExecStateMatches to allowsUnwrappedAccessFrom.
931
932 2008-05-13  Timothy Hatcher  <timothy@apple.com>
933
934         Fixes the hang that could happen when option-clicking to expand
935         a disclosure triangle in the Properties pane. This change limits
936         the recursion depth when expanding the tree elements.
937
938         <rdar://problem/5847681> Safari hangs when option-clicking a
939         disclosure triangle in the Inspector's Properties pane
940
941         Reviewed by John Sullivan.
942
943         * page/inspector/treeoutline.js:
944         (TreeElement.prototype.expandRecursively): Pass an empty info object to
945         traverseNextTreeElement to get the depthChange value. This is used to
946         compute a current depth. If the depth exceeds the maxDepth argument, the
947         item isn't expanded and children wont be populated when traverseNextTreeElement
948         is called until the depth goes below the maxDepth.
949         (TreeElement.prototype.traverseNextTreeElement): Added a new info
950         argument that can be optionally used to return extra info like depth change.
951
952 2008-05-13  Timothy Hatcher  <timothy@apple.com>
953
954         Adds info text to panes and sections in the Inspector's sidebars
955         that would normally be empty. These help the user know why there
956         is nothing in these sections.
957
958         Reviewed by John Sullivan.
959
960         * English.lproj/localizedStrings.js: Add strings.
961         * page/inspector/BreakpointsSidebarPane.js: Adds "No Breakpoints".
962         * page/inspector/CallStackSidebarPane.js: Adds "Not Paused".
963         * page/inspector/ObjectPropertiesSection.js: Adds "No Properties".
964         * page/inspector/ScopeChainSidebarPane.js: Adds "Not Paused".
965         * page/inspector/inspector.css: Adds style rules for the info elements.
966
967 2008-05-13  Timothy Hatcher  <timothy@apple.com>
968
969         Implements the rest of the Scripts panel to get the debugger
970         mostly working. "Basic debugging seems to work."
971
972         Reviewed by Geoff Garen.
973
974         * English.lproj/localizedStrings.js: Adds new strings.
975         * page/inspector/Resource.js:
976         (WebInspector.Resource.prototype.get scripts): Returns _scripts and 
977         creates it lazily.
978         (WebInspector.Resource.prototype.addScript): Add the script object to the
979         front of the _scripts array.
980         (WebInspector.Resource.prototype.removeAllScripts): Removed all the scripts
981         and removes the resource back-reference.
982         (WebInspector.Resource.prototype.removeScript): Removes the script and
983         breaks the resource back-reference.
984         * page/inspector/ResourceView.js:
985         (WebInspector.ResourceView): Adds a reminder comment.
986         (WebInspector.ResourceView.prototype.get headersVisible): Returns _headersVisible. 
987         (WebInspector.ResourceView.prototype.set headersVisible): Stubs out
988         a setter that currently just sets _headersVisible. Has a comment that
989         points out this needs implemented when network headers are added.
990         * page/inspector/ResourcesPanel.js:
991         (WebInspector.ResourcesPanel.prototype.show): Sets the headersVisible property of
992         the visible view to true and shows it again, in case it was being shown in Scripts.
993         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
994         Copies the headersVisible property from the old view to the new view.
995         (WebInspector.ResourcesPanel.prototype.showResource): Sets the headersVisible
996         property to true before showing.
997         * page/inspector/ScriptView.js:
998         (WebInspector.ScriptView): Passes in _addBreakpoint for the add breakpoint delegate.
999         (WebInspector.ScriptView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
1000         for the current Script.sourceID and line.
1001         * page/inspector/ScriptsPanel.js:
1002         (WebInspector.ScriptsPanel): 
1003         (WebInspector.ScriptsPanel.prototype.show): Sets the headersVisible property of
1004         the visible view to false and shows it again, in case it was being shown in Resources.
1005         (WebInspector.ScriptsPanel.prototype.addScript): Makes a new Script object and
1006         adds it to a Resource if one is found. Registers any breakpoint that match
1007         the new Script's source URL, and sets the sourceID of the breakpoints.
1008         (WebInspector.ScriptsPanel.prototype.addBreakpoint): Adds the breakpoint to the
1009         BreakpointsSidebarPane. Also adds it to _breakpointsURLMap so it can be found
1010         later in addScript by URL. Finally adds the breakpoint to the SourceFrame that
1011         represents the resources or script.
1012         (WebInspector.ScriptsPanel.prototype.removeBreakpoint): Removes the breakpoint from
1013         the BreakpointsSidebarPane, _breakpointsURLMap and SourceFrame.
1014         (WebInspector.ScriptsPanel.prototype.debuggerPaused): Update the debugger
1015         state variables, the buttons and the CallStackSidebarPane.
1016         (WebInspector.ScriptsPanel.prototype.reset): Clears and resets debugger
1017         and interface state.
1018         (WebInspector.ScriptsPanel.prototype.get visibleView): Returns _visibleView.
1019         (WebInspector.ScriptsPanel.prototype.set visibleView): Sets _visibleView and
1020         calls hide on the old view and show on the new view.
1021         (WebInspector.ScriptsPanel.prototype.showScript): Calls _showScriptOrResource.
1022         (WebInspector.ScriptsPanel.prototype.showResource): Ditto.
1023         (WebInspector.ScriptsPanel.prototype.scriptViewForScript): Lazily creates a
1024         ScriptView for the Script and returns it. 
1025         (WebInspector.ScriptsPanel.prototype.sourceFrameForScript): Returns the SourceFrame
1026         for the Script.
1027         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource): Returns the
1028         SourceFrame based on the type of object passed in.
1029         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Shows the view based on
1030         the type of object passed in. If the object is a resource and there are breakpoints
1031         defined for that Resource URL, then populate the SourceFrame with the breakpoints.
1032         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Adds a script to the 
1033         files menu. If the Script is part of a resource, that resource is added.
1034         (WebInspector.ScriptsPanel.prototype._removeScriptFromFilesMenu): Remove a script from
1035         the files menu. If that script is part of a resource and it is the last script of that
1036         resource, then remove the whole resource.
1037         (WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine): Clears the execution
1038         line from the SourceFrame that is showing it.
1039         (WebInspector.ScriptsPanel.prototype._callFrameSelected): Event listener for when the
1040         call frame changes in the CallStackSidebarPane. Triggers updates to the ScopeChainSidebarPane
1041         and the visible view.
1042         (WebInspector.ScriptsPanel.prototype._changeVisibleFile): Event listener for the change state
1043         of the files select element.
1044         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Update more of the 
1045         buttons to reflect the current debugger state. Updates the status text too.
1046         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Reset the UI and state when
1047         the debugger is attached/detached.
1048         (WebInspector.ScriptsPanel.prototype._togglePause): Call InspectorController.resumeDebugger or
1049         InspectorController.pauseInDebugger depending on the paused state.
1050         (WebInspector.ScriptsPanel.prototype._stepOverClicked): Call InspectorController.stepOverStatementInDebugger.
1051         (WebInspector.ScriptsPanel.prototype._stepIntoClicked): Call InspectorController.stepIntoStatementInDebugger.
1052         (WebInspector.ScriptsPanel.prototype._stepOutClicked): InspectorController.stepOutOfFunctionInDebugger.
1053         * page/inspector/SourceView.js:
1054         (WebInspector.SourceView): Passes in _addBreakpoint for the add breakpoint delegate.
1055         (WebInspector.SourceView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
1056         for the nearest Script's sourceID and passed in line.
1057         * page/inspector/inspector.css: New style rules for the UI changes.
1058         * page/inspector/inspector.js:
1059         (WebInspector.loaded): Add the ScriptsPanel to the panels list.
1060         (WebInspector.parsedScriptSource): Call ScriptsPanel.addScript.
1061         (WebInspector.failedToParseScriptSource): Ditto.
1062         (WebInspector.pausedScript): Call ScriptsPanel.debuggerPaused.
1063
1064 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1065
1066         Adds implementations of the Scope Chain and Call Stack sidebar panes.
1067         These panes use the JSJavaScriptCallFrame object that will be passed
1068         to the update functions.
1069
1070         Reviewed by Kevin McCullough.
1071
1072         * English.lproj/localizedStrings.js: Adds new strings.
1073         * WebCore.vcproj/WebCore.vcproj: Adds new files.
1074         * page/inspector/CallStackSidebarPane.js:
1075         (WebInspector.CallStackSidebarPane.prototype.update): Walk the 
1076         caller chain of the call frame and make placards for each.
1077         (WebInspector.CallStackSidebarPane.prototype.get selectedCallFrame):
1078         Return _selectedCallFrame. 
1079         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
1080         Set _selectedCallFrame and dispatch the "call frame selected" event.
1081         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
1082         Set the selectedCallFrame based on the clicked placard.
1083         * page/inspector/Placard.js: Added. A user interface object that can
1084         be used to show a title and a subtitle block with a selected state.
1085         * page/inspector/ScopeChainSidebarPane.js: Added.
1086         (WebInspector.ScopeChainSidebarPane): Call the base object and set the title.
1087         (WebInspector.ScopeChainSidebarPane.prototype.update): Iterate over the
1088         call frame's scope chain and make ObjectPropertiesSections for each.
1089         * page/inspector/SidebarPane.js:
1090         (WebInspector.SidebarPane.prototype): Inherit from WebInspector.Object.
1091         * page/inspector/WebKit.qrc: Add new files.
1092         * page/inspector/inspector.css: Add placard styles.
1093         * page/inspector/inspector.html: Add new files.
1094
1095 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1096
1097         Fixes the bug where SourceViews would be blank if shown before
1098         the Resource finished loading.
1099
1100         <rdar://problem/5807420> Safari's Web Inspector won't display the
1101         contents of some CSS and JS files
1102
1103         Reviewed by Kevin McCullough.
1104
1105         * page/inspector/Resource.js:
1106         (WebInspector.Resource.prototype.set finished): Dispatch the finished event
1107         (WebInspector.Resource.prototype): Inherit from WebInspector.Object.prototype.
1108         * page/inspector/SourceView.js:
1109         (WebInspector.SourceView): Register for the finished event on the resource.
1110         When the event fires, setup the source frame and deregister the event.
1111
1112 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1113
1114         Factored most of SourceView out into SourceFrame so it can be shared
1115         by the new ScriptView. Added the ScriptView class to be used for
1116         scripts that arn't Resources (like eval code.) Added a simple Script
1117         object that hold the data from the debugger parsedSource hooks. A
1118         ScriptView holds a Script object, and uses it for source data.
1119
1120         Added breakpoint and execution line support to the SourceFrame
1121         where they are visually represented in the source.
1122
1123         Reviewed by Kevin McCullough.
1124
1125         * page/inspector/inspector.js:
1126         (WebInspector.performSearch): Change the caller of sourceFrameForResource
1127         to use the SourceFrame result's element property.
1128         * page/inspector/ResourcesPanel.js: Use the new SourceFrame.
1129         * page/inspector/Script.js: Added.
1130         * page/inspector/ScriptView.js: Added.
1131         * page/inspector/SourceFrame.js: Added.
1132         * page/inspector/SourceView.js: Use the new SourceFrame.
1133         * WebCore.vcproj/WebCore.vcproj: Add new files.
1134         * page/inspector/WebKit.qrc: Ditto.
1135         * page/inspector/inspector.html: Ditto.
1136
1137 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1138
1139         Adds a Breakpoint object and basic add/remove functions on
1140         BreakpointsSidebarPane that call the InspectorController to
1141         add/remove the breakpoint.
1142
1143         Reviewed by Kevin McCullough.
1144
1145         * page/inspector/Breakpoint.js:
1146         (WebInspector.Breakpoint): 
1147         (WebInspector.Breakpoint.prototype.get enabled): Return _enabled.
1148         (WebInspector.Breakpoint.prototype.set enabled): Set _enabled and
1149         dispatch the enabled/disabled event to listeners.
1150         * page/inspector/BreakpointsSidebarPane.js:
1151         (WebInspector.BreakpointsSidebarPane): Add a breakpoints array.
1152         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
1153         Adds the breakpoint to the breakpoints array. Registers for the disabled
1154         and enabled event types. Call InspectorController.addBreakpoint if attached.
1155         (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
1156         Removes the breakpoint from the breakpoints array. Deregisters for the disabled
1157         and enabled event types. Call InspectorController.removeBreakpoint if attached.
1158         (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
1159         Call InspectorController.addBreakpoint or InspectorController.removeBreakpoint
1160         depending on the enabled state of the breakpoint.
1161         * WebCore.vcproj/WebCore.vcproj: Add new files.
1162         * page/inspector/WebKit.qrc: Ditto.
1163         * page/inspector/inspector.html: Ditto.
1164
1165 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1166
1167         Make addSourceToFrame not dependent on InspectorResource so it
1168         can be used to add source of a passed in string and mime-type to
1169         a frame. Added addResourceSourceToFrame for use by SourceView.
1170
1171         Also fixes an assertion because of an incorrect static_cast of identifiers
1172         to unsigned long long, when they can be unsigned.
1173
1174         Reviewed by Geoff Garen.
1175
1176         * page/InspectorController.cpp:
1177         (WebCore::addSourceToFrame): Helper function used by addSourceToFrame
1178         and addResourceSourceToFrame.
1179         (WebCore::addSourceToFrame): Generalized to take a source and mime-type string.
1180         (WebCore::addResourceSourceToFrame): Renamed from addSourceToFrame.
1181         (WebCore::getResourceDocumentNode): Fixes the static_cast to be long long.
1182         (WebCore::InspectorController::windowScriptObjectAvailable): Adds
1183         addResourceSourceToFrame to the JavaScript class.
1184         * page/inspector/SourceView.js: Use the new addResourceSourceToFrame.
1185
1186 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1187
1188         Add debugger related functions to the InspectorController and
1189         expose them to the JavaScript side of InspectorController.
1190
1191         Reviewed by Geoff Garen.
1192
1193         * page/InspectorController.cpp:
1194         (WebCore::jsStringRef): Added helper to convert a UString to a JSStringRef.
1195         (WebCore::currentCallFrame): Call InspectorController::currentCallFrame.
1196         (WebCore::pauseInDebugger): Call InspectorController::pauseInDebugger.
1197         (WebCore::resumeDebugger): Call InspectorController::resumeDebugger.
1198         (WebCore::stepOverStatementInDebugger): Call InspectorController::stepOverStatementInDebugger.
1199         (WebCore::stepIntoStatementInDebugger): Call InspectorController::stepIntoStatementInDebugger.
1200         (WebCore::stepOutOfFunctionInDebugger): Call InspectorController::stepOutOfFunctionInDebugger.
1201         (WebCore::addBreakpoint): Call InspectorController::addBreakpoint.
1202         (WebCore::removeBreakpoint): Call InspectorController::removeBreakpoint.
1203         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new functions to the
1204         InspectorController JavaScript class.
1205         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage): Clear breakpoints.
1206         (WebCore::InspectorController::currentCallFrame): Return the currentCallFrame from the
1207         JavaScriptDebugServer.
1208         (WebCore::InspectorController::pauseInDebugger): Call JavaScriptDebugServer's pauseOnNextStatement.
1209         (WebCore::InspectorController::resumeDebugger): Call JavaScriptDebugServer's resume.
1210         (WebCore::InspectorController::stepOverStatementInDebugger):  Call JavaScriptDebugServer's stepOverStatement.
1211         (WebCore::InspectorController::stepIntoStatementInDebugger): Call JavaScriptDebugServer's stepIntoStatement.
1212         (WebCore::InspectorController::stepOutOfFunctionInDebugger): Call JavaScriptDebugServer's stepOutOfFunction.
1213         (WebCore::InspectorController::addBreakpoint): Call JavaScriptDebugServer's addBreakpoint.
1214         (WebCore::InspectorController::removeBreakpoint): Call JavaScriptDebugServer's removeBreakpoint.
1215         (WebCore::InspectorController::didParseSource): Call into the Inspector's JavaScript.
1216         (WebCore::InspectorController::failedToParseSource): Ditto.
1217         (WebCore::InspectorController::didPause): Ditto.
1218         * page/InspectorController.h: Add new functions.
1219
1220 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1221
1222         Implements more debugger APIs on JavaScriptDebugServer and reduces
1223         the number of callbacks to JavaScriptDebugListeners. These changes
1224         will better facilitate debugger optimizations when SquirrelFish merges.
1225
1226         Reviewed by Kevin McCullough.
1227
1228         * page/InspectorController.cpp:
1229         (WebCore::InspectorController::didParseSource): Removed the ExecState.
1230         (WebCore::InspectorController::failedToParseSource): Ditto.
1231         (WebCore::InspectorController::didPause): Added.
1232         * page/InspectorController.h: Changed the JavaScriptDebugListener functions.
1233         * page/JavaScriptDebugListener.h: Removed some callbacks and added didPause.
1234         * page/JavaScriptDebugServer.cpp:
1235         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer): Initialize new data members.
1236         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer): Delete all values of m_breakpoints.
1237         (WebCore::JavaScriptDebugServer::removeListener): Call resume if the last listener was removed.
1238         (WebCore::JavaScriptDebugServer::hasListenersInterestedInPage): Returns true if there are any
1239         global listeners or a listener for the page.
1240         (WebCore::JavaScriptDebugServer::addBreakpoint): Adds and entry to m_breakpoints.
1241         (WebCore::JavaScriptDebugServer::removeBreakpoint): Removes a entry in m_breakpoints.
1242         (WebCore::JavaScriptDebugServer::hasBreakpoint):  Checks if there is a breakpoint for the
1243         sourceID and line.
1244         (WebCore::JavaScriptDebugServer::clearBreakpoints): Removed all breakpoints.
1245         (WebCore::JavaScriptDebugServer::pauseOnNextStatement): Sets m_pauseOnNextStatement to true.
1246         (WebCore::JavaScriptDebugServer::resume): Sets m_paused to false.
1247         (WebCore::JavaScriptDebugServer::stepIntoStatement): Calls resume and sets
1248         m_pauseOnNextStatement to true.
1249         (WebCore::JavaScriptDebugServer::stepOverStatement): Calls resume and sets m_pauseOnExecState to
1250         the current call frame's ExecState.
1251         (WebCore::JavaScriptDebugServer::stepOutOfFunction): Calls resume and sets m_pauseOnExecState to
1252         the current call frame's caller ExecState.
1253         (WebCore::JavaScriptDebugServer::currentCallFrame): Returns m_currentCallFrame if paused.
1254         (WebCore::dispatchDidParseSource): Removed the ExecState argument.
1255         (WebCore::dispatchFailedToParseSource): Ditto.
1256         (WebCore::JavaScriptDebugServer::sourceParsed): Doesn't pass the ExecState to dispatchDidParseSource
1257         or dispatchFailedToParseSource.
1258         (WebCore::dispatchFunctionToListeners):
1259         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Removes all the arguments passed
1260         to the callback.
1261         (WebCore::JavaScriptDebugServer::setJavaScriptPaused): Various overloaded functions
1262         to pause parts of WebCore to prevent JavaScript execution while paused.
1263         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Decides if the debugger should pause based
1264         on the passed in ExecState, source ID and line number. This checks for breakpoints, stepping, etc.
1265         Calls didPause on all the listeners and spins a EventLoop until resume is called.
1266         (WebCore::JavaScriptDebugServer::callEvent): Call pauseIfNeeded.
1267         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
1268         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
1269         (WebCore::JavaScriptDebugServer::exception): Ditto.
1270         * page/JavaScriptDebugServer.h: Added new functions.
1271
1272 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1273
1274         Change View.show to call detach if the parentNode dosen't
1275         match before appending to the passed in parent element.
1276         This also prevents appending to the same parent element
1277         multiple times.
1278
1279         Reviewed by John Sullivan.
1280
1281         * page/inspector/FontView.js:
1282         (WebInspector.FontView.prototype.show): Pass the parent element to View.show.
1283         * page/inspector/ResourceView.js: Optimize the attach method to no append if
1284         there is a parentNode already.
1285         * page/inspector/SourceView.js: Ditto.
1286         * page/inspector/View.js: Call detach before appending if the parentNode
1287         doesn't match the passed in element.
1288
1289 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1290
1291         Optimize the panel attach method to no append if there is a
1292         parentNode already.
1293
1294         Reviewed by Adam Roben.
1295
1296         * page/inspector/Panel.js:
1297         (WebInspector.Panel.prototype.attach): Don't append to main-panels
1298         if the panel element already has a parentNode.
1299
1300 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1301
1302         Add Widget::isPluginView so the JavaScriptDebugServer can identify
1303         plugins that need to be paused during debugging. This will be used
1304         in a upcoming commit.
1305
1306         Reviewed by Kevin McCullough.
1307
1308         * platform/Widget.h: Add isPluginView. Return false.
1309         * plugins/PluginView.h: Add isPluginView. Return true.
1310
1311 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1312
1313         Adds an event loop abstraction to platform. This abstraction will be
1314         used by the JavaScriptDebugServer to implement pausing.
1315
1316         Reviewed by Kevin McCullough.
1317
1318         * platform/EventLoop.h: Added.
1319         (WebCore::EventLoop::EventLoop):
1320         (WebCore::EventLoop::ended): Return m_ended.
1321         * platform/mac/EventLoopMac.mm: Added.
1322         (WebCore::EventLoop::cycle): Call nextEventMatchingMask and then sendEvent.
1323         * platform/win/EventLoopWin.cpp: Added.
1324         (WebCore::EventLoop::cycle): Call GetMessage, TranslateMessage and DispatchMessage.
1325         * WebCore.xcodeproj/project.pbxproj: Add new files.
1326         * WebCore.vcproj/WebCore.vcproj: Ditto.
1327
1328 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1329
1330         Breaks out ObjectPropertiesSection from PropertiesSidebarPane
1331         so it can be used by the Scripts panel's Scope Chain pane.
1332
1333         Rubber-stamped by Adam Roben.
1334
1335         * page/inspector/ObjectPropertiesSection.js: Added.
1336         * page/inspector/PropertiesSidebarPane.js: Moved ObjectPropertiesSection
1337         to ObjectPropertiesSection.js.
1338         * WebCore.vcproj/WebCore.vcproj: Add the new file.
1339         * page/inspector/WebKit.qrc: Ditto.
1340         * page/inspector/inspector.html: Ditto.
1341
1342 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1343
1344         Add a helper function to the Inspector's Array prototype
1345         that will remove any identical values/objects from the array.
1346
1347         Reviewed by Kevin McCullough.
1348
1349         * page/inspector/utilities.js:
1350         (Array.prototype.remove): Iterate over the array and strict
1351         compare to the passed in value. If they match, splice that index
1352         out of the array. If onlyFirst is true, return after the first splice.
1353
1354 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1355
1356         Adds a JavaScriptCallFrame object and JavaScript binding with an IDL.
1357         This object will expose the stack to the Inspector's debugger.
1358
1359         Reviewed by Adam Roben.
1360
1361         * DerivedSources.make: Add JavaScriptCallFrame.
1362         * bindings/js/JSJavaScriptCallFrameCustom.cpp: Added.
1363         (WebCore::JSJavaScriptCallFrame::evaluate): Calls impl evaluate and returns the result.
1364         (WebCore::JSJavaScriptCallFrame::scopeChain): Makes an array of the ScopeChain.
1365         * page/JavaScriptCallFrame.cpp: Added.
1366         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
1367         (WebCore::JavaScriptCallFrame::caller): Returns m_caller.
1368         (WebCore::JavaScriptCallFrame::functionName): Returns the function
1369         name from the ExecState if this is not global code or anonymous.
1370         (WebCore::JavaScriptCallFrame::evaluate): Evaluates a script string
1371         in the scope of the call frame.
1372         * page/JavaScriptCallFrame.h: Added.
1373         (WebCore::JavaScriptCallFrame::create): Call the ctor can return in a PassRefPtr.
1374         (WebCore::JavaScriptCallFrame::invalidate): Sets m_mexec to 0. This prevents a
1375         stale ExecState from being accessed after the lifetime of the ExecState.
1376         (WebCore::JavaScriptCallFrame::isValid): Checks if m_exec is 0.
1377         (WebCore::JavaScriptCallFrame::execState): Returns m_exec.
1378         (WebCore::JavaScriptCallFrame::sourceIdentifier): Returns m_sourceID.
1379         (WebCore::JavaScriptCallFrame::line): Returns m_line.
1380         (WebCore::JavaScriptCallFrame::setLine): Sets m_line.
1381         (WebCore::JavaScriptCallFrame::scopeChain): Returns by reference m_exec->scopeChain().
1382         * page/JavaScriptCallFrame.idl: Added.
1383         * WebCore.xcodeproj/project.pbxproj: Add new files.
1384         * WebCore.vcproj/WebCore.vcproj: Ditto.
1385
1386 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1387
1388         Add a new WebInspector.Object base class that will be used for
1389         a few objects in the Web Inspector to support listeners on any
1390         object. This will help add more abstraction to the Inspector.
1391
1392         Reviewed by Adam Roben.
1393
1394         * page/inspector/Object.js: Added.
1395         (WebInspector.Object): Does nothing.
1396         (WebInspector.Object.prototype.addEventListener): Adds the listener to
1397         the _listeners map by type. Supports a this object argument, for easy
1398         addition of listeners without the need for bind.
1399         (WebInspector.Object.prototype.removeEventListener): Remove the listener
1400         from the _listeners map. If the listener is null and the thisObject was
1401         passed, remove any listener for that thisObject.
1402         (WebInspector.Object.prototype.dispatchEventToListeners): Sends an event
1403         for a type to all listeners for that type. Mimics some of the DOMEvent
1404         methods and properties for the event object passed to the listeners.
1405         * WebCore.vcproj/WebCore.vcproj: Add new files.
1406         * page/inspector/WebKit.qrc: Ditto.
1407         * page/inspector/inspector.html: Ditto.
1408
1409 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1410
1411         Update the view source CSS to better match the new Inspector mock-ups.
1412
1413         Reviewed by Kevin McCullough.
1414
1415         * css/view-source.css:
1416
1417 2008-05-13  John Sullivan  <sullivan@apple.com>
1418
1419         Reviewed by Dan Bernstein and Kevin Decker
1420         
1421         - fixed <rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind
1422
1423         Test: fast/forms/select-type-ahead-list-box-no-selection.html
1424
1425         * html/HTMLSelectElement.cpp:
1426         (WebCore::HTMLSelectElement::typeAheadFind):
1427         When there's no initially-selected element, we were accessing index -1. Check for this
1428         case and start at 0.
1429
1430 2008-05-13  Sam Weinig  <sam@webkit.org>
1431
1432         Reviewed by Dan Bernstein.
1433
1434         Small cleanup to XMLHttpRequest in preparation for Access Control changes.
1435
1436         * xml/XMLHttpRequest.cpp:
1437         (WebCore::XMLHttpRequest::XMLHttpRequest):
1438         (WebCore::XMLHttpRequest::~XMLHttpRequest):
1439         (WebCore::XMLHttpRequest::open):
1440         (WebCore::XMLHttpRequest::send):
1441         (WebCore::XMLHttpRequest::internalAbort):
1442         (WebCore::XMLHttpRequest::processSyncLoadResults):
1443         (WebCore::XMLHttpRequest::didFinishLoading):
1444         (WebCore::XMLHttpRequest::didReceiveResponse):
1445         (WebCore::XMLHttpRequest::didReceiveData):
1446         * xml/XMLHttpRequest.h:
1447
1448 2008-05-13  chris fleizach  <cfleizach@apple.com>
1449
1450         Beth Dakin
1451
1452         <rdar://problem/5701210> VO: If image is missing, VoiceOver does not speak the alternative text.
1453
1454         * page/AccessibilityRenderObject.cpp:
1455         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1456
1457 2008-05-13  chris fleizach  <cfleizach@apple.com>
1458
1459         Beth Dakin
1460
1461         <rdar://problem/5908446> AX: webkit needs to return blockquote information for all AX objects, not just in AXTextMarker info
1462
1463         * page/mac/AccessibilityObjectWrapper.mm:
1464         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1465         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1466
1467 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
1468
1469         Reviewed by John Sullivan.
1470
1471         <rdar://problem/4852077> REGRESSION: The content of the HTML file which is saved as Thai
1472         (ISO 8859-11) disappear.
1473
1474         <rdar://problem/5842597> Thai ISO-8859-11 should be upgraded to Windows-874
1475
1476         Test: fast/encoding/char-decoding.html
1477
1478         * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames):
1479         Register ISO-8859-11, which doesn't have a standard IANA name, despite following
1480         the usual 8859 naming scheme. Also, made TIS-620 map to windows-874-2000 explicitly.
1481
1482 2008-05-13  chris fleizach  <cfleizach@apple.com>
1483
1484         Reviewed by Beth Dakin
1485
1486         <rdar://problem/5471973> Some AXLinks are not getting AXTitles though there is title text
1487
1488         * page/AccessibilityRenderObject.cpp:
1489         (WebCore::AccessibilityRenderObject::title):
1490
1491 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
1492
1493         Reviewed by Eric Seidel.
1494
1495         https://bugs.webkit.org/show_bug.cgi?id=18681
1496         <rdar://problem/5888130> WebKit should not remove BOM characters from content.
1497
1498         We were only trying to match Firefox, and it doesn't do this any more.
1499
1500         Tests: fast/encoding/bom-in-content.html
1501                fast/encoding/bom-in-content-utf16.html
1502
1503         * platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): Skip the BOM if it's
1504         at the start of input stream.
1505
1506         * platform/text/TextCodec.cpp:
1507         * platform/text/TextCodec.h:
1508         * platform/text/TextCodecICU.cpp:
1509         (WebCore::TextCodecICU::decode):
1510         * platform/text/TextCodecUTF16.cpp:
1511         (WebCore::TextCodecUTF16::decode):
1512         * platform/text/mac/TextCodecMac.cpp:
1513         (WebCore::TextCodecMac::decode):
1514         Don't remove the BOM.
1515
1516 2008-05-13  Anders Carlsson  <andersca@apple.com>
1517
1518         Reviewed by Darin.
1519
1520         Don't crash when a document loader is destroyed while an initial caching attempt
1521         is in progress.
1522
1523         * loader/appcache/ApplicationCacheGroup.cpp:
1524         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
1525         Stop loading.
1526         
1527         (WebCore::ApplicationCacheGroup::stopLoading):
1528         New method that stops a cache update.
1529         
1530         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
1531         Delete ourselves here.
1532         
1533         * loader/appcache/ApplicationCacheGroup.h:
1534
1535 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
1536
1537         Reviewed by Darin.
1538
1539         <rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as windows-1254
1540
1541         Match IE and upgrade ISO-8859-9 to windows-1254, which is its strict superset.
1542
1543         Test: fast/encoding/char-decoding.html
1544
1545         * platform/text/TextCodecICU.cpp:
1546         (WebCore::TextCodecICU::registerExtendedEncodingNames): Register the standard name
1547         unconditionally. Previously, we registered windows-949-2000 as a special case that lacked 
1548         an IANA standard name, and got away with not registering GBK because it happened
1549         to be reported by ICU normally earlier than any encoding upgraded to it.
1550
1551 2008-05-13  Tor Arne Vestbø  <tavestbo@trolltech.com>
1552
1553         Reviewed by Simon
1554
1555         Fix QtWebKit build on Qt embedded.
1556
1557         * WebCore.pro:
1558         * platform/FileSystem.h:
1559         * platform/qt/FileSystemQt.cpp:
1560
1561 2008-05-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1562
1563         Reviewed by Simon.
1564
1565         For Gtk/X11 and Qt/X11, use a more extensive plug-ins scan directories set
1566
1567         * plugins/PluginDatabase.cpp:
1568         (WebCore::addMozillaPluginDirectories):
1569         (WebCore::PluginDatabase::isPreferredPluginDirectory):
1570
1571 2008-05-12  Adam Roben  <aroben@apple.com>
1572
1573         Turn on warnings as errors in WebCore.vcproj
1574
1575         Rubberstamped by Anders Carlsson.
1576
1577         * WebCore.vcproj/WebCore.vcproj: Also let VS reformat the file as it
1578         saw fit. The important part is the removal of the WarnAsError="false"
1579         lines.
1580
1581 2008-05-12  Adam Roben  <aroben@apple.com>
1582
1583         Fix a MSVC warning in PluginViewWin
1584
1585         Reviewed by Anders Carlsson.
1586
1587         Test: http/tests/plugins/post-url-file.html
1588
1589         * plugins/win/PluginViewWin.cpp:
1590         (WebCore::PluginView::handlePostReadFile): Added a missing return
1591         statement.
1592
1593 2008-05-12  Adam Roben  <aroben@apple.com>
1594
1595         Fix a MSVC warning in GetEOTHeader
1596
1597         Reviewed by Dan Bernstein.
1598
1599         * platform/graphics/win/GetEOTHeader.cpp:
1600         (WebCore::getEOTHeader): MSVC complains that having a 0-sized array in
1601         a struct is a non-standard extension. I've replaced the 0-sized arrays
1602         with arrays of 1 element, and replaced sizeof(structType) with
1603         offsetof(structType, arrayMember).
1604
1605 2008-05-09  Adam Roben  <aroben@apple.com>
1606
1607         Fix a MSVC warning in TextCodecICU
1608
1609         Reviewed by John Sullivan and Dan Bernstein.
1610
1611         * platform/text/TextCodecICU.cpp:
1612         (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter):
1613         UCNV_SUB_STOP_ON_ILLEGAL is a string literal, so using == with it
1614         doesn't really do what we want. Use strcmp instead. It's OK to pass an
1615         unknown value to strcmp here since 1) UCNV_SUB_STOP_ON_ILLEGAL is only
1616         a single character long so we're not going to ready more than 2 bytes
1617         from oldContext, and 2) we're inside an ASSERT which will cause a
1618         crash anyway if it fails.
1619
1620 2008-05-09  Adam Roben  <aroben@apple.com>
1621
1622         Fix a MSVC warning in CSSComputedStyleDeclaration
1623
1624         Reviewed by Geoff Garen.
1625
1626         * css/CSSComputedStyleDeclaration.cpp:
1627         (WebCore::valueForRepeatRule): Removed some unreachable code.
1628
1629 2008-05-09  Adam Roben  <aroben@apple.com>
1630
1631         Fix a MSVC warning in InlineTextBox
1632
1633         Reviewed by Dan Bernstein.
1634
1635         * rendering/InlineTextBox.cpp:
1636         (WebCore::InlineTextBox::paint): Initialize some variables that MSVC
1637         isn't smart enough to figure out will always be initialized in the
1638         cases where they are used.
1639
1640 2008-05-09  Adam Roben  <aroben@apple.com>
1641
1642         Fix a MSVC warning in Position
1643
1644         Reviewed by Darin Adler.
1645
1646         * dom/Position.cpp:
1647         (WebCore::Position::getInlineBoxAndOffset): Use parentheses to make
1648         the precedence of our expressions explicit.
1649
1650 2008-05-09  Adam Roben  <aroben@apple.com>
1651
1652         Fix a MSVC warning in String
1653
1654         Reviewed by Geoff Garen.
1655
1656         * platform/text/String.cpp:
1657         (WebCore::toIntegralType): Disable a bogus warning about using unary -
1658         on an unsigned value. MSVC isn't smart enough to figure out that
1659         isNegative will always be false when value is unsigned.
1660
1661 2008-05-09  Adam Roben  <aroben@apple.com>
1662
1663         Fix a MSVC warning in XMLHttpRequest
1664
1665         Reviewed by Geoff Garen.
1666
1667         * xml/XMLHttpRequest.cpp:
1668         (WebCore::XMLHttpRequest::XMLHttpRequest): Added static_cast<unsigned
1669         long>.
1670
1671 2008-05-12  Anders Carlsson  <andersca@apple.com>
1672
1673         Reviewed by Adam.
1674
1675         Handle the case when a resource with the same URL as the manifest is listed in the manifest.
1676
1677         * loader/appcache/ApplicationCacheGroup.cpp:
1678         (WebCore::ApplicationCacheGroup::addEntry):
1679
1680 2008-05-12  Sam Weinig  <sam@webkit.org>
1681
1682         Reviewed by Dan Bernstein.
1683
1684         Add parsing of AccessControlHeader and AccessItemRule.
1685
1686         * xml/AccessControlList.cpp:
1687         (WebCore::AccessControlList::parseAccessControlHeader): When multiple http headers are sent
1688         in the response, the engine will concatenate them with commas separating the rules.  This simply
1689         reverses that process by splitting on the commas.
1690         (WebCore::AccessControlList::show):
1691         * xml/AccessControlList.h:
1692         * xml/AccessItem.cpp:
1693         (WebCore::AccessItem::AccessItem):
1694         (WebCore::AccessItem::show):
1695         * xml/AccessItem.h:
1696         (WebCore::AccessItem::isValid):
1697         * xml/AccessItemRule.cpp:
1698         (WebCore::skipLWS):
1699         (WebCore::AccessItemRule::parseAccessItemRule): Parse the rule according to the BNF provided by
1700         the Access Control spec.
1701         (WebCore::AccessItemRule::parsePatternList):
1702         (WebCore::AccessItemRule::invalidate):
1703         (WebCore::AccessItemRule::show):
1704         * xml/AccessItemRule.h:
1705
1706 2008-05-12  David Kilzer  <ddkilzer@apple.com>
1707
1708         Fix logic error in DocLoader::clearPreloads()
1709
1710         Reviewed by Antti.
1711
1712         * loader/DocLoader.cpp:
1713         (WebCore::DocLoader::clearPreloads): Be sure to decrease the preload count for
1714         the cached resource before trying to remove it from the cache.  A non-zero
1715         preload count can prevent the resource from being removed from the cache.
1716
1717 2008-05-12  Anders Carlsson  <andersca@apple.com>
1718
1719         Reviewed by Adam.
1720
1721         Handle empty manifest files without crashing.
1722         
1723         * loader/appcache/ApplicationCacheGroup.cpp:
1724         (WebCore::ApplicationCacheGroup::startLoadingEntry):
1725
1726 2008-05-12  Alp Toker  <alp@nuanti.com>
1727
1728         GTK+ build fix for breakage in r33056. Include limits.h for INT_MAX.
1729
1730         * platform/graphics/FontCache.h:
1731
1732 2008-05-12  Anders Carlsson  <andersca@apple.com>
1733
1734         Reviewed by Adam.
1735
1736         Add user agent to requests when loading/updating the cache.
1737     
1738         * loader/FrameLoader.h:
1739         * loader/appcache/ApplicationCacheGroup.cpp:
1740         (WebCore::ApplicationCacheGroup::update):
1741         (WebCore::ApplicationCacheGroup::startLoadingEntry):
1742
1743 2008-05-12  Anders Carlsson  <andersca@apple.com>
1744
1745         Reviewed by Adam.
1746
1747         Make it possible to perform synchronous loads from the application cache.
1748         
1749         * loader/DocumentLoader.cpp:
1750         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
1751         Factor out code from scheduleApplicationCacheLoad in its own method.
1752         
1753         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1754         Call shouldLoadResourceFromApplicationCache here instead.
1755         
1756         * loader/DocumentLoader.h:
1757         
1758         * loader/FrameLoader.cpp:
1759         (WebCore::FrameLoader::loadResourceSynchronously):
1760         Call shouldLoadResourceFromApplicationCache.
1761
1762 2008-05-12  Dan Bernstein  <mitz@apple.com>
1763
1764         Reviewed by Ada Chan and Sam Weinig.
1765
1766         - WebCore changes for https://bugs.webkit.org/show_bug.cgi?id=17097
1767           <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
1768
1769         Added a way for clients to let the cache know that they no longer need
1770         font data, which lets the cache release it. Changed clients to track
1771         most of the font data they get from the cache so that they can later
1772         release it. Some instances of font data -- namely, those used for system
1773         font fallback -- are still not tracked and will therefore remain in the
1774         cache indefinitely.
1775
1776         * WebCore.base.exp: Added exports for WebCoreStatistics in WebKit.
1777
1778         * platform/graphics/Font.cpp:
1779         (WebCore::Font::Font): Changed to use FontFallbackList::create().
1780         (WebCore::Font::update): Ditto.
1781
1782         * platform/graphics/FontCache.cpp:
1783         (WebCore::FontCache::getCachedFontData): Added code to track the number
1784         of times a SimpleFontData instance has been requested from the cache,
1785         remove requested instances from the inactive list, and purge inactive
1786         font data if the inactive list has grown above its maximum allowed size.
1787         (WebCore::FontCache::releaseFontData): Added. Called by clients to let
1788         the cache know that they no longer need the font data. Adds the font
1789         data to the inactive list if the last client has released it.
1790         (WebCore::FontCache::purgeInactiveFontData): Added. Removes inactive
1791         font data from the cache (and the inactive list).
1792         (WebCore::FontCache::fontDataCount): Added to provide statistics.
1793         (WebCore::FontCache::inactiveFontDataCount): Ditto.
1794
1795         * platform/graphics/FontCache.h:
1796
1797         * platform/graphics/FontData.h:
1798         (WebCore::FontData::FontData): Added a member variable to store the
1799         highest glyph page tree level in which there is a node for this FontData.
1800         This is used to limit the depth of the search when pruning glyph page
1801         trees.
1802         (WebCore::FontData::setMaxGlyphPageTreeLevel): Added this accessor.
1803         (WebCore::FontData::maxGlyphPageTreeLevel): Ditto.
1804
1805         * platform/graphics/FontFallbackList.cpp:
1806         (WebCore::FontFallbackList::FontFallbackList): Changed to start with a
1807         refcount of 1.
1808         (WebCore::FontFallbackList::invalidate): Added a call to
1809         releaseFontData().
1810         (WebCore::FontFallbackList::releaseFontData): Added. Lets the font cache
1811         know that we no longer need the FontData in our font list.
1812         (WebCore::FontFallbackList::fontDataAt): Changed to record in the font
1813         list whether the font data is a custom font data or not.
1814         (WebCore::FontFallbackList::setPlatformFont): Ditto.
1815
1816         * platform/graphics/FontFallbackList.h:
1817         (WebCore::FontFallbackList::create): Added and made the constructor
1818         private.
1819         (WebCore::FontFallbackList::~FontFallbackList): Added a call to
1820         releaseFontData().
1821
1822         * platform/graphics/GlyphPageTreeNode.cpp:
1823         (WebCore::GlyphPageTreeNode::treeGlyphPageCount): Added to provide
1824         statistics.
1825         (WebCore::GlyphPageTreeNode::pageCount): Ditto.
1826
1827         (WebCore::GlyphPageTreeNode::pruneTreeFontData): Added.
1828         (WebCore::GlyphPageTreeNode::getChild): Added code to update the font
1829         data's maximum glyph page tree level.
1830         (WebCore::GlyphPageTreeNode::pruneFontData): Added.
1831
1832         * platform/graphics/GlyphPageTreeNode.h:
1833
1834         * platform/graphics/SimpleFontData.cpp:
1835         (WebCore::SimpleFontData::~SimpleFontData): Added code to let the font
1836         cache know that we no longer need the small caps font data and to prune
1837         the glyph page trees.
1838
1839 2008-05-12  Anders Carlsson  <andersca@apple.com>
1840
1841         Reviewed by Alexey.
1842
1843         Add ApplicationCacheStorage::empty() method which will empty
1844         the application cache database.
1845         
1846         * WebCore.base.exp:
1847         * loader/appcache/ApplicationCache.cpp:
1848         (WebCore::ApplicationCache::clearStorageID):
1849         * loader/appcache/ApplicationCache.h:
1850         * loader/appcache/ApplicationCacheGroup.cpp:
1851         (WebCore::ApplicationCacheGroup::clearStorageID):
1852         * loader/appcache/ApplicationCacheGroup.h:
1853         * loader/appcache/ApplicationCacheResource.h:
1854         (WebCore::ApplicationCacheResource::clearStorageID):
1855         * loader/appcache/ApplicationCacheStorage.cpp:
1856         (WebCore::ApplicationCacheStorage::empty):
1857         * loader/appcache/ApplicationCacheStorage.h:
1858
1859 2008-05-12  Anders Carlsson  <andersca@apple.com>
1860
1861         Reviewed by John.
1862
1863         Don't throw an exception if the string passed in is an invalid URL.
1864         
1865         * loader/appcache/DOMApplicationCache.cpp:
1866         (WebCore::DOMApplicationCache::remove):
1867
1868 2008-05-12  Anders Carlsson  <andersca@apple.com>
1869
1870         Reviewed by Mitz.
1871
1872         Add the variable enums for getting the input vtables.
1873         
1874         * bridge/npapi.h:
1875
1876 2008-05-12  Adam Roben  <aroben@apple.com>
1877
1878         Windows build fix
1879
1880         * WebCorePrefix.cpp: Touched this so that it will rebuild now that
1881         ENABLE_CROSS_DOCUMENT_MESSAGING has been removed.
1882
1883 2008-05-12  Alexey Proskuryakov  <ap@webkit.org>
1884
1885         Roll out recent  threading changes (r32807, r32810, r32819, r32822) to simplify
1886         SquirrelFish merging.
1887
1888         * bindings/js/GCController.cpp:
1889         (WebCore::collect):
1890         (WebCore::GCController::gcTimerFired):
1891         (WebCore::GCController::garbageCollectNow):
1892         * bindings/js/JSAudioConstructor.cpp:
1893         (WebCore::JSAudioConstructor::JSAudioConstructor):
1894         * bindings/js/JSCSSRuleCustom.cpp:
1895         (WebCore::toJS):
1896         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1897         (WebCore::JSCSSStyleDeclaration::nameGetter):
1898         * bindings/js/JSCSSValueCustom.cpp:
1899         (WebCore::toJS):
1900         * bindings/js/JSCanvasPixelArrayCustom.cpp:
1901         (WebCore::JSCanvasPixelArray::indexGetter):
1902         (WebCore::toJS):
1903         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1904         (WebCore::toJS):
1905         * bindings/js/JSClipboardCustom.cpp:
1906         (WebCore::JSClipboard::types):
1907         (WebCore::JSClipboard::getData):
1908         * bindings/js/JSCustomXPathNSResolver.cpp:
1909         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1910         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1911         (WebCore::JSDOMApplicationCache::addEventListener):
1912         (WebCore::JSDOMApplicationCache::removeEventListener):
1913         (WebCore::JSDOMApplicationCache::setOnchecking):
1914         (WebCore::JSDOMApplicationCache::setOnerror):
1915         (WebCore::JSDOMApplicationCache::setOnnoupdate):
1916         (WebCore::JSDOMApplicationCache::setOndownloading):
1917         (WebCore::JSDOMApplicationCache::setOnprogress):
1918         (WebCore::JSDOMApplicationCache::setOnupdateready):
1919         (WebCore::JSDOMApplicationCache::setOncached):
1920         * bindings/js/JSDOMWindowBase.cpp:
1921         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1922         (WebCore::JSDOMWindowBase::getValueProperty):
1923         (WebCore::JSDOMWindowBase::setListener):
1924         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
1925         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
1926         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
1927         (WebCore::windowProtoFuncAToB):
1928         (WebCore::windowProtoFuncBToA):
1929         (WebCore::windowProtoFuncSetTimeout):
1930         (WebCore::windowProtoFuncSetInterval):
1931         (WebCore::windowProtoFuncAddEventListener):
1932         * bindings/js/JSDOMWindowBase.h:
1933         * bindings/js/JSDOMWindowShell.cpp:
1934         * bindings/js/JSDOMWindowShell.h:
1935         * bindings/js/JSDocumentCustom.cpp:
1936         (WebCore::toJS):
1937         * bindings/js/JSEventCustom.cpp:
1938         (WebCore::toJS):
1939         * bindings/js/JSEventTargetBase.cpp:
1940         (WebCore::jsEventTargetAddEventListener):
1941         * bindings/js/JSEventTargetBase.h:
1942         (WebCore::JSEventTargetPrototype::self):
1943         * bindings/js/JSEventTargetNode.cpp:
1944         (WebCore::JSEventTargetNode::setListener):
1945         * bindings/js/JSHTMLCollectionCustom.cpp:
1946         (WebCore::getNamedItems):
1947         (WebCore::toJS):
1948         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1949         (WebCore::createJSHTMLWrapper):
1950         * bindings/js/JSHTMLFormElementCustom.cpp:
1951         (WebCore::JSHTMLFormElement::nameGetter):
1952         * bindings/js/JSHTMLInputElementBase.cpp:
1953         (WebCore::JSHTMLInputElementBase::getValueProperty):
1954         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1955         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
1956         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1957         (WebCore::JSHTMLOptionsCollection::length):
1958         * bindings/js/JSInspectedObjectWrapper.cpp:
1959         (WebCore::JSInspectedObjectWrapper::wrap):
1960         * bindings/js/JSInspectorCallbackWrapper.cpp:
1961         (WebCore::JSInspectorCallbackWrapper::wrap):
1962         * bindings/js/JSLocationCustom.cpp:
1963         (WebCore::JSLocation::toString):
1964         * bindings/js/JSNamedNodesCollection.cpp:
1965         (WebCore::JSNamedNodesCollection::lengthGetter):
1966         * bindings/js/JSNavigatorCustom.cpp:
1967         (WebCore::JSNavigator::appVersion):
1968         * bindings/js/JSNodeCustom.cpp:
1969         (WebCore::toJS):
1970         * bindings/js/JSNodeFilterCustom.cpp:
1971         (WebCore::JSNodeFilter::acceptNode):
1972         * bindings/js/JSRGBColor.cpp:
1973         (WebCore::getJSRGBColor):
1974         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1975         (WebCore::JSSQLResultSetRowList::item):
1976         * bindings/js/JSSVGElementWrapperFactory.cpp:
1977         (WebCore::createJSSVGWrapper):
1978         * bindings/js/JSSVGLazyEventListener.cpp:
1979         (WebCore::JSSVGLazyEventListener::eventParameterName):
1980         * bindings/js/JSStorageCustom.cpp:
1981         (WebCore::JSStorage::nameGetter):
1982         * bindings/js/JSStyleSheetCustom.cpp:
1983         (WebCore::toJS):
1984         * bindings/js/JSXMLHttpRequestConstructor.cpp:
1985         (WebCore::JSXMLHttpRequestConstructor::construct):
1986         * bindings/js/JSXMLHttpRequestCustom.cpp:
1987         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
1988         (WebCore::JSXMLHttpRequest::setOnload):
1989         (WebCore::JSXMLHttpRequest::setOnprogress):
1990         (WebCore::JSXMLHttpRequest::getResponseHeader):
1991         (WebCore::JSXMLHttpRequest::addEventListener):
1992         (WebCore::JSXMLHttpRequest::removeEventListener):
1993         * bindings/js/JSXSLTProcessorConstructor.cpp:
1994         (WebCore::JSXSLTProcessorConstructor::construct):
1995         * bindings/js/JSXSLTProcessorCustom.cpp:
1996         (WebCore::JSXSLTProcessor::getParameter):
1997         * bindings/js/kjs_binding.cpp:
1998         (WebCore::jsStringOrNull):
1999         (WebCore::jsOwnedStringOrNull):
2000         (WebCore::jsStringOrUndefined):
2001         (WebCore::jsStringOrFalse):
2002         (WebCore::nonCachingStaticFunctionGetter):
2003         (WebCore::objectToStringFunctionGetter):
2004         * bindings/js/kjs_binding.h:
2005         (WebCore::DOMObject::DOMObject):
2006         (WebCore::cacheDOMObject):
2007         (WebCore::cacheSVGDOMObject):
2008         * bindings/js/kjs_events.cpp:
2009         (WebCore::JSLazyEventListener::eventParameterName):
2010         (WebCore::JSLazyEventListener::parseCode):
2011         * bindings/js/kjs_html.cpp:
2012         (WebCore::getRuntimeObject):
2013         * bindings/scripts/CodeGeneratorJS.pm:
2014         * bridge/c/c_instance.cpp:
2015         (KJS::Bindings::CInstance::defaultValue):
2016         (KJS::Bindings::CInstance::stringValue):
2017         (KJS::Bindings::CInstance::numberValue):
2018         (KJS::Bindings::CInstance::valueOf):
2019         * bridge/c/c_instance.h:
2020         * bridge/c/c_utility.cpp:
2021         (KJS::Bindings::convertNPVariantToValue):
2022         * bridge/jni/jni_instance.cpp:
2023         (JavaInstance::stringValue):
2024         (JavaInstance::numberValue):
2025         (JavaInstance::invokeMethod):
2026         (JavaInstance::defaultValue):
2027         (JavaInstance::valueOf):
2028         * bridge/jni/jni_instance.h:
2029         * bridge/jni/jni_jsobject.h:
2030         * bridge/jni/jni_jsobject.mm:
2031         (JavaJSObject::call):
2032         (JavaJSObject::setMember):
2033         (JavaJSObject::setSlot):
2034         (JavaJSObject::convertJObjectToValue):
2035         (JavaJSObject::getListFromJArray):
2036         * bridge/jni/jni_objc.mm:
2037         (KJS::Bindings::dispatchJNICall):
2038         * bridge/jni/jni_runtime.cpp:
2039         (JavaArray::convertJObjectToArray):
2040         (JavaField::dispatchValueFromInstance):
2041         (JavaField::valueFromInstance):
2042         (JavaField::dispatchSetValueToInstance):
2043         (JavaArray::valueAt):
2044         * bridge/jni/jni_utility.h:
2045         * bridge/objc/objc_class.mm:
2046         (KJS::Bindings::ObjcClass::fallbackObject):
2047         * bridge/objc/objc_instance.h:
2048         * bridge/objc/objc_instance.mm:
2049         (ObjcInstance::defaultValue):
2050         (ObjcInstance::stringValue):
2051         (ObjcInstance::numberValue):
2052         (ObjcInstance::valueOf):
2053         * bridge/objc/objc_utility.h:
2054         * bridge/objc/objc_utility.mm:
2055         (KJS::Bindings::convertNSStringToString):
2056         (KJS::Bindings::convertObjcValueToValue):
2057         * bridge/qt/qt_class.cpp:
2058         (KJS::Bindings::QtClass::fallbackObject):
2059         * bridge/qt/qt_instance.cpp:
2060         (KJS::Bindings::QtRuntimeObjectImp::construct):
2061         (KJS::Bindings::QtInstance::getRuntimeObject):
2062         (KJS::Bindings::QtInstance::invokeDefaultMethod):
2063         (KJS::Bindings::QtInstance::defaultValue):
2064         (KJS::Bindings::QtInstance::stringValue):
2065         (KJS::Bindings::QtInstance::numberValue):
2066         (KJS::Bindings::QtInstance::valueOf):
2067         * bridge/qt/qt_instance.h:
2068         * bridge/qt/qt_runtime.cpp:
2069         (KJS::Bindings::convertValueToQVariant):
2070         (KJS::Bindings::convertQVariantToValue):
2071         (KJS::Bindings::QtRuntimeMetaMethod::lengthGetter):
2072         (KJS::Bindings::QtRuntimeMetaMethod::connectGetter):
2073         (KJS::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2074         (KJS::Bindings::QtRuntimeConnectionMethod::lengthGetter):
2075         (KJS::Bindings::QtConnectionObject::execute):
2076         * bridge/runtime.cpp:
2077         (KJS::Bindings::Instance::createRuntimeObject):
2078         * bridge/runtime.h:
2079         (KJS::Bindings::Instance::valueOf):
2080         * bridge/runtime_array.cpp:
2081         (RuntimeArray::lengthGetter):
2082         * bridge/runtime_method.cpp:
2083         (RuntimeMethod::lengthGetter):
2084         * bridge/runtime_object.cpp:
2085         (RuntimeObjectImp::RuntimeObjectImp):
2086         (RuntimeObjectImp::methodGetter):
2087         (RuntimeObjectImp::defaultValue):
2088         * xml/XMLHttpRequest.cpp:
2089         (WebCore::XMLHttpRequest::dropProtection):
2090
2091 2008-05-11  Robin Dunn  <robin@alldunn.com>
2092
2093         Reviewed by Kevin Ollivier.
2094
2095         Since wx popup menus dismiss themselves when an item is selected we need to
2096         call hidePopup so webkit's internal state is correct.
2097         
2098         https://bugs.webkit.org/show_bug.cgi?id=19000
2099
2100         * platform/wx/PopupMenuWx.cpp:
2101         (WebCore::PopupMenu::OnMenuItemSelected):
2102         (WebCore::PopupMenu::hide):
2103
2104 2008-05-11  Sam Weinig  <sam@webkit.org>
2105
2106         Reviewed by Mark Rowe.
2107
2108         Move some generic parsing functions into a new ParserUtilities header so that
2109         they can be used for non-SVG builds too.
2110
2111         * WebCore.vcproj/WebCore.vcproj:
2112         * WebCore.xcodeproj/project.pbxproj:
2113         * platform/text/ParserUtilities.h: Added.
2114         (WebCore::skipString):
2115         * svg/SVGParserUtilities.h:
2116         (WebCore::isWhitespace):
2117         (WebCore::skipOptionalSpaces):
2118         (WebCore::skipOptionalSpacesOrDelimiter):
2119
2120 2008-05-11  Sam Weinig  <sam@webkit.org>
2121
2122         Reviewed by Dan Bernstein.
2123
2124         Add scaffolding for the implementation of Access Control for Cross-site Requests. 
2125
2126         * GNUmakefile.am:
2127         * WebCore.pro:
2128         * WebCore.vcproj/WebCore.vcproj:
2129         * WebCore.xcodeproj/project.pbxproj:
2130         * WebCoreSources.bkl:
2131         * xml/AccessControlList.cpp: Added.
2132         (WebCore::AccessControlList::AccessControlList):
2133         (WebCore::AccessControlList::~AccessControlList):
2134         (WebCore::AccessControlList::parseAccessControlHeader):
2135         (WebCore::AccessControlList::checkOrigin):
2136         * xml/AccessControlList.h: Added.
2137         * xml/AccessItem.cpp: Added.
2138         (WebCore::AccessItem::AccessItem):
2139         (WebCore::AccessItem::parseAccessItem):
2140         (WebCore::AccessItem::matches):
2141         * xml/AccessItem.h: Added.
2142         * xml/AccessItemRule.cpp: Added.
2143         (WebCore::AccessItemRule::AccessItemRule):
2144         (WebCore::AccessItemRule::parseAccessItemRule):
2145         * xml/AccessItemRule.h: Added.
2146
2147 2008-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
2148
2149         Debug build fix.
2150
2151         * loader/appcache/ApplicationCache.cpp: Include stdio.h
2152         as we are using printf in ApplicationCache::dump().
2153
2154 2008-05-10  Dan Bernstein  <mitz@apple.com>
2155
2156         Reviewed by Jessica Kahn.
2157
2158         - add a copy assignment operator to FontPlatformData on Mac to properly
2159           retain the m_font data member.
2160
2161         * platform/graphics/mac/FontPlatformData.h:
2162         * platform/graphics/mac/FontPlatformDataMac.mm:
2163         (WebCore::FontPlatformData::FontPlatformData):
2164         (WebCore::~FontPlatformData):
2165         (WebCore::FontPlatformData::operator=):
2166         (WebCore::FontPlatformData::setFont):
2167
2168 2008-05-10  Adele Peterson  <adele@apple.com>
2169
2170         Reviewed by Tim Hatcher.
2171
2172         Fix crash for WebKit clients that don't set a group name for the WebView/Page.
2173
2174         * page/PageGroup.cpp: (WebCore::PageGroup::PageGroup): Instead of adding the Page directly to the group,
2175           call the addPage method, since it does extra work initializing m_localStorage.
2176
2177 2008-05-09  Sam Weinig  <sam@webkit.org>
2178
2179         Reviewed by Mark Rowe.
2180
2181         Fix for https://bugs.webkit.org/show_bug.cgi?id=18958
2182         NULL pointer dereference in NamedAttrMap::setNamedItem
2183
2184         Test: fast/dom/NamedNodeMap-setNamedItem-crash.html
2185
2186         * dom/NamedAttrMap.cpp:
2187         (WebCore::NamedAttrMap::setNamedItem): Null check the argument.
2188
2189 2008-05-09  Kevin McCullough  <kmccullough@apple.com>
2190
2191         Build fix.
2192
2193         * page/Console.cpp:
2194         (WebCore::Console::profile):
2195
2196 2008-05-09  Sam Weinig  <sam@webkit.org>
2197
2198         Rubber-stamped by Mark Rowe.
2199
2200         Remove the ENABLE_CROSS_DOCUMENT_MESSAGING #ifdefs.
2201
2202         * Configurations/WebCore.xcconfig:
2203         * WebCore.vcproj/WebCore.vcproj:
2204         * WebCore.vcproj/build-generated-files.sh:
2205         * bindings/js/JSDOMWindowCustom.cpp:
2206         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2207         (WebCore::JSDOMWindow::postMessage):
2208         * bindings/js/JSEventCustom.cpp:
2209         (WebCore::toJS):
2210         * bindings/objc/DOMEvents.mm:
2211         (+[DOMEvent _wrapEvent:WebCore::]):
2212         * dom/Document.cpp:
2213         (WebCore::Document::createEvent):
2214         * dom/Event.cpp:
2215         (WebCore::Event::isMessageEvent):
2216         * dom/Event.h:
2217         * dom/MessageEvent.cpp:
2218         * dom/MessageEvent.h:
2219         * dom/MessageEvent.idl:
2220         * page/DOMWindow.cpp:
2221         (WebCore::DOMWindow::postMessageTimerFired):
2222         * page/DOMWindow.h:
2223         * page/DOMWindow.idl:
2224
2225 2008-05-09  Adam Barth  <abarth-webkit@adambarth.com>
2226
2227         Reviewed by Sam Weinig.
2228
2229         https://bugs.webkit.org/show_bug.cgi?id=18771
2230
2231         Make postMessage generate an event on the window instead of the
2232         document.
2233
2234         Test: http/tests/messaging/cross-domain-message-event-dispatch.html
2235
2236         * dom/EventTargetNode.cpp:
2237         (WebCore::EventTargetNode::dispatchWindowEvent):
2238         * dom/EventTargetNode.h:
2239         * page/DOMWindow.cpp:
2240         (WebCore::DOMWindow::postMessageTimerFired):
2241
2242 2008-05-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
2243
2244         Reviewed by Simon.
2245
2246         Replaced all instances of qDebug() with LOG(Media, ...)
2247         in MediaPlayerPrivatePhonon.
2248
2249         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2250         (WebCore::MediaPlayerPrivate::updateStates):
2251
2252 2008-05-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
2253
2254         Reviewed by Simon
2255
2256         Fix the Qt/Mac build.
2257
2258         * platform/qt/FileSystemQt.cpp:
2259
2260 2008-05-08  Sam Weinig  <sam@webkit.org>
2261
2262         Reviewed by Anders Carlsson.
2263
2264         Rename the XMLHttpRequestState enum values to match the spec.
2265
2266         * xml/XMLHttpRequest.cpp:
2267         (WebCore::XMLHttpRequest::responseXML):
2268         (WebCore::XMLHttpRequest::XMLHttpRequest):
2269         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2270         (WebCore::XMLHttpRequest::open):
2271         (WebCore::XMLHttpRequest::send):
2272         (WebCore::XMLHttpRequest::abort):
2273         (WebCore::XMLHttpRequest::setRequestHeader):
2274         (WebCore::XMLHttpRequest::getAllResponseHeaders):
2275         (WebCore::XMLHttpRequest::getResponseHeader):
2276         (WebCore::XMLHttpRequest::status):
2277         (WebCore::XMLHttpRequest::statusText):
2278         (WebCore::XMLHttpRequest::processSyncLoadResults):
2279         (WebCore::XMLHttpRequest::didFinishLoading):
2280         (WebCore::XMLHttpRequest::didReceiveData):
2281         * xml/XMLHttpRequest.h:
2282         (WebCore::):
2283
2284 2008-05-08  Dan Bernstein  <mitz@apple.com>
2285
2286         Reviewed by Mark Rowe.
2287
2288         - fix https://bugs.webkit.org/show_bug.cgi?id=18818
2289           <rdar://problem/5901544> REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)
2290
2291         Test: fast/css/first-letter-float-after-float.html
2292
2293         * rendering/RenderBlock.cpp:
2294         (WebCore::RenderBlock::updateFirstLetter): Changed to add the first
2295         letter container right before the rest of the text it is taken from,
2296         instead of at the beginning of the block.
2297
2298 2008-05-08  Chris Fleizach  <cfleizach@apple.com>
2299
2300         Reviewed by Darin Adler.
2301
2302         <rdar://problem/5921046> AX: list box options have wrong AXPosition
2303
2304         * page/AccessibilityObject.cpp:
2305         (WebCore::AccessibilityObject::documentFrameView):
2306         * page/AccessibilityObject.h:
2307
2308 2008-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
2309
2310         Reviewed by Eric.
2311
2312         Bug 18916: make_names.pl --factory needs to support custom c++ guard
2313
2314         Add --guardFactoryWith to handle the cpp guard around generated factories.
2315
2316         * DerivedSources.make: Set the guardFactoryWith variable for SVG factory.
2317         * GNUmakefile.am: Ditto.
2318         * WebCore.pro: Ditto.
2319         * dom/make_names.pl: Add guardFactoryWith option.
2320
2321 2008-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
2322
2323         Reviewed by Adam Roben.
2324
2325         wx & Gtk build fix.
2326
2327         Should also fix the cURL backend for the Windows port.
2328
2329         * WebCore.vcproj/WebCore.vcproj: Add FormDataStreamCurl information.
2330         * platform/network/curl/FormDataStreamCurl.h: Include stdio.h which
2331         fixes the build on some machine.
2332
2333         * webcore-wx.bkl: Add FormDataStreamCurl.cpp.
2334
2335 2008-05-08  Timothy Hatcher  <timothy@apple.com>
2336
2337         Fixes the bug where the Web Inspector could not
2338         find any localization strings.
2339
2340         Reviewed by Mark Rowe.
2341
2342         * WebCore.xcodeproj/project.pbxproj: Add the localizedStrings.js
2343         file to the WebCore Copy Resources phase. Also removes an idl from
2344         the Copy Resources phase.
2345
2346 2008-05-08  Dan Bernstein  <mitz@apple.com>
2347
2348         Reviewed by Adam Roben.
2349
2350         - fix <rdar://problem/5697957> "No recent searches" label in a narrow search field's history popup is truncated
2351
2352         * platform/win/PopupMenuWin.cpp:
2353         (WebCore::PopupMenu::calculatePositionAndSize): Changed to use a bold
2354         font for measuring labels.
2355
2356 2008-05-08  Dan Bernstein  <mitz@apple.com>
2357
2358         Reviewed by Geoffrey Garen.
2359
2360         - cross-platform fix for http://bugs.webkit.org/show_bug.cgi?id=17590 
2361           ASSERTION FAILED: subject in jsRegExpExecute()
2362
2363         * page/Frame.cpp:
2364         (WebCore::Frame::matchLabelsAgainstElement):
2365
2366 2008-05-08  Holger Hans Peter Freyther  <zecke@selfish.org>
2367
2368         Reviewed by Simon.
2369
2370         Simple ImageBuffer::image implementation.
2371
2372         In contrast to cg and cairo we do not use a special BitmapImage because
2373         the ownership of the FrameData inside the BitmapImage is a bit backward
2374         (actually owned by the ImageDecoderQt...). Further work is needed for image
2375         and pixmap handling in the qt port...
2376
2377         * WebCore.pro:
2378         * platform/graphics/ImageBuffer.h:
2379         * platform/graphics/qt/ImageBufferQt.cpp:
2380         (WebCore::ImageBuffer::image):
2381         * platform/graphics/qt/ImageQt.cpp:
2382         * platform/graphics/qt/StillImageQt.cpp: Added.
2383         (WebCore::StillImage::StillImage):
2384         (WebCore::StillImage::size):
2385         (WebCore::StillImage::getPixmap):
2386         (WebCore::StillImage::draw):
2387         * platform/graphics/qt/StillImageQt.h: Added.
2388
2389 2008-05-08  Holger Hans Peter Freyther  <zecke@selfish.org>
2390
2391         Reviewed by Simon.
2392
2393         Update the WebKit.qrc of the inspector to be functional again
2394
2395         * page/inspector/WebKit.qrc:
2396
2397 2008-05-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
2398
2399         Reviewed by Simon
2400
2401         Fix the Qt/Mac build.
2402
2403         * platform/FileSystem.h:
2404
2405 2008-05-08  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2406
2407         Reviewed by Simon.
2408
2409         Use native Windows library handling (instead of QLibrary) 
2410         for Qt/Win32's PlatformModule.
2411
2412         * platform/FileSystem.h:
2413         (WebCore::PlatformModuleVersion::PlatformModuleVersion):
2414         * platform/qt/FileSystemQt.cpp:
2415         (WebCore::unloadModule):
2416
2417 2008-05-08  Simon Hausmann  <hausmann@webkit.org>
2418
2419         Reviewed and found by Holger.
2420
2421         Include .css in the list of extensions for text/css. Fixes
2422         fast/loader/local-css-allowed-in-strict-mode.html.
2423
2424         * platform/qt/MIMETypeRegistryQt.cpp:
2425
2426 2008-05-08  Simon Hausmann  <hausmann@webkit.org>
2427
2428         Fix the Qt and Wx build when compiling without offline app support.
2429
2430         * loader/FrameLoader.cpp:
2431         (WebCore::FrameLoader::canCachePage):
2432
2433 2008-05-07  Sam Weinig  <sam@webkit.org>
2434
2435         Reviewed by Adele Peterson
2436
2437         Update MessageEvent to match the latest version of the HTML5 spec,
2438         adding the lastEventId attribute.
2439
2440         * dom/MessageEvent.cpp:
2441         (WebCore::MessageEvent::MessageEvent):
2442         (WebCore::MessageEvent::initMessageEvent):
2443         * dom/MessageEvent.h:
2444         (WebCore::MessageEvent::lastEventId):
2445         * dom/MessageEvent.idl:
2446         * page/DOMWindow.cpp:
2447         (WebCore::DOMWindow::postMessage):
2448
2449 2008-05-07  Stephanie Lewis <slewis@apple.com>
2450
2451         Reviewed by Maciej.
2452
2453         remove non-functioning code.  If onunload should be fired from these nodes then
2454         a WindowEventListener needs to be set.  However, Firefox and IE also do not
2455         fire onunload events for these cases.
2456
2457         Test: fast/events/onunload-not-on-body.html 
2458         
2459         * html/HTMLFrameElementBase.cpp:
2460         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
2461         * html/HTMLObjectElement.cpp
2462         (WebCore::HTMLObjectElement::parseMappedAttribute):
2463
2464 2008-05-07  Dan Bernstein  <mitz@apple.com>
2465
2466         Reviewed by John Sullivan.
2467
2468         - fix https://bugs.webkit.org/show_bug.cgi?id=18909
2469           <rdar://problem/5914165> REGRESSION (r31872-r31878): Viewed photos not closing completely at indycar.com
2470
2471         Test: fast/dynamic/positioned-movement-with-positioned-children.html
2472
2473         * rendering/RenderBlock.cpp:
2474         (WebCore::RenderBlock::layoutOnlyPositionedObjects): Cover the case of
2475         a positioned object that has only moved and has only positioned children
2476         that have changed.
2477         * rendering/RenderObject.h:
2478         (WebCore::RenderObject::needsPositionedMovementLayout): Added this
2479         accessor.
2480
2481 2008-05-07  Anders Carlsson  <andersca@apple.com>
2482
2483         Reviewed by John.
2484
2485         When no document loaders are associated with an application cache group,
2486         release the reference to the newest cache group. This prevents reference cycles.
2487         
2488         * loader/appcache/ApplicationCacheGroup.cpp:
2489         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
2490         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
2491         (WebCore::ApplicationCacheGroup::cacheDestroyed):
2492         * loader/appcache/ApplicationCacheGroup.h:
2493         
2494         * loader/appcache/ApplicationCacheStorage.cpp:
2495         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2496         Return early if the datbase wasn't open.
2497         
2498         (WebCore::ApplicationCacheStorage::loadCache):
2499         Add error.
2500
2501 2008-05-07  Anders Carlsson  <andersca@apple.com>
2502
2503         Reviewed by Adam.
2504
2505         Don't put pages with an application cache in the BF cache.
2506         
2507         * loader/FrameLoader.cpp:
2508         (WebCore::FrameLoader::canCachePage):
2509
2510 2008-05-07  Justin Garcia  <justin.garcia@apple.com>
2511
2512         Reviewed by John Sullivan.
2513
2514         <rdar://problem/5666354> Crashes in Mail at WebCore::RemoveNodeCommand::doApply
2515         
2516         When a single tab or series of tabs was copied, we weren't putting them into a 
2517         tab span.  On Paste, we would be given a text node with a single tab or series
2518         of tabs in it, and we would crash when inserting it at the start of a block
2519         (where that kind of text becomes completely unrendered).
2520
2521         * editing/ReplaceSelectionCommand.cpp:
2522         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Clean
2523         up correctly and early return if we removed everything that was inserted.
2524         * editing/markup.cpp:
2525         (WebCore::createMarkup):  Include the tab span when the only thing copied
2526         was a tab or a series of tabs.
2527
2528 2008-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
2529
2530         Reviewed by Adam Roben.
2531
2532         wx & Gtk build fix.
2533
2534         * platform/network/curl/FormDataStreamCurl.cpp: Added stdint.h include. We need to define
2535         __STDC_LIMIT_MACROS to have SIZE_MAX exported.
2536         * platform/network/curl/FormDataStreamCurl.h: Removed cstdint include (replaced by stdint.h)
2537         as it is not present on the build bots.
2538         * plugins/gtk/PluginDatabaseGtk.cpp: Added missing #endif.
2539
2540 2008-05-07  David Kilzer  <ddkilzer@apple.com>
2541
2542         Bug 18900: Password field has focus but can't type text (i.rememberthemilk.com)
2543         <https://bugs.webkit.org/show_bug.cgi?id=18900>
2544         <rdar://problem/5912383>
2545
2546         Original patch by Aaron Golden and Tim Omernick.  Reviewed by Adele.
2547
2548         Test: fast/forms/textfield-to-password-on-focus.html
2549
2550         * html/HTMLInputElement.cpp:
2551         (WebCore::HTMLInputElement::setInputType): If the current node has
2552         focus, call updateFocusAppearance() to make sure its state is correct
2553         after changing its type.
2554
2555 2008-05-07  Chris Fleizach  <cfleizach@apple.com>
2556
2557         Reviewed by Alice Liu
2558
2559         <rdar://problem/4867889> REGRESSION: "Choose File.." buttons are exposed as AXGroup instead of AXButton
2560
2561         * page/AccessibilityObject.h:
2562         (WebCore::AccessibilityObject::isFileUploadButton):
2563         * page/AccessibilityRenderObject.cpp:
2564         (WebCore::AccessibilityRenderObject::isFileUploadButton):
2565         (WebCore::AccessibilityRenderObject::actionElement):
2566         (WebCore::AccessibilityRenderObject::textUnderElement):
2567         (WebCore::AccessibilityRenderObject::stringValue):
2568         (WebCore::AccessibilityRenderObject::roleValue):
2569         * page/AccessibilityRenderObject.h:
2570         * rendering/RenderFileUploadControl.cpp:
2571         (WebCore::RenderFileUploadControl::buttonValue):
2572         (WebCore::RenderFileUploadControl::fileTextValue):
2573         * rendering/RenderFileUploadControl.h:
2574
2575 2008-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
2576
2577         Reviewed by Eric.
2578
2579         Bug 17971: [Curl] FormData processing should be moved to its own class
2580
2581         Move FormData treatment into FormDataStream. The aim is to have FormDataStream behave like a stream that cURL
2582         could manipulate.
2583
2584         First step into having complete file uploading facility in cURL.
2585
2586         No test case as it is only code refactoring.
2587
2588         * GNUmakefile.am: Add FormDataStreamCurl.cpp
2589         * platform/network/ResourceHandleInternal.h: Move code to FormStreamDataCurl.h
2590         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2591         * platform/network/curl/FormDataStreamCurl.cpp: Added.
2592         (WebCore::FormDataStream::~FormDataStream):
2593         (WebCore::FormDataStream::read):
2594         * platform/network/curl/FormDataStreamCurl.h: Added.
2595         (WebCore::FormDataStream::FormDataStream):
2596         * platform/network/curl/ResourceHandleCurl.cpp:
2597         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2598         * platform/network/curl/ResourceHandleManager.cpp:
2599         (WebCore::readCallback): Move code to FormDataStreamCurl.cpp
2600
2601 2008-05-07  Adam Treat  <treat@kde.org>
2602
2603         Reviewed by Simon.
2604
2605         https://bugs.webkit.org/show_bug.cgi?id=18898
2606
2607         Fixed wrong transform being used for creating the pixmap for a new
2608         transparency layer. This fixes the popup menus on dell.com.
2609
2610         * platform/graphics/qt/GraphicsContextQt.cpp:
2611         (WebCore::GraphicsContext::beginTransparencyLayer):
2612
2613 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2614
2615         Reviewed by Simon.
2616
2617         Share the plug-in directories between Gtk and Qt/X11 port.
2618
2619         * platform/qt/FileSystemQt.cpp:
2620         (WebCore::homeDirectoryPath): Implement it for Qt.
2621         * plugins/PluginDatabase.cpp:
2622         (WebCore::addMozillaPluginDirectories): Shared code.
2623         (WebCore::PluginDatabase::defaultPluginDirectories):
2624         (WebCore::PluginDatabase::isPreferredPluginDirectory): Shared code.
2625         * plugins/gtk/PluginDatabaseGtk.cpp:
2626         (WebCore::PluginDatabase::isPreferredPluginDirectory): Refactored.
2627         * plugins/qt/PluginDatabaseQt.cpp: Refactored.
2628
2629 2008-05-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
2630
2631         Reviewed by Simon
2632
2633         Fix build issues on Mac and refeactor the .pro file a bit.
2634
2635         * WebCore.pro:
2636         * platform/qt/TemporaryLinkStubs.cpp:
2637         (PluginPackage::fetchInfo):
2638
2639 2008-05-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
2640
2641         Reviewed by Simon
2642
2643         Draw scrollview corners (between scrollbars) using the Qt style.
2644
2645         https://bugs.webkit.org/show_bug.cgi?id=18894
2646
2647         * platform/qt/ScrollViewQt.cpp:
2648         (WebCore::drawScrollbarCorner):
2649         (WebCore::ScrollView::paint):
2650
2651 2008-05-07  Simon Hausmann  <hausmann@webkit.org>
2652
2653         Fix the Qt build, added AccessibilityListBox and ListBoxOption.cpp to
2654         the build.
2655
2656         * WebCore.pro:
2657
2658 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2659
2660         Rubber-stamped by Holger.
2661
2662         Fix building without storage support.
2663
2664         * page/PageGroup.cpp:
2665         (WebCore::PageGroup::closeLocalStorage): proper #if
2666
2667 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2668
2669         Rubber-stamped by Oliver Hunt.
2670
2671         Fix building without accessibility.
2672
2673         * page/AXObjectCache.cpp:
2674         (WebCore::AXObjectCache::selectedChildrenChanged): proper #if
2675
2676 2008-05-06  Dan Bernstein  <mitz@apple.com>
2677
2678         Reviewed by Darin Adler.
2679
2680         - fix <rdar://problem/5914544> Crash in layoutInlineChildren()
2681
2682         Test: fast/block/float/float-on-zero-height-line.html
2683
2684         * rendering/RenderBlock.cpp:
2685         (WebCore::RenderBlock::markLinesDirtyInVerticalRange):
2686
2687 2008-05-06  Alice Liu  <alice.liu@apple.com>
2688
2689         Reviewed by Adele Peterson and John Sullivan.
2690
2691         changes needed to build on Windows after r32911 and r32927
2692
2693         * WebCore.vcproj/WebCore.vcproj:
2694         * page/AXObjectCache.cpp:
2695         (WebCore::AXObjectCache::selectedChildrenChanged):
2696         * page/AccessibilityObject.h:
2697         (WebCore::AccessibilityObject::document):
2698         (WebCore::AccessibilityObject::topDocumentFrameView):
2699         (WebCore::AccessibilityObject::documentFrameView):
2700         * page/AccessibilityRenderObject.cpp:
2701         (WebCore::AccessibilityRenderObject::document):
2702         (WebCore::AccessibilityRenderObject::topDocumentFrameView):
2703         (WebCore::AccessibilityRenderObject::documentFrameView):
2704         * page/AccessibilityRenderObject.h:
2705         * page/mac/AXObjectCacheMac.mm:
2706         * page/mac/AccessibilityObjectWrapper.mm:
2707         (-[AccessibilityObjectWrapper position]):
2708         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2709
2710 2008-05-06  Brady Eidson  <beidson@apple.com>
2711
2712         Reviewed by Sam Weinig
2713
2714         Fix a few bugs with the final sync'ing of LocalStorageAreas when the thread is shut down.
2715         1 - A sync task actually needs to be scheduled for each LocalStorageArea when the shut down occurs.
2716         2 - Pending sync timers all need to be cancelled.
2717
2718         * storage/LocalStorage.cpp:
2719         (WebCore::LocalStorage::storageArea):
2720         (WebCore::LocalStorage::close): Tell each LocalStorageArea to schedule it's final sync before scheduling
2721           thread termination.
2722         * storage/LocalStorage.h:  Change the map to be of LocalStorageAreas instead of StorageAreas
2723
2724         * storage/LocalStorageArea.cpp:
2725         (WebCore::LocalStorageArea::LocalStorageArea):
2726         (WebCore::LocalStorageArea::~LocalStorageArea): ASSERT the timer has been cancelled, but make SURE it is
2727           in release builds.
2728         (WebCore::LocalStorageArea::scheduleFinalSync): Cancel the sync timer, schedule the final sync, and set the
2729           "final sync scheduled" flag
2730         (WebCore::LocalStorageArea::scheduleItemForSync): ASSERT that the final sync hasn't already been scheduled
2731         (WebCore::LocalStorageArea::scheduleClear): Ditto
2732         * storage/LocalStorageArea.h:
2733
2734 2008-05-06  Kevin Ollivier  <kevino@theolliviers.com>
2735
2736         wx build fix. Adding files added in  r32925 to the bakefiles.
2737
2738         * WebCoreSources.bkl:
2739
2740 2008-05-06  Alp Toker  <alp@nuanti.com>
2741
2742         GTK+ build fix. Add empty stub to keep non-accessible ports building.
2743
2744         * page/AXObjectCache.h:
2745         (WebCore::AXObjectCache::selectedChildrenChanged):
2746
2747 2008-05-06  Beth Dakin  <bdakin@apple.com>
2748
2749         Reviewed by Darin.
2750
2751         Fix for <rdar://problem/5907916> Implement 'aria-labeledby' and 
2752         'aria-describedby' attributes.
2753
2754         * html/HTMLAttributeNames.in: Added new attributes. Added both the 
2755         British spelling (since that is what is specified in the spec), and 
2756         the American spelling (since the bug filer and I are two Americans 
2757         who keep spelling it the American way by accident). 
2758         * page/AccessibilityObject.cpp: Added empty wrappers. These 
2759         functions can't do anything meaningful without a renderer.
2760         (WebCore::AccessibilityObject::ariaAccessiblityName):
2761         (WebCore::AccessibilityObject::ariaLabeledByAttribute):
2762         (WebCore::AccessibilityObject::ariaDescribedByAttribute):
2763         * page/AccessibilityObject.h:
2764
2765         Here is where the real work is done.
2766         * page/AccessibilityRenderObject.h:
2767         * page/AccessibilityRenderObject.cpp:
2768         (WebCore::accessibleNameForNode): Takes a node and finds its 
2769         contribution to the accessible name, as defined by the Mozilla ARIA 
2770         Implementer's Guide. 
2771         (WebCore::AccessibilityRenderObject::ariaAccessiblityName): Takes a 
2772         string of space-separated IDs, fetches the corresponding element 
2773         for each ID, and concatenates an accessible name based on the 
2774         elements.
2775         (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute): 
2776         Retrieve the labeledby attribute and send its contents to 
2777         ariaAccessibilityName().
2778         (WebCore::AccessibilityRenderObject::title): Return the ARIA 
2779         labeledby value if one exists.
2780         (WebCore::AccessibilityRenderObject::ariaDescribedByAttribute): 
2781         Retrieve the describedby attribute and send its contents to 
2782         ariaAccessibilityName().
2783         (WebCore::AccessibilityRenderObject::accessibilityDescription): 
2784         Return the ARIA describedby attribute if one exists. 
2785
2786         These are two bugs I spotted. 
2787         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Don't 
2788         ignore anything with an ARIA role.
2789         (WebCore::AccessibilityRenderObject::roleValue): Button tags maps 
2790         to ButtonRole.
2791
2792 2008-05-06  Anders Carlsson  <andersca@apple.com>
2793
2794         Reviewed by Brady.
2795
2796         Support reading back app caches from the database.
2797     
2798         * loader/appcache/ApplicationCache.cpp:
2799         (WebCore::ApplicationCache::ApplicationCache):
2800         Initialize m_storageID to 0.
2801         
2802         * loader/appcache/ApplicationCacheGroup.cpp:
2803         (WebCore::ApplicationCacheGroup::cacheDestroyed):
2804         If the cache being destroyed is not the newest cache, it should no longer be 
2805         stored in the database. Remove it.
2806         
2807         (WebCore::ApplicationCacheGroup::setNewestCache):
2808         Don't store the cache here.
2809         
2810         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2811         Store it here instead.
2812         
2813         * loader/appcache/ApplicationCacheStorage.cpp:
2814         (WebCore::ApplicationCacheStorage::loadCacheGroup):
2815         New method that loads a cache group with a given manifest URL (or returns 0 if the load fails).
2816         
2817         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
2818         Search for the group in the database.
2819         
2820         (WebCore::ApplicationCacheStorage::loadManifestHostHashes):
2821         New method that loads the host hashes from the database.
2822         
2823         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2824         Search in the database for a cache that contains the resource.
2825         
2826         (WebCore::ApplicationCacheStorage::loadCache):
2827         New method that loads a cache with a given ID.
2828         
2829         (WebCore::ApplicationCacheStorage::remove):
2830         New method that removes a cache.
2831         
2832         * loader/appcache/ApplicationCacheStorage.h:
2833         Add definitions.
2834
2835 2008-05-06  Alp Toker  <alp@nuanti.com>
2836
2837         Partial GTK+ build fix. Add files from r32925 to the build and replace
2838         'nil' return with 0.
2839
2840         * GNUmakefile.am:
2841         * page/AccessibilityListBoxOption.cpp:
2842         (WebCore::AccessibilityListBoxOption::parentObject):
2843
2844 2008-05-06  Brady Eidson  <beidson@apple.com>
2845
2846         Reviewed by Anders
2847
2848         Make LocalStorage persistent using a SQLite database.
2849
2850         There's a few things going on here.  Whenever an item is changed, we add it to a set of
2851         "items to be sync'ed."  Instead of immediately scheduling the sync'ing on the background
2852         thread, we set a "sync timer" instead.  This is to shield against a series of rapid changes
2853         to avoid thread churn.
2854
2855         When the sync timer fires, we move the "items to be sync'ed" set to a background thread set
2856         and schedule the sync task which is where the items are actually committed to disk.
2857
2858         Current design for reading items back in from disk is to be as aggressive as possible.
2859         When a page first accesses it's LocalStorage area, we begin to import all items in from disk so
2860         they are immediately available.  A future enhancement will be to being this pre-fetching the
2861         moment we start loading a page when we know that page has LocalStorage.
2862
2863         * storage/LocalStorageArea.cpp:
2864         (WebCore::LocalStorageArea::LocalStorageArea):
2865         (WebCore::LocalStorageArea::length): Return the length, or wait for the import to complete then return it.
2866         (WebCore::LocalStorageArea::key): Return the key, or wait for the import to complete then return it.
2867         (WebCore::LocalStorageArea::getItem): Return the item, or wait for the import to complete then return it.
2868         (WebCore::LocalStorageArea::setItem): Set the item, or hold the import lock and set it.  The second case is
2869           because if the item is set while the import is still in progress, the new value should override whatever
2870           the imported value is.
2871         (WebCore::LocalStorageArea::removeItem): Remove the item, or hold the import lock and remove it.  See the 
2872           explanation for setItem()
2873         (WebCore::LocalStorageArea::contains): Return whether or not the item is contained.  Do the same dance with
2874           the import flag, import lock, and import condition that the above methods do.
2875
2876         (WebCore::LocalStorageArea::itemChanged): Schedule the item for sync'ing
2877         (WebCore::LocalStorageArea::itemRemoved): Schedule the removal of the item for sync'ing
2878         (WebCore::LocalStorageArea::areaCleared): Schedule the clear for sync'ing, and clear all previously 
2879           scheduled items.
2880
2881         (WebCore::LocalStorageArea::scheduleItemForSync): Add an item to the sync set.
2882         (WebCore::LocalStorageArea::scheduleClear): Set a bool flag denoting "All items removed."  If any
2883           items are later set before the actual removal takes place, they will be written *after* the removal.
2884         (WebCore::LocalStorageArea::syncTimerFired): Move the current sync-set to the background thread sync set, then 
2885           schedule a sync task.  Also transfer the "items cleared" flag to the "background thread items cleared" flag
2886         (WebCore::LocalStorageArea::performImport): Import all items from disk, then signal the import complete.
2887         (WebCore::LocalStorageArea::markImported): Set the imported flag and signal the import complete
2888         (WebCore::LocalStorageArea::performSync): If the clear flag is set then drop all items.  Then update or delete 
2889           each item waiting to be sync'ed
2890         * storage/LocalStorageArea.h:
2891
2892 2008-05-06  Brady Eidson  <beidson@apple.com>
2893
2894         Rubberstamped by Mitz Pettel RTL
2895
2896         * storage/LocalStorage.cpp:
2897         (WebCore::LocalStorage::fullDatabaseFilename): Filename extensions for localstorage = all lowercase
2898
2899 2008-05-06  Brady Eidson  <beidson@apple.com>
2900
2901         Reviewed by Darin, Sam Weinig, and Anders
2902
2903         Preparation for upcoming work making LocalStorage persistent.
2904
2905         The final step before code that actually does storage and retrieval of LocalStorage items.
2906
2907         The LocalStorage set is responsible for controlling the path and filenames that individual
2908         LocalStorageAreas will use for their persistent store.  This adds the ability to return that
2909         filename.
2910
2911         Also, add the scheduling methods that LocalStorageArea will use for importing and syncing 
2912         it's persistent items.
2913
2914         * storage/LocalStorage.cpp:
2915         (WebCore::LocalStorage::storageArea):  Add some comments re: the future direction of this
2916           method once we actually do quota tracking.
2917         (WebCore::LocalStorage::fullDatabaseFilename):
2918         (WebCore::LocalStorage::scheduleImport):
2919         (WebCore::LocalStorage::scheduleSync):
2920         * storage/LocalStorage.h:
2921
2922 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
2923
2924         Reviewed by Beth Dakin.
2925
2926         rdar://problem/5408464> REGRESSION: Unable to use Voiceover on combo boxes (disneyjobs.com)
2927
2928         * WebCore.xcodeproj/project.pbxproj:
2929         * html/HTMLOptGroupElement.cpp:
2930         (WebCore::HTMLOptGroupElement::ownerSelectElement):
2931         (WebCore::HTMLOptGroupElement::accessKeyAction):
2932         * html/HTMLOptGroupElement.h:
2933         * html/HTMLOptionElement.cpp:
2934         (WebCore::HTMLOptionElement::accessKeyAction):
2935         (WebCore::HTMLOptionElement::index):
2936         (WebCore::HTMLOptionElement::setSelected):
2937         (WebCore::HTMLOptionElement::childrenChanged):
2938         (WebCore::HTMLOptionElement::ownerSelectElement):
2939         (WebCore::HTMLOptionElement::insertedIntoDocument):
2940         * html/HTMLOptionElement.h:
2941         * html/HTMLSelectElement.cpp:
2942         (WebCore::HTMLSelectElement::childrenChanged):
2943         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
2944         * html/HTMLSelectElement.h:
2945         * page/AXObjectCache.cpp:
2946         (WebCore::AXObjectCache::get):
2947         * page/AccessibilityListBox.cpp: Added.
2948         (WebCore::AccessibilityListBox::AccessibilityListBox):
2949         (WebCore::AccessibilityListBox::~AccessibilityListBox):
2950         (WebCore::AccessibilityListBox::create):
2951         (WebCore::AccessibilityListBox::addChildren):
2952         (WebCore::AccessibilityListBox::selectedChildren):
2953         (WebCore::AccessibilityListBox::visibleChildren):
2954         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
2955         (WebCore::AccessibilityListBox::doAccessibilityHitTest):
2956         * page/AccessibilityListBox.h: Added.
2957         (WebCore::AccessibilityListBox::accessibilityShouldUseUniqueId):
2958         (WebCore::AccessibilityListBox::isListBox):
2959         (WebCore::AccessibilityListBox::canSetFocusAttribute):
2960         (WebCore::AccessibilityListBox::roleValue):
2961         (WebCore::AccessibilityListBox::accessibilityIsIgnored):
2962         * page/AccessibilityListBoxOption.cpp: Added.
2963         (WebCore::AccessibilityListBoxOption::AccessibilityListBoxOption):
2964         (WebCore::AccessibilityListBoxOption::~AccessibilityListBoxOption):
2965         (WebCore::AccessibilityListBoxOption::create):
2966         (WebCore::AccessibilityListBoxOption::isEnabled):
2967         (WebCore::AccessibilityListBoxOption::isSelected):
2968         (WebCore::AccessibilityListBoxOption::elementRect):
2969         (WebCore::AccessibilityListBoxOption::title):
2970         (WebCore::AccessibilityListBoxOption::size):
2971         (WebCore::AccessibilityListBoxOption::actionElement):
2972         (WebCore::AccessibilityListBoxOption::parentObject):
2973         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
2974         (WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
2975         * page/AccessibilityListBoxOption.h: Added.
2976         (WebCore::AccessibilityListBoxOption::setHTMLElement):
2977         (WebCore::AccessibilityListBoxOption::roleValue):
2978         (WebCore::AccessibilityListBoxOption::accessibilityIsIgnored):
2979         (WebCore::AccessibilityListBoxOption::isListBoxOption):
2980         * page/AccessibilityObject.h:
2981         (WebCore::AccessibilityObject::isListBox):
2982         * page/AccessibilityRenderObject.cpp:
2983         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
2984         * page/mac/AccessibilityObjectWrapper.mm:
2985         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2986         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2987         * rendering/RenderListBox.cpp:
2988         (WebCore::RenderListBox::selectionChanged):
2989         * rendering/RenderListBox.h:
2990
2991 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
2992
2993         Reviewed by Beth Dakin.
2994
2995          <rdar://problem/5455287> AXWebArea should include AXURL
2996
2997         * page/AccessibilityRenderObject.cpp:
2998         (WebCore::AccessibilityRenderObject::url):
2999         * page/mac/AccessibilityObjectWrapper.mm:
3000         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
3001
3002 2008-05-06  Alice Liu  <alice.liu@apple.com>
3003
3004         Rubber-stamped by Beth
3005         
3006         stab-in-the-dark attempt at fixing non-mac builds.
3007
3008         * GNUmakefile.am:
3009         * WebCore.pro:
3010         * WebCore.vcproj/WebCore.vcproj:
3011         * WebCoreSources.bkl:
3012
3013 2008-05-06  Anders Carlsson  <andersca@apple.com>
3014
3015         Reviewed by Adam.
3016
3017         Only use the toplevel application cache when loading subframes.
3018
3019         * loader/MainResourceLoader.cpp:
3020         (WebCore::MainResourceLoader::load):
3021
3022 2008-05-06  Adam Barth  <abarth-webkit@adambarth.com>
3023
3024         Reviewed by Sam Weinig.
3025
3026         https://bugs.webkit.org/show_bug.cgi?id=18725
3027         Implement asynchronous postMessage.
3028         MessageEvent no longer bubbles as per r1237 in the HTML 5 working draft.
3029
3030         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
3031
3032         Test: http/tests/security/postMessage/delivery-order.html
3033
3034         * dom/MessageEvent.cpp:
3035         (WebCore::MessageEvent::MessageEvent):
3036         * page/DOMWindow.cpp:
3037         (WebCore::PostMessageTimer::PostMessageTimer):
3038         (WebCore::PostMessageTimer::event):
3039         (WebCore::PostMessageTimer::targetOrigin):
3040         (WebCore::PostMessageTimer::fired):
3041         (WebCore::DOMWindow::postMessage):
3042         (WebCore::DOMWindow::postMessageTimerFired):
3043         * page/DOMWindow.h:
3044         * page/DOMWindow.idl:
3045         
3046 2008-05-06  Anders Carlsson  <andersca@apple.com>
3047
3048         Reviewed by Brady.
3049
3050         Store cache to the database.
3051
3052         * loader/appcache/ApplicationCache.cpp:
3053         (WebCore::ApplicationCache::addResource):
3054         If the cache has been saved to disk, save the resource as well.
3055         
3056         * loader/appcache/ApplicationCache.h:
3057         (WebCore::ApplicationCache::onlineWhitelist):
3058         New method which returns the online whitelist.
3059
3060         (WebCore::ApplicationCache::setStorageId):
3061         (WebCore::ApplicationCache::storageId):
3062         Setter/getter for the application cache storage ID.
3063
3064         * loader/appcache/ApplicationCacheGroup.cpp:
3065         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
3066         Save the cache/group to disk.
3067         
3068         * loader/appcache/ApplicationCacheGroup.h:
3069         (WebCore::ApplicationCacheGroup::setStorageID):
3070         (WebCore::ApplicationCacheGroup::storageID):
3071         Setter/getter for the application cache group storage ID.
3072         
3073         * loader/appcache/ApplicationCacheResource.cpp:
3074         (WebCore::ApplicationCacheResource::addType):
3075         We can't add a new type if the resource has been saved to disk.
3076         
3077         * loader/appcache/ApplicationCacheResource.h:
3078         (WebCore::ApplicationCacheResource::setStorageID):
3079         (WebCore::ApplicationCacheResource::storageID):
3080         Setter/getter for the application cache resource storage ID.
3081
3082         * loader/appcache/ApplicationCacheStorage.cpp:
3083         * loader/appcache/ApplicationCacheStorage.cpp:
3084         (WebCore::ApplicationCacheStorage::executeSQLCommand):
3085         New method for executing SQL and logging any errors.
3086         
3087         (WebCore::ApplicationCacheStorage::openDatabase):
3088         Create new tables.
3089         
3090         (WebCore::ApplicationCacheStorage::executeStatement):
3091         New method for executing an SQL statement and logging any errors.
3092         
3093         (WebCore::ApplicationCacheStorage::store):
3094         New methods for storing a cache group, cache and cache resource to the store.
3095
3096         (WebCore::ApplicationCacheStorage::storeNewestCache):
3097         New method which stores the newest cache and updates the newest cache field in the cache group.
3098         
3099         * loader/appcache/ApplicationCacheStorage.h:
3100         Add new methods.
3101         
3102         * platform/sql/SQLiteStatement.h:
3103         (WebCore::SQLiteStatement::query):
3104         Getter for the SQL query.
3105
3106 2008-05-06  Brady Eidson  <beidson@apple.com>
3107
3108         Reviewed by Darin Adler
3109
3110         Preparation for upcoming work making LocalStorage persistent.
3111
3112         Writing persistent values for LocalStorage will take place on a background thread.
3113         Here is that background thread, as well as most of the hooks that will be utilized to
3114         make the whole song and dance work.
3115
3116         The thread itself is very simple and MessageQueue based.  LocalStorageTasks are what 
3117         mark the work that needs to be done and come in 5 flavors:  Import and Sync a LocalStorage set,
3118         Import and Sync a LocalStorageArea, and terminate the thread.
3119
3120         This patch accomplished 2 things:
3121         
3122         1 - Each PageGroup has its own LocalStorage set.  Upon its creation its LocalStorageThread is 
3123             created and started.
3124
3125         2 - At application shutdown, each thread is synchronously terminated.
3126
3127         What happens between steps 1 and 2 will come later.
3128
3129         * GNUmakefile.am:
3130         * WebCore.pro:
3131         * WebCore.vcproj/WebCore.vcproj:
3132         * WebCore.xcodeproj/project.pbxproj:
3133         * WebCoreSources.bkl:
3134
3135         * storage/LocalStorage.cpp: Add some threading ASSERTs to make it clear which thread each
3136           method is meant to be called from.
3137         (WebCore::LocalStorage::LocalStorage):
3138         (WebCore::LocalStorage::storageArea):
3139         (WebCore::LocalStorage::performImport): Placeholder for importing known origins and quotas
3140         (WebCore::LocalStorage::performSync): Placeholder for writing out updated origins and quotas
3141         (WebCore::LocalStorage::close): Synchronously terminate the thread.
3142         * storage/LocalStorage.h:
3143
3144         * storage/LocalStorageArea.cpp: Add some threading ASSERTs to make it clear which thread each
3145           method is meant to be called from.
3146         (WebCore::LocalStorageArea::itemChanged):
3147         (WebCore::LocalStorageArea::itemRemoved):
3148         (WebCore::LocalStorageArea::areaCleared):
3149         (WebCore::LocalStorageArea::dispatchStorageEvent):
3150         (WebCore::LocalStorageArea::performImport): Placeholder for importing all items for this 
3151           LocalStorageArea to prime the page before the items are needed
3152         (WebCore::LocalStorageArea::performSync): Placeholder for writing out dirty items to disk
3153         * storage/LocalStorageArea.h:
3154
3155         * storage/LocalStorageTask.cpp: Added.
3156         (WebCore::LocalStorageTask::LocalStorageTask):
3157         (WebCore::LocalStorageTask::performTask):
3158         * storage/LocalStorageTask.h: Added.
3159         (WebCore::LocalStorageTask::):
3160         (WebCore::LocalStorageTask::createImport):
3161         (WebCore::LocalStorageTask::createSync):
3162         (WebCore::LocalStorageTask::createTerminate):
3163
3164         * storage/LocalStorageThread.cpp: Added.
3165         (WebCore::LocalStorageThread::create):
3166         (WebCore::LocalStorageThread::LocalStorageThread):
3167         (WebCore::LocalStorageThread::start):
3168         (WebCore::LocalStorageThread::localStorageThreadStart):
3169         (WebCore::LocalStorageThread::localStorageThread):
3170         (WebCore::LocalStorageThread::scheduleImport):
3171         (WebCore::LocalStorageThread::scheduleSync):
3172         (WebCore::LocalStorageThread::terminate): 
3173         (WebCore::LocalStorageThread::performTerminate):
3174         * storage/LocalStorageThread.h: Added.
3175
3176 2008-05-06  Anders Carlsson  <andersca@apple.com>
3177
3178         Reviewed by Darin.
3179
3180         Add NPN_PopUpContextMenu.
3181         
3182         * bridge/npapi.h:
3183         * plugins/npfunctions.h:
3184
3185 2008-05-06  Alp Toker  <alp@nuanti.com>
3186
3187         GTK+ build fix. Add file from r32911 to the build.
3188
3189         * GNUmakefile.am:
3190
3191 2008-05-06  Gwenole Beauchesne  <gbeauchesne@splitted-desktop.org>
3192
3193         Reviewed by Alp Toker.
3194
3195         http://bugs.webkit.org/show_bug.cgi?id=18906
3196         [GTK] Fix varargs terminator in g_build_filename()
3197
3198         * plugins/gtk/PluginDatabaseGtk.cpp:
3199         (WebCore::PluginDatabase::isPreferredPluginDirectory): Fix varargs
3200         terminator.
3201
3202 2008-05-06  Kevin McCullough  <kmccullough@apple.com>
3203
3204         - Forgot to update localized Strings from previous checkin.
3205
3206         * English.lproj/localizedStrings.js:
3207
3208 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
3209
3210         Reviewed by Beth Dakin
3211
3212         <rdar://problem/5408464> REGRESSION: Unable to use Voiceover on combo boxes (disneyjobs.com)
3213         <rdar://problem/5895634> AX: AccessibilityObjectWrapper is being leaked all over the place
3214         <rdar://problem/5893907> CrashTracer: [REGRESSION] 44 crashes in Safari at com.apple.WebCore: WebCore::AccessibilityObject::clearChildren + 9
3215         
3216         Initial prep work to support accessibility objects that do not have renderers. 
3217
3218         * WebCore.xcodeproj/project.pbxproj:
3219         * page/AXObjectCache.cpp:
3220         (WebCore::AXObjectCache::~AXObjectCache):
3221         (WebCore::AXObjectCache::get):
3222         (WebCore::AXObjectCache::remove):
3223         (WebCore::AXObjectCache::getAXID):
3224         (WebCore::AXObjectCache::removeAXID):
3225         (WebCore::AXObjectCache::childrenChanged):
3226         * page/AXObjectCache.h:
3227         (WebCore::AXObjectCache::isIDinUse):
3228         * page/AccessibilityObject.cpp:
3229         (WebCore::AccessibilityObject::AccessibilityObject):
3230         (WebCore::AccessibilityObject::create):
3231         (WebCore::AccessibilityObject::detach):
3232         (WebCore::AccessibilityObject::firstChild):
3233         (WebCore::AccessibilityObject::lastChild):
3234         (WebCore::AccessibilityObject::previousSibling):
3235         (WebCore::AccessibilityObject::nextSibling):
3236         (WebCore::AccessibilityObject::parentObject):
3237         (WebCore::AccessibilityObject::layoutCount):
3238         (WebCore::AccessibilityObject::text):
3239         (WebCore::AccessibilityObject::helpText):
3240         (WebCore::AccessibilityObject::textUnderElement):
3241         (WebCore::AccessibilityObject::isARIAInput):
3242         (WebCore::AccessibilityObject::isARIAControl):
3243         (WebCore::AccessibilityObject::intValue):
3244         (WebCore::AccessibilityObject::stringValue):
3245         (WebCore::AccessibilityObject::title):
3246         (WebCore::AccessibilityObject::accessibilityDescription):
3247         (WebCore::AccessibilityObject::boundingBoxRect):
3248         (WebCore::AccessibilityObject::elementRect):
3249         (WebCore::AccessibilityObject::size):
3250         (WebCore::AccessibilityObject::linkedUIElement):
3251         (WebCore::AccessibilityObject::textLength):
3252         (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
3253         (WebCore::AccessibilityObject::selectedText):
3254         (WebCore::AccessibilityObject::accessKey):
3255         (WebCore::AccessibilityObject::selection):
3256         (WebCore::AccessibilityObject::selectedTextRange):
3257         (WebCore::AccessibilityObject::setSelectedTextRange):
3258         (WebCore::AccessibilityObject::url):
3259         (WebCore::AccessibilityObject::setFocused):
3260         (WebCore::AccessibilityObject::setValue):
3261         (WebCore::AccessibilityObject::axObjectCache):
3262         (WebCore::AccessibilityObject::getDocumentLinks):
3263         (WebCore::AccessibilityObject::widget):
3264         (WebCore::AccessibilityObject::widgetForAttachmentView):
3265         (WebCore::AccessibilityObject::anchorElement):
3266         (WebCore::AccessibilityObject::actionElement):
3267         (WebCore::AccessibilityObject::visiblePositionRange):
3268         (WebCore::AccessibilityObject::doAXTextMarkerRangeForLine):
3269         (WebCore::AccessibilityObject::visiblePositionForIndex):
3270         (WebCore::AccessibilityObject::indexForVisiblePosition):
3271         (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange):
3272         (WebCore::AccessibilityObject::doSetAXSelectedTextMarkerRange):
3273         (WebCore::AccessibilityObject::doAXTextMarkerForPosition):
3274         (WebCore::AccessibilityObject::textMarkerForIndex):
3275         (WebCore::AccessibilityObject::rangeForTextMarkerRange):
3276         (WebCore::AccessibilityObject::indexForTextMarker):
3277         (WebCore::AccessibilityObject::doAXRangeForLine):
3278         (WebCore::AccessibilityObject::doAXRangeForPosition):
3279         (WebCore::AccessibilityObject::doAXRangeForIndex):
3280         (WebCore::AccessibilityObject::doAXStyleRangeForIndex):
3281         (WebCore::AccessibilityObject::doAXStringForRange):
3282         (WebCore::AccessibilityObject::doAXBoundsForRange):
3283         (WebCore::AccessibilityObject::doAccessibilityHitTest):
3284         (WebCore::AccessibilityObject::focusedUIElement):
3285         (WebCore::AccessibilityObject::observableObject):
3286         (WebCore::AccessibilityObject::roleValue):
3287         (WebCore::AccessibilityObject::ariaRoleAttribute):
3288         (WebCore::AccessibilityObject::childrenChanged):
3289         (WebCore::AccessibilityObject::addChildren):
3290         (WebCore::AccessibilityObject::removeAXObjectID):
3291         * page/AccessibilityObject.h:
3292         (WebCore::):
3293         (WebCore::PlainTextRange::PlainTextRange):
3294         (WebCore::PlainTextRange::isNull):
3295         (WebCore::AccessibilityObject::isAccessibilityRenderObject):
3296         (WebCore::AccessibilityObject::isAnchor):
3297         (WebCore::AccessibilityObject::isAttachment):
3298         (WebCore::AccessibilityObject::isHeading):
3299         (WebCore::AccessibilityObject::isLink):
3300         (WebCore::AccessibilityObject::isImage):
3301         (WebCore::AccessibilityObject::isNativeImage):
3302         (WebCore::AccessibilityObject::isImageButton):
3303         (WebCore::AccessibilityObject::isPasswordField):
3304         (WebCore::AccessibilityObject::isTextControl):
3305         (WebCore::AccessibilityObject::isNativeTextControl):
3306         (WebCore::AccessibilityObject::isWebArea):
3307         (WebCore::AccessibilityObject::isCheckboxOrRadio):
3308         (WebCore::AccessibilityObject::isChecked):
3309         (WebCore::AccessibilityObject::isEnabled):
3310         (WebCore::AccessibilityObject::isSelected):
3311         (WebCore::AccessibilityObject::isFocused):
3312         (WebCore::AccessibilityObject::isHovered):
3313         (WebCore::AccessibilityObject::isIndeterminate):
3314         (WebCore::AccessibilityObject::isLoaded):
3315         (WebCore::AccessibilityObject::isMultiSelect):
3316         (WebCore::AccessibilityObject::isOffScreen):
3317         (WebCore::AccessibilityObject::isPressed):
3318         (WebCore::AccessibilityObject::isReadOnly):
3319         (WebCore::AccessibilityObject::isVisited):
3320         (WebCore::AccessibilityObject::canSetFocusAttribute):
3321         (WebCore::AccessibilityObject::canSetTextRangeAttributes):
3322         (WebCore::AccessibilityObject::canSetValueAttribute):
3323         (WebCore::AccessibilityObject::hasIntValue):
3324         (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
3325         (WebCore::AccessibilityObject::accessibilityIsIgnored):
3326         (WebCore::AccessibilityObject::children):
3327         (WebCore::AccessibilityObject::hasChildren):
3328         (WebCore::AccessibilityObject::setWrapper):
3329         (WebCore::AccessibilityObject::isDetached):
3330         * page/AccessibilityRenderObject.cpp: Added.
3331         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3332         (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
3333         (WebCore::AccessibilityRenderObject::create):
3334         (WebCore::AccessibilityRenderObject::detach):
3335         (WebCore::AccessibilityRenderObject::firstChild):
3336         (WebCore::AccessibilityRenderObject::lastChild):
3337         (WebCore::AccessibilityRenderObject::previousSibling):
3338         (WebCore::AccessibilityRenderObject::nextSibling):
3339         (WebCore::AccessibilityRenderObject::parentObject):
3340         (WebCore::AccessibilityRenderObject::isWebArea):
3341         (WebCore::AccessibilityRenderObject::isImageButton):
3342         (WebCore::AccessibilityRenderObject::isAnchor):
3343         (WebCore::AccessibilityRenderObject::isNativeTextControl):
3344         (WebCore::AccessibilityRenderObject::isTextControl):
3345         (WebCore::AccessibilityRenderObject::isNativeImage):
3346         (WebCore::AccessibilityRenderObject::isImage):
3347         (WebCore::AccessibilityRenderObject::isAttachment):
3348         (WebCore::AccessibilityRenderObject::isPasswordField):
3349         (WebCore::AccessibilityRenderObject::isCheckboxOrRadio):
3350         (WebCore::AccessibilityRenderObject::isPressed):
3351         (WebCore::AccessibilityRenderObject::isIndeterminate):
3352         (WebCore::AccessibilityRenderObject::isChecked):
3353         (WebCore::AccessibilityRenderObject::isHovered):
3354         (WebCore::AccessibilityRenderObject::isMultiSelect):
3355         (WebCore::AccessibilityRenderObject::isReadOnly):
3356         (WebCore::AccessibilityRenderObject::isOffScreen):
3357         (WebCore::AccessibilityRenderObject::headingLevel):
3358         (WebCore::AccessibilityRenderObject::isHeading):
3359         (WebCore::AccessibilityRenderObject::isLink):
3360         (WebCore::AccessibilityRenderObject::anchorElement):
3361         (WebCore::AccessibilityRenderObject::actionElement):
3362         (WebCore::AccessibilityRenderObject::mouseButtonListener):
3363         (WebCore::AccessibilityRenderObject::helpText):
3364         (WebCore::AccessibilityRenderObject::textUnderElement):
3365         (WebCore::AccessibilityRenderObject::hasIntValue):
3366         (WebCore::AccessibilityRenderObject::intValue):
3367         (WebCore::AccessibilityRenderObject::stringValue):
3368         (WebCore::labelForElement):
3369         (WebCore::AccessibilityRenderObject::title):
3370         (WebCore::AccessibilityRenderObject::accessibilityDescription):
3371         (WebCore::AccessibilityRenderObject::boundingBoxRect):
3372         (WebCore::AccessibilityRenderObject::elementRect):
3373         (WebCore::AccessibilityRenderObject::size):
3374         (WebCore::AccessibilityRenderObject::linkedUIElement):
3375         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
3376         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3377         (WebCore::AccessibilityRenderObject::isLoaded):
3378         (WebCore::AccessibilityRenderObject::layoutCount):
3379         (WebCore::AccessibilityRenderObject::text):
3380         (WebCore::AccessibilityRenderObject::textLength):
3381         (WebCore::AccessibilityRenderObject::ariaSelectedTextDOMRange):
3382         (WebCore::AccessibilityRenderObject::selectedText):
3383         (WebCore::AccessibilityRenderObject::accessKey):
3384         (WebCore::AccessibilityRenderObject::selection):
3385         (WebCore::AccessibilityRenderObject::selectedTextRange):
3386         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3387         (WebCore::AccessibilityRenderObject::url):
3388         (WebCore::AccessibilityRenderObject::isVisited):
3389         (WebCore::AccessibilityRenderObject::isSelected):
3390         (WebCore::AccessibilityRenderObject::isFocused):
3391         (WebCore::AccessibilityRenderObject::setFocused):
3392         (WebCore::AccessibilityRenderObject::setValue):
3393         (WebCore::AccessibilityRenderObject::isEnabled):
3394         (WebCore::AccessibilityRenderObject::topRenderer):
3395         (WebCore::AccessibilityRenderObject::widget):
3396         (WebCore::AccessibilityRenderObject::axObjectCache):
3397         (WebCore::AccessibilityRenderObject::getDocumentLinks):
3398         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
3399         (WebCore::AccessibilityRenderObject::frameViewIfRenderView):
3400         (WebCore::AccessibilityRenderObject::visiblePositionRange):
3401         (WebCore::AccessibilityRenderObject::doAXTextMarkerRangeForLine):
3402         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
3403         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
3404         (WebCore::AccessibilityRenderObject::doAXBoundsForTextMarkerRange):
3405         (WebCore::AccessibilityRenderObject::doSetAXSelectedTextMarkerRange):
3406         (WebCore::AccessibilityRenderObject::doAXTextMarkerForPosition):
3407         (WebCore::AccessibilityRenderObject::textMarkerForIndex):
3408         (WebCore::AccessibilityRenderObject::indexForTextMarker):
3409         (WebCore::AccessibilityRenderObject::doAXRangeForLine):
3410         (WebCore::AccessibilityRenderObject::doAXRangeForIndex):
3411         (WebCore::AccessibilityRenderObject::doAXStringForRange):
3412         (WebCore::AccessibilityRenderObject::doAXBoundsForRange):
3413         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
3414         (WebCore::AccessibilityRenderObject::focusedUIElement):
3415         (WebCore::AccessibilityRenderObject::observableObject):
3416         (WebCore::createARIARoleMap):
3417         (WebCore::RoleEntry::):
3418         (WebCore::ariaRoleToWebCoreRole):
3419         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
3420         (WebCore::AccessibilityRenderObject::roleValue):
3421         (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
3422         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
3423         (WebCore::AccessibilityRenderObject::canSetTextRangeAttributes):
3424         (WebCore::AccessibilityRenderObject::childrenChanged):
3425         (WebCore::AccessibilityRenderObject::children):
3426         (WebCore::AccessibilityRenderObject::addChildren):
3427         (WebCore::AccessibilityRenderObject::removeAXObjectID):
3428         (WebCore::AccessibilityRenderObject::actionVerb):
3429         * page/AccessibilityRenderObject.h: Added.
3430         (WebCore::AccessibilityRenderObject::isAccessibilityRenderObject):
3431         (WebCore::AccessibilityRenderObject::areaElement):
3432         (WebCore::AccessibilityRenderObject::setRenderer):
3433         (WebCore::AccessibilityRenderObject::renderer):
3434         (WebCore::AccessibilityRenderObject::setRenderObject):
3435         (WebCore::AccessibilityRenderObject::isDetached):
3436         * page/mac/AXObjectCacheMac.mm:
3437         (WebCore::AXObjectCache::detachWrapper):
3438         (WebCore::AXObjectCache::selectedChildrenChanged):
3439         (WebCore::AXObjectCache::postNotification):
3440         * page/mac/AccessibilityObjectWrapper.mm:
3441         (textMarkerForVisiblePosition):
3442         (CreateCGColorIfDifferent):
3443         (AXAttributeStringSetHeadingLevel):
3444         (AXLinkElementForNode):
3445         (AXAttributeStringSetElement):
3446         (AXAttributedStringAppendText):
3447         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
3448         (-[AccessibilityObjectWrapper documentFrameView:]):
3449         (-[AccessibilityObjectWrapper position]):
3450         (RoleEntry::):
3451         (-[AccessibilityObjectWrapper roleDescription]):
3452         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
3453         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
3454         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
3455         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
3456         (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]):
3457         (-[AccessibilityObjectWrapper doAXAttributedStringForRange:]):
3458         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3459
3460 2008-05-06  Jonathan Haas  <myrdred@gmail.com>
3461
3462         Reviewed by Rob Buis.
3463
3464         https://bugs.webkit.org/show_bug.cgi?id=18859\
3465         Prevented SVGRootInlineBox from static_casting a
3466         node to a class it doesn't inherit
3467         
3468         * rendering/SVGRootInlineBox.cpp:
3469         (WebCore::SVGRootInlineBox::buildTextChunks):
3470
3471 2008-05-06  Brady Eidson  <beidson@apple.com>
3472
3473         Reviewed by Darin Adler
3474
3475         Preparation for upcoming work making LocalStorage persistent.
3476
3477         When the application terminates, all pending local storage writes need to be
3478         sync'ed out to disk.
3479         This works n combination with platform specific code in WebKit that calls it.
3480
3481         * WebCore.base.exp:
3482
3483         * page/PageGroup.cpp:
3484         (WebCore::PageGroup::closeLocalStorage): Close all open LocalStorage objects
3485         * page/PageGroup.h:
3486
3487         * storage/LocalStorage.cpp:
3488         (WebCore::LocalStorage::close): Placeholder for what will sync and terminate the
3489           local storage thread in the future.
3490         * storage/LocalStorage.h:
3491
3492 2008-05-06  Brady Eidson  <beidson@apple.com>
3493
3494         Rubberstamped by David Kilzer
3495
3496         * WebCore.base.exp:  Sort this mess!
3497
3498 2008-05-05  Mark Rowe  <mrowe@apple.com>
3499
3500         Reviewed by Dan Bernstein.
3501
3502         Fix 60 crashes seen on the buildbots that were misreported as hangs.
3503
3504         * dom/Document.cpp:
3505         (WebCore::Document::detachNodeIterator): Null-check page() before dereferencing it.
3506         (WebCore::Document::nodeWillBeRemoved): Ditto.
3507         (WebCore::Document::textInserted): Ditto.
3508         (WebCore::Document::textNodesMerged): Ditto.
3509         (WebCore::Document::textRemoved): Ditto.
3510
3511 2008-05-05  Brady Eidson  <beidson@apple.com>
3512
3513         Reviewed by Mitz Pettel RTL
3514
3515         Preparation for upcoming work making LocalStorage persistent.
3516
3517         The other half of the StorageMap::importItem() addition.
3518
3519         * storage/StorageArea.cpp:
3520         (WebCore::StorageArea::importItem):
3521         * storage/StorageArea.h:
3522
3523 2008-05-05  Brady Eidson  <beidson@apple.com>
3524
3525         Reviewed by Mitz Pettel RTL
3526
3527         Preparation for upcoming work making LocalStorage persistent.
3528
3529         - Create the LocalStorage object for a PageGroup the moment the first Page is added to it
3530           The Settings of the first Page define what persistent path the LocalStorage will use
3531         - Add a Frame argument for the LocalStorageArea request - this will allow a client object
3532           to be queried before the LocalStorageArea is established
3533
3534         * page/DOMWindow.cpp:
3535         (WebCore::DOMWindow::localStorage):
3536
3537         * page/PageGroup.cpp:
3538         (WebCore::PageGroup::addPage):
3539         (WebCore::PageGroup::localStorage):
3540
3541         * storage/LocalStorage.cpp:
3542         (WebCore::LocalStorage::LocalStorage): Take the path as a constructor argument.  Deep copy
3543           the path as it will be used from another thread.
3544         (WebCore::LocalStorage::storageArea):
3545         * storage/LocalStorage.h:
3546         (WebCore::LocalStorage::create):
3547
3548 2008-05-05  Brady Eidson  <beidson@apple.com>
3549
3550         Reviewed by Mitz Pettel RTL
3551
3552         Preparation for upcoming work making LocalStorage persistent.
3553
3554         StorageMaps normally have copy-on-write semantics to help support SessionStorage.
3555         For LocalStorage, we never want this behavior.  When we forcefully import items into