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