Reviewed by Geoff.
[WebKit-https.git] / WebKit / ChangeLog
1 2006-06-23  Timothy Hatcher  <timothy@apple.com>
2
3         Reviewed by Geoff.
4
5         script debugger should only attach to JavaScriptCore when there are listeners
6         http://bugzilla.opendarwin.org/show_bug.cgi?id=9552
7
8         Attaches the debugger to all WebFrames when the first listener
9         is added. Detaches when the last listener is removed.
10         Also detach when the script debug delegate is set to nil.
11
12         * DefaultDelegates/WebScriptDebugServer.m:
13         (+[WebScriptDebugServer listenerCount]):
14         (-[WebScriptDebugServer dealloc]):
15         (-[WebScriptDebugServer attachScriptDebuggerToAllWebViews]):
16         (-[WebScriptDebugServer detachScriptDebuggerFromAllWebViews]):
17         (-[WebScriptDebugServer listenerConnectionDidDie:]):
18         (-[WebScriptDebugServer addListener:]):
19         (-[WebScriptDebugServer removeListener:]):
20         * DefaultDelegates/WebScriptDebugServerPrivate.h:
21         * WebCoreSupport/WebFrameBridge.m:
22         (-[WebFrameBridge windowObjectCleared]):
23         * WebView/WebFrame.m:
24         (-[WebFrame _attachScriptDebugger]):
25         (-[WebFrame _detachScriptDebugger]):
26         * WebView/WebFramePrivate.h:
27         * WebView/WebScriptDebugDelegate.m:
28         (-[WebScriptCallFrame parsedSource:fromURL:sourceId:]):
29         (-[WebScriptCallFrame enteredFrame:sourceId:line:]):
30         (-[WebScriptCallFrame hitStatement:sourceId:line:]):
31         (-[WebScriptCallFrame leavingFrame:sourceId:line:]):
32         * WebView/WebView.m:
33         (-[WebView _attachScriptDebuggerToAllFrames]):
34         (-[WebView _detachScriptDebuggerFromAllFrames]):
35         (-[WebView setScriptDebugDelegate:]):
36         * WebView/WebViewPrivate.h:
37
38 2006-06-22  John Sullivan  <sullivan@apple.com>
39
40         Reviewed by Tim Omernick
41         
42         - added support for UIDelegate to be notified of scrolling in any WebHTMLView
43         - cleaned up recently-added UIDelegate code
44
45         * WebView/WebUIDelegatePrivate.h:
46         declared webView:didScrollDocumentInFrameView: method
47
48         * DefaultDelegates/WebDefaultUIDelegate.m:
49         (-[NSApplication webView:didDrawRect:]):
50         provide default (empty) implementation of this recently-added method, so the
51         DelegateForwarder mechanism will work for it
52         (-[NSApplication webView:didScrollDocumentInFrameView:]):
53         same thing for the new method
54         
55         * WebView/WebHTMLView.m:
56         (-[WebHTMLView _frameOrBoundsChanged]):
57         use _UIDelegateForwarder mechanism to notify delegate that scrolling occurred
58         (-[NSArray drawSingleRect:]):
59         use _UIDelegateForwarder mechanism instead of checking respondsToSelector stuff
60         here (that's packaged up nicely by the forwarder mechanism)
61         
62 2006-06-22  Tim Omernick  <timo@apple.com>
63
64         Reviewed by NOBODY (build fix)
65
66         * WebView/WebFrameLoader.m:
67         Import WebMainResourceLoader instead of using @class so that we can call WebMainResourceLoader
68         methods.
69
70 === WebKit-521.13 ===
71         
72 2006-06-22  Tim Omernick  <timo@apple.com>
73
74         Reviewed by NOBODY (build fix)
75
76         * WebView/WebFrameLoader.m:
77         Import JavaScriptCore/Assertions.h instead of WebKit/WebAssertions.h (which no longer exists)
78
79 2006-06-22  Maciej Stachowiak  <mjs@apple.com>
80
81         Reviewed by Adele.
82         
83         - start moving loading logic to new WebFrameLoader class; move management of WebLoaders there
84
85         * Misc/WebIconLoader.h:
86         * Misc/WebIconLoader.m:
87         (-[WebIconLoader didFinishLoading]):
88         * WebKit.xcodeproj/project.pbxproj:
89         * WebView/WebDataSource.m:
90         (-[WebDataSourcePrivate dealloc]):
91         (-[WebDataSource _updateLoading]):
92         (-[WebDataSource _loadIcon]):
93         (-[WebDataSource _setPrimaryLoadComplete:]):
94         (-[WebDataSource _stopLoading]):
95         (-[WebDataSource _startLoading]):
96         (-[WebDataSource _addSubresourceLoader:]):
97         (-[WebDataSource _removeSubresourceLoader:]):
98         (-[WebDataSource _addPlugInStreamLoader:]):
99         (-[WebDataSource _removePlugInStreamLoader:]):
100         (-[WebDataSource _iconLoaderReceivedPageIcon:]):
101         (-[WebDataSource _defersCallbacksChanged]):
102         (-[WebDataSource _stopLoadingWithError:]):
103         (-[WebDataSource _setupForReplaceByMIMEType:]):
104         (-[WebDataSource initWithRequest:]):
105         (-[WebDataSource dealloc]):
106         (-[WebDataSource finalize]):
107         (-[WebDataSource data]):
108         (-[WebDataSource isLoading]):
109         * WebView/WebFrameLoader.h: Added.
110         * WebView/WebFrameLoader.m: Added.
111         (-[WebFrameLoader initWithDataSource:]):
112         (-[WebFrameLoader dealloc]):
113         (-[WebFrameLoader hasIconLoader]):
114         (-[WebFrameLoader loadIconWithRequest:]):
115         (-[WebFrameLoader stopLoadingIcon]):
116         (-[WebFrameLoader addPlugInStreamLoader:]):
117         (-[WebFrameLoader removePlugInStreamLoader:]):
118         (-[WebFrameLoader setDefersCallbacks:]):
119         (-[WebFrameLoader stopLoadingPlugIns]):
120         (-[WebFrameLoader isLoadingMainResource]):
121         (-[WebFrameLoader isLoadingSubresources]):
122         (-[WebFrameLoader isLoading]):
123         (-[WebFrameLoader stopLoadingSubresources]):
124         (-[WebFrameLoader addSubresourceLoader:]):
125         (-[WebFrameLoader removeSubresourceLoader:]):
126         (-[WebFrameLoader mainResourceData]):
127         (-[WebFrameLoader releaseMainResourceLoader]):
128         (-[WebFrameLoader cancelMainResourceLoad]):
129         (-[WebFrameLoader startLoadingMainResourceWithRequest:identifier:]):
130         (-[WebFrameLoader stopLoadingWithError:]):
131
132 2006-06-21  Brady Eidson  <beidson@apple.com>
133
134         Reviewed by Maciej
135
136         The WebCoreIconDatabaseBridge was getting messages sent to it after it had been closed, resulting in a crash
137         on an ASSERT().  After closing the databaseBridge, we simply set it to nil so this can't happen.
138         anymore.
139
140         * Misc/WebIconDatabase.m:
141         (-[WebIconDatabase _applicationWillTerminate:]):
142
143 2006-06-21  Tim Omernick  <timo@apple.com>
144
145         Reviewed by Geoff Garen.
146
147         <rdar://problem/4564131> WebPluginDatabase setAdditionalWebPlugInPaths needs to be per WebView
148
149         Added some WebView SPI so that individual WebViews may have different plugin search paths.  There are some 
150         limitations with the approach taken here:
151
152         - JavaScript may only access the global plugin DB.
153         - When this SPI is in use, certain WebView methods may not give accurate results, such as +canShowMIMEType:.
154         - This only works for plugins referenced using the <object> or <embed> tags; plugins that reside in non-standard
155         file system locations may not be loaded directly into frames.
156         
157         None of these issues are important to the client that needs this SPI.  Rather than re-architect our entire
158         plugin database, I think it is better to simply accept these limitations for now.
159
160         * Plugins/WebPluginDatabase.h:
161         Added "plugInPaths" ivar, so different plugin databases can have different search paths.
162         * Plugins/WebPluginDatabase.m:
163         (+[WebPluginDatabase installedPlugins]):
164         Give the global plugin database the default plugin search paths.
165         (+[WebPluginDatabase setAdditionalWebPlugInPaths:]):
166         Removed static global; this method now sets the plugin paths on the global plugin database.
167         (-[WebPluginDatabase setPlugInPaths:]):
168         Setter method for plugin paths.
169         (-[WebPluginDatabase close]):
170         New method; called when the plugin database is no longer needed (when its WebView is being destroyed).
171         (-[WebPluginDatabase init]):
172         Don't refresh in -init, so that callers can set the DB's plugin path array before it refreshes.
173         (-[WebPluginDatabase dealloc]):
174         Moved here from near the bottom of the file.  Release new ivar.
175         (-[WebPluginDatabase refresh]):
176         Use the plugInPaths ivar instead of calling pluginLocations().
177         Notify plugin packages when they are added to and removed from a plugin database.  A plugin package will
178         unload itself when it is removed from all of its plugin databases.
179         The only really tricky thing here is that the global MIME <-> view class registrations are only modified
180         by the shared plugin DB.
181         (+[WebPluginDatabase _defaultPlugInPaths]):
182         Refactored from the old pluginLocations() function; returns the default set of plugin search paths.
183
184         * Plugins/WebBasePluginPackage.h:
185         * Plugins/WebBasePluginPackage.m:
186         (-[WebBasePluginPackage dealloc]):
187         Assert that this package has been removed from all of its containing plugin databases.
188         (-[WebBasePluginPackage finalize]):
189         ditto
190         (-[WebBasePluginPackage wasAddedToPluginDatabase:]):
191         Add plugin database to set.
192         (-[WebBasePluginPackage wasRemovedFromPluginDatabase:]):
193         Remove plugin database from set.  If it was the last DB, then unload the plugin package.
194
195         * WebView/WebViewInternal.h:
196         Added instance methods to find the view class or plugin package, given a MIME type or file extension.
197         * WebView/WebViewPrivate.h:
198         Added SPI to set plugin search paths per WebView.
199         * WebView/WebView.m:
200         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
201         New method; tries the global MIME <-> view map first; failing that, it checks the WebView's plugin DB.
202         (-[WebView _close]):
203         Close the plugin DB.
204         (-[WebView _setAdditionalWebPlugInPaths:]):
205         Create the plugin DB if necessary, and set its plugin paths.
206         (-[WebView _pluginForMIMEType:]):
207         Checks global plugin DB, falls back on WebView DB.
208         (-[WebView _pluginForExtension:]):
209         ditto
210         (-[WebView _isMIMETypeRegisteredAsPlugin:]):
211         ditto
212
213         * WebCoreSupport/WebFrameBridge.m:
214         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
215         Use new WebView instance methods to look for plugins.
216         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
217         ditto
218         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
219         ditto
220
221 2006-06-20  Brady Eidson  <beidson@apple.com>
222
223         Reviewed by Maciej
224
225         Added calls through to the WebCoreIconDatabaseBridge for all the major WebIconDatabase API.  For now these calls
226         are wrapped with #ifdef's and are for debugging only.
227
228         * Misc/WebIconDatabase.h:
229         * Misc/WebIconDatabase.m:
230         (-[NSMutableDictionary _scaleIcon:toSize:]):
231         (-[NSMutableDictionary init]):
232         (-[NSMutableDictionary iconForURL:withSize:cache:]):
233         (-[NSMutableDictionary iconURLForURL:]):
234         (-[NSMutableDictionary retainIconForURL:]):
235         (-[NSMutableDictionary releaseIconForURL:]):
236         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
237         (-[WebIconDatabase _setIconURL:forURL:]):
238         (-[WebIconDatabase _hasIconForIconURL:]):
239         * Misc/WebIconLoader.m:
240         (-[WebIconLoader didFinishLoading]):
241
242         * Misc/WebKitLogging.h:  Added a logging channel for WebIconDatabase debugging
243         * Misc/WebKitLogging.m:
244         (WebKitInitializeLoggingChannelsIfNecessary):
245
246 2006-06-20  Adele Peterson  <adele@apple.com>
247
248         Reviewed by Tim Hatcher.
249
250         * WebView/WebMainResourceLoader.m: Added missing header to fix build on Leopard.
251
252 2006-06-20  Timothy Hatcher  <timothy@apple.com>
253
254         Reviewed by Darin.
255
256         Removes the @try/@catch from the callbacks to improve performance,
257         simply check if the proxy object's connection is still valid first.
258         Listener objects are now required to be NSDistantObjects.
259
260         Adds pause, resume and step support. The debugger process use to handle this,
261         but it caused problems when there were multiple listeners.
262
263         Sends the bundle identifier in the notification userInfo dictionary along with
264         process name and process ID.
265
266         * DefaultDelegates/WebScriptDebugServer.h:
267         * DefaultDelegates/WebScriptDebugServer.m:
268         (-[WebScriptDebugServer serverQuery:]):
269         (-[WebScriptDebugServer addListener:]):
270         (-[WebScriptDebugServer removeListener:]):
271         (-[WebScriptDebugServer step]):
272         (-[WebScriptDebugServer pause]):
273         (-[WebScriptDebugServer resume]):
274         (-[WebScriptDebugServer isPaused]):
275         (-[WebScriptDebugServer suspendProcessIfPaused]):
276         (-[WebScriptDebugServer webView:didParseSource:fromURL:sourceId:forWebFrame:]):
277         (-[WebScriptDebugServer webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
278         (-[WebScriptDebugServer webView:willExecuteStatement:sourceId:line:forWebFrame:]):
279         (-[WebScriptDebugServer webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
280         * DefaultDelegates/WebScriptDebugServerPrivate.h:
281         * WebKit.exp:
282
283 2006-06-19  Alexey Proskuryakov  <ap@nypop.com>
284
285         Reviewed by Darin.
286
287         - http://bugzilla.opendarwin.org/show_bug.cgi?id=5499
288         Page reload does not send any cache control headers
289
290         * WebView/WebFrame.m:
291         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]): Set a proper Cache-Control header for 
292         reload requests.
293         (-[WebFrame loadRequest:]): Reset loadType to WebFrameLoadTypeStandard (after a reload, it stayed at 
294         WebFrameLoadTypeReload, so _addExtraFieldsToRequest erroneously added a Cache-Control header to them).
295
296 2006-06-19  John Sullivan  <sullivan@apple.com>
297
298         Reviewed by Darin.
299         
300         - added mechanism to notify UIDelegate when part of the webview is redrawn. For now, it only
301           works for HTML views.
302
303         * WebView/WebUIDelegatePrivate.h:
304         Define a new UIDelegate method -webView:didDrawRect:
305         * WebView/WebHTMLView.m:
306         (-[WebView drawSingleRect:]):
307         Call through to UIDelegate if it implements that method. I tested that this does not impact PLT numbers
308         in the case where the delegate implements the method but does nothing in it.
309
310 2006-06-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
311
312         Reviewed by Maciej.
313
314         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9452
315           Assertion failure in -[WebFramePrivate setProvisionalDataSource:]
316
317         * WebView/WebFrame.m:
318         (-[WebFrame _checkLoadCompleteForThisFrame]): Avoid re-entering the delegate's
319         -[webView:didFailProvisionalLoadWithError:forFrame].
320
321 2006-06-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
322
323         Reviewed by xenon.
324
325         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9479
326           Disassociate the inspector from the frame when it detaches from its parent
327
328         * WebInspector/WebInspector.m:
329         (-[NSWindow setWebFrame:]): Added code to (de)register with the WebFrame
330         the inspector is (no longer) targeting.
331         (-[WebInspector _webFrameDetached:]): Added. Moved the code that was previously
332         in -[inspectedWindowWillClose:] here. This is called by the WebFrame when it
333         is detached from its parent.
334         * WebInspector/WebInspectorInternal.h:
335         * WebView/WebFrame.m:
336         (-[WebFramePrivate dealloc]):
337         (-[WebFrame _detachFromParent]): Added code to notify all registered inspectors
338         that the WebFrame is detaching.
339         (-[WebFrame _addInspector:]): Added.
340         (-[WebFrame _removeInspector:]): Added.
341         * WebView/WebFrameInternal.h:
342
343 2006-06-18  Anders Carlsson  <acarlsson@apple.com>
344
345         Reviewed by Geoff.
346
347         * WebCoreSupport/WebFrameBridge.m:
348         (-[WebFrameBridge shouldInterruptJavaScript]):
349         Ask the UI delegate if the script should be interrupted.
350         
351         * WebView/WebUIDelegatePrivate.h:
352         Declare webViewShouldInterruptJavaScript: delegate method
353
354 2006-06-17  Mitz Pettel  <opendarwin.org@mitzpettel.com>
355
356         Reviewed by Darin.
357
358         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9466
359           Assertion failure when dragging an image from the document into Safari's address bar
360
361         * WebView/WebFrameView.m:
362         (-[WebFrameView _setDocumentView:]): Reset the WebView's initiatedDrag flag
363         when the document view is changed.
364         * WebView/WebHTMLView.m:
365         (-[WebHTMLView draggedImage:endedAt:operation:]): Changed the ASSERT to allow
366         for drags that end after the view has been removed from the WebView.
367
368 2006-06-16  Timothy Hatcher  <timothy@apple.com>
369
370         Reviewed by Tim O.
371
372         Exposes a distributed objects server for clients to register for script debugger calls.
373         For preformance concerns this is disabled by default, you will need to enable this per application.
374         To enable for Safari do this: defaults write com.apple.Safari WebKitScriptDebuggerEnabled -bool true
375
376         Clients will need to listen to the following distributed notification to discover servers:
377         WebScriptDebugServerDidLoadNotification
378
379         To discover servers that previously loaded before the client, the client needs to send the following notification:
380         WebScriptDebugServerQueryNotification
381
382         All servers will reply with the WebScriptDebugServerQueryReplyNotification notification that contains the
383         registered server connection name to use with distributed objects.
384
385         * DefaultDelegates/WebScriptDebugServer.h: Added.
386         * DefaultDelegates/WebScriptDebugServer.m: Added.
387         (+[WebScriptDebugServer sharedScriptDebugServer]):
388         (-[WebScriptDebugServer init]):
389         (-[WebScriptDebugServer dealloc]):
390         (-[WebScriptDebugServer serverQuery:]):
391         (-[WebScriptDebugServer listenerConnectionDidDie:]):
392         (-[WebScriptDebugServer addListener:]):
393         (-[WebScriptDebugServer removeListener:]):
394         (-[WebScriptDebugServer webView:didParseSource:fromURL:sourceId:forWebFrame:]):
395         (-[WebScriptDebugServer webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
396         (-[WebScriptDebugServer webView:willExecuteStatement:sourceId:line:forWebFrame:]):
397         (-[WebScriptDebugServer webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
398         * DefaultDelegates/WebScriptDebugServerPrivate.h: Added.
399         * WebCoreSupport/WebFrameBridge.m:
400         (-[WebFrameBridge windowObjectCleared]):
401         * WebKit.exp:
402         * WebKit.xcodeproj/project.pbxproj:
403         * WebView/WebScriptDebugDelegate.m:
404         (-[WebScriptCallFrame parsedSource:fromURL:sourceId:]):
405         (-[WebScriptCallFrame enteredFrame:sourceId:line:]):
406         (-[WebScriptCallFrame hitStatement:sourceId:line:]):
407         (-[WebScriptCallFrame leavingFrame:sourceId:line:]):
408         * WebView/WebView.m:
409         (+[WebView _developerExtrasEnabled]):
410         (+[WebView _scriptDebuggerEnabled]):
411         (-[WebView _menuForElement:defaultItems:]):
412         (-[WebView _commonInitializationWithFrameName:groupName:]):
413         * WebView/WebViewPrivate.h:
414
415 2006-06-16  Adele Peterson  <adele@apple.com>
416
417         Reviewed by Alice.
418
419         Added initialization for WKDrawBezeledTextArea.
420
421         * WebCoreSupport/WebSystemInterface.m:
422         (InitWebCoreSystemInterface):
423
424 2006-06-15  Timothy Hatcher  <timothy@apple.com>
425
426         Reviewed by Geoff and Darin.
427         
428         Prefer the DWARF debugging symbols format for use in Xcode 2.3.
429
430         * WebKit.xcodeproj/project.pbxproj:
431
432 2006-06-15  John Sullivan  <sullivan@apple.com>
433
434         Reviewed by Tim O.
435         
436         Fixed bug in WebKit support for computing but not highlighting rects for text matches.
437
438         * WebView/WebView.m:
439         (-[WebView rectsForTextMatches]):
440         leave out empty rects, and convert rects to WebView coordinates. Since this makes a batch
441         of autoreleased NSValue objects, use a local autorelease pool
442
443 2006-02-11  David Kilzer  <ddkilzer@kilzer.net>
444
445         Reviewed by John Sullivan.
446
447         * Plugins/WebPluginController.m:
448         (-[WebPluginController _cancelOutstandingChecks]):
449         add nil check before calling CFSetApplyFunction
450
451 2006-06-14  Levi Weintraub  <lweintraub@apple.com>
452
453         Reviewed by justin
454         
455         <http://bugzilla.opendarwin.org/show_bug.cgi?id=7580>
456         TinyMCE: Implement execCommand(formatBlock, ...)
457         
458         * English.lproj/Localizable.strings:
459         * WebCoreSupport/WebFrameBridge.m:
460         (-[WebFrameBridge nameForUndoAction:]):
461
462 2006-06-14  Tim Omernick  <timo@apple.com>
463
464         Reviewed by John Sullivan.
465
466         <rdar://problem/4577988> GC: WebPluginController uses inefficient resurrecting enumeration
467
468         * Plugins/WebPluginController.m:
469         (cancelOutstandingCheck):
470         (-[WebPluginController _cancelOutstandingChecks]):
471         Use CFSetApplyFunction() instead of an enumerator to guard against modifications to the set while enumerating.
472
473 2006-06-13  John Sullivan  <sullivan@apple.com>
474
475         Reviewed by Tim O.
476         
477         - fixed <rdar://problem/4498606> REGRESSION (417.8-420+): 3 missing items (but extra separators) in context 
478         menu in Mail message body
479
480         * WebView/WebView.m:
481         (-[WebView _menuForElement:defaultItems:]):
482         Add special-case hackery to recover from this SPI -> API mismatch.
483
484 2006-06-13  Tim Omernick  <timo@apple.com>
485
486         Reviewed by Anders.
487
488         Fixed a recently-introduced assertion failure when handling 404 errors.
489
490         * WebView/WebDataSource.m:
491         (-[WebDataSource _handleFallbackContent]):
492         Use the -[WebFrame _bridge] instead of -[WebDataSource _bridge].  The former is not valid until the data
493         source has been committed, which is not the case when the resource fails to load.  The latter is safe to call
494         at any time.  This broke last night with Maciej's change to WebFrameResourceLoader.  The old code used to
495         call -[WebFrame _bridge].
496
497 2006-06-13  Anders Carlsson  <acarlsson@apple.com>
498
499         Reviewed by Geoff.
500
501         http://bugzilla.opendarwin.org/show_bug.cgi?id=9406
502         REGRESSION: fix for bug 9390 broke two layout tests
503
504         * Plugins/WebPluginDatabase.h:
505         (-[WebPluginDatabase isMIMETypeRegistered:]):
506         Add new function isMIMETypeRegistered which returns whether a given MIME type has a 
507         plugin registered. 
508
509         * Plugins/WebPluginDatabase.m:
510         (-[WebPluginDatabase init]):        
511         Init set of registered MIME types.
512         
513         (-[WebPluginDatabase refresh]):
514         Add and remove MIME types from the set of registered MIME types when registering and unregistering
515         plugin MIME types.
516         
517         (-[WebPluginDatabase dealloc]):
518         Release set of registered MIME types.
519         
520         * WebCoreSupport/WebFrameBridge.m:
521         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
522         Use isMIMETypeRegistered here.
523
524 2006-06-12  Maciej Stachowiak  <mjs@apple.com>
525
526         - fix for cocoa exception (whoops)
527
528         * WebView/WebView.m:
529         (+[WebView _generatedMIMETypeForURLScheme:]): put this back
530         * WebView/WebDataSource.m:
531         (+[WebDataSource _generatedMIMETypeForURLScheme:]): call WebView
532
533 2006-06-12  Maciej Stachowiak  <mjs@apple.com>
534
535         Reviewed by Darin.
536         
537         - remove use of WebView and related from WebMainResourceLoader
538
539         * WebKit.xcodeproj/project.pbxproj:
540         * WebView/WebDataSource.m:
541         (+[WebDataSource _generatedMIMETypeForURLScheme:]):
542         (+[WebDataSource _representationExistsForURLScheme:]):
543         (+[WebDataSource _canShowMIMEType:]):
544         (-[WebDataSource _handleFallbackContent]):
545         (-[WebDataSource _decidePolicyForMIMEType:decisionListener:]):
546         * WebView/WebDataSourceInternal.h:
547         * WebView/WebFrame.m:
548         (-[WebFrame _isMainFrame]):
549         * WebView/WebFrameInternal.h:
550         * WebView/WebMainResourceLoader.m:
551         (-[WebMainResourceLoader willSendRequest:redirectResponse:]):
552         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
553         (-[WebMainResourceLoader checkContentPolicyForResponse:]):
554         (-[WebMainResourceLoader loadWithRequestNow:]):
555         * WebView/WebView.m:
556
557 2006-06-12  Tim Omernick  <timo@apple.com>
558
559         Reviewed by Maciej.
560
561         <rdar://problem/4526052> intermittent assertion failure in -[WebBasePluginPackage dealloc] running layout tests
562
563         * Plugins/WebNetscapePluginPackage.m:
564         (-[WebNetscapePluginPackage _initWithPath:]):
565         Renamed from -initWithPath:.  Instead of releasing/deallocating self on error, return NO.
566         (-[WebNetscapePluginPackage initWithPath:]):
567         Call the new -_initWithPath:.  If it returns NO, unload the plugin package before deallocating it.
568         
569 >>>>>>> .r14837
570 2006-06-11  Darin Adler  <darin@apple.com>
571
572         - try to fix Windows build
573
574         * COM/WebKitDLL.cpp: (loadResourceIntoArray): Use Vector<char> instead of
575         DeprecatedByteArray.
576
577 2006-06-11  Mitz Pettel  <opendarwin.org@mitzpettel.com>
578
579         Reviewed by Tim H.
580
581         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8672
582           Red outline from web inspector reappears after inspector is closed
583
584         * WebInspector/WebInspector.m:
585         (-[NSWindow windowWillClose:]): Added a call to setWebFrame to avoid further
586         load progress notifications.
587         (-[NSWindow setWebFrame:]): Changed to resign the WebView's hostWindow rather
588         than its window for close notifications, to avoid resigning from all windows' close
589         notifications (including the inspector window's) when the WebView is in a hidden tab.
590         Also changed to prevent highlighting the initial focused node.
591
592 2006-06-11  Anders Carlsson  <acarlsson@apple.com>
593
594         Reviewed by Tim.
595
596         http://bugzilla.opendarwin.org/show_bug.cgi?id=9390
597         Move full-frame plugins to WebCore
598
599         * Plugins/WebBaseNetscapePluginStream.h:
600         * Plugins/WebBaseNetscapePluginStream.m:
601         (-[WebBaseNetscapePluginStream instance]):
602         Add instance method which returns the plugin instance.
603         
604         * Plugins/WebBasePluginPackage.h:
605         Add WebPluginManualLoader protocol
606         
607         * Plugins/WebNetscapePluginDocumentView.h: Removed.
608         * Plugins/WebNetscapePluginDocumentView.m: Removed.
609
610         * Plugins/WebNetscapePluginEmbeddedView.h:
611         * Plugins/WebNetscapePluginEmbeddedView.m:
612         (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:]):
613         (-[WebNetscapePluginEmbeddedView dealloc]):
614         (-[WebNetscapePluginEmbeddedView didStart]):
615         (-[WebNetscapePluginEmbeddedView pluginView:receivedResponse:]):
616         (-[WebNetscapePluginEmbeddedView pluginView:receivedData:]):
617         (-[WebNetscapePluginEmbeddedView pluginView:receivedError:]):
618         (-[WebNetscapePluginEmbeddedView pluginViewFinishedLoading:]):
619         (-[WebNetscapePluginEmbeddedView redeliverStream]):
620         Make WebNetscapePluginEmbeddedView support the WebPluginManualLoader protocol. It creates a plugin stream and feeds the
621         data manually. Much of this code has been copied from WebNetscapePluginRepresentation.
622
623         * Plugins/WebNetscapePluginRepresentation.h: Removed.
624         * Plugins/WebNetscapePluginRepresentation.m: Removed.
625
626         * Plugins/WebPluginController.h:
627         * Plugins/WebPluginController.m:
628         (-[WebPluginController pluginView:receivedResponse:]):
629         (-[WebPluginController pluginView:receivedData:]):
630         (-[WebPluginController pluginView:receivedError:]):
631         (-[WebPluginController pluginViewFinishedLoading:]):
632         Make WebPluginController support the WebPluginManualLoader protocol so it can feed data manually to WebKit plugins.
633
634         * Plugins/WebPluginDatabase.m:        
635         (-[WebPluginDatabase refresh]):
636         Use WebHTMLView and WebHTMLRepresentation when registering/unregistering plug-in MIME types.
637         
638         * Plugins/WebPluginDocumentView.h: Removed.
639         * Plugins/WebPluginDocumentView.m: Removed.
640
641         * WebCoreSupport/WebFrameBridge.m:
642         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
643         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
644         Add loadManually argument.
645         
646         (-[WebFrameBridge redirectDataToPlugin:]):
647         Call down to the HTML representation.
648         
649         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
650         Pass NO to loadManually.
651         
652         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
653         Explicitly check if the MIME type is supported by a plug-in instead of checking the view class.
654         
655         * WebCoreSupport/WebViewFactory.m:
656         (-[WebViewFactory pluginSupportsMIMEType:]):
657         New function which returns whether any plugins support a given MIME type.
658         
659         * WebKit.xcodeproj/project.pbxproj:
660         Update for removed files.
661         
662         * WebView/WebFrame.m:
663         (-[WebFrame _reloadForPluginChanges]):
664         Remove view type checks.
665         
666         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
667         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
668         Remove FIXME comments.
669         
670         * WebView/WebHTMLRepresentation.m:
671         (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):        
672         New function which redirects incoming data to a manual loader.
673         
674         (-[WebHTMLRepresentation receivedData:withDataSource:]):
675         (-[WebHTMLRepresentation receivedError:withDataSource:]):
676         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
677         Optionally redirect incoming data.
678         
679         * WebView/WebHTMLRepresentationPrivate.h:
680
681 2006-06-09  John Sullivan  <sullivan@apple.com>
682
683         Reviewed by Tim Omernick and Dave Hyatt.
684
685         WebKit support for computing but not highlighting rects for text matches.
686
687         * WebView/WebHTMLViewPrivate.h:
688         added markedTextMatchesAreHighlighted/setMarkedTextMatchesAreHighlighted and
689         rectsForTextMatches, and renamed related methods for clarity/consistency
690         * WebView/WebHTMLView.m:
691         (-[WebHTMLView markAllMatchesForText:caseSensitive:]):
692         renamed, calls similarly-renamed method
693         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
694         new method, calls through to bridge
695         (-[WebHTMLView markedTextMatchesAreHighlighted]):
696         ditto
697         (-[WebHTMLView unmarkAllTextMatches]):
698         renamed
699         (-[WebHTMLView rectsForTextMatches]):
700         new method, calls through to bridge
701
702         * WebView/WebViewPrivate.h:
703         added rectsForTextMatches, renamed other methods (and added highlight: parameter)
704         * WebView/WebView.m:
705         (-[WebView markAllMatchesForText:caseSensitive:highlight:]):
706         renamed for clarity/consistency, and now has highlight: parameter, which is passed down
707         (-[WebView unmarkAllTextMatches]):
708         renamed for clarity/consistency, and calls similarly-renamed method lower down. diff got
709         confused with the end of this and the end of the next method.
710         (-[WebView rectsForTextMatches]):
711         new method, calls through to WebHTMLView as related methods currently do
712
713 2006-06-10  Graham Dennis  <Graham.Dennis@gmail.com>
714
715         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9384>
716         WebView's initWithCoder: method does not set useBackForwardList
717         correctly
718         
719         Reviewed by John Sullivan.
720
721         * WebView/WebView.m:
722         (-[WebView initWithCoder:]):
723         Make sure that the function variable useBackForwardList is correctly
724         set, so that the copy in the _private ivar is set.
725
726 2006-06-09  David Hyatt  <hyatt@apple.com>
727
728         Rename updateFocusState to updateActiveState.
729
730         * WebView/WebHTMLView.m:
731         (-[WebHTMLView _updateActiveState]):
732         (-[NSArray viewDidMoveToWindow]):
733         (-[NSArray windowDidBecomeKey:]):
734         (-[NSArray windowDidResignKey:]):
735         (-[NSArray becomeFirstResponder]):
736         (-[NSArray resignFirstResponder]):
737         (-[WebHTMLView _formControlIsBecomingFirstResponder:]):
738         (-[WebHTMLView _formControlIsResigningFirstResponder:]):
739         * WebView/WebHTMLViewPrivate.h:
740
741 2006-06-09  David Hyatt  <hyatt@apple.com>
742
743         Rename displaysWithFocusAttributes to isActive.
744
745         Reviewed by sfalken
746
747         * WebKit.xcodeproj/project.pbxproj:
748         * WebView/WebHTMLView.m:
749         (-[WebHTMLView _updateFocusState]):
750
751 2006-06-08  Justin Garcia  <justin.garcia@apple.com>
752
753         Reviewed by levi
754         
755         <http://bugzilla.opendarwin.org/show_bug.cgi?id=4468>
756         Implement execCommand(Insert{Un}OrderedList)
757
758         * WebView/WebFrame.m:
759         (-[WebFrame _findFrameWithSelection]): Removed an assertion
760         that we only have one frame with a selection.  
761         * WebView/WebView.m:
762         (-[WebView selectedFrame]): Ditto.
763
764 2006-06-08  Timothy Hatcher  <timothy@apple.com>
765
766         Reviewed by Darin and John.
767
768         <rdar://problem/3600734> API: please add a way to turn vertical scrollbar
769         always on (for Mail, to avoid reflow when typing)
770
771         Adds new methods to lock the scrolling mode on WebDynamicScrollBarsView.
772         Locking the scroll mode prevents WebCore from changing it as needed.
773         Also adds an SPI on WebView that will lock the "always on" mode
774         for each scroller.
775
776         * WebKit.xcodeproj/project.pbxproj:
777         * WebView/WebDynamicScrollBarsView.h:
778         * WebView/WebDynamicScrollBarsView.m:
779         (-[WebDynamicScrollBarsView setAllowsScrolling:]):
780         (-[WebDynamicScrollBarsView allowsScrolling]):
781         (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]):
782         (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]):
783         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
784         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
785         (-[WebDynamicScrollBarsView setScrollingMode:]):
786         (-[WebDynamicScrollBarsView setHorizontalScrollingModeLocked:]):
787         (-[WebDynamicScrollBarsView setVerticalScrollingModeLocked:]):
788         (-[WebDynamicScrollBarsView setScrollingModesLocked:]):
789         (-[WebDynamicScrollBarsView horizontalScrollingModeLocked]):
790         (-[WebDynamicScrollBarsView verticalScrollingModeLocked]):
791         * WebView/WebView.m:
792         (-[WebView setAlwaysShowVerticalScroller:]):
793         (-[WebView alwaysShowVerticalScroller]):
794         (-[WebView setAlwaysShowHorizontalScroller:]):
795         (-[WebView alwaysShowHorizontalScroller]):
796         * WebView/WebViewPrivate.h:
797
798 2006-06-08  Darin Adler  <darin@apple.com>
799
800         Reviewed by Justin.
801
802         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8616
803           REGRESSION: TinyMCE: Crash on Undo
804
805         * WebView/WebHTMLView.m:
806         (-[WebHTMLView _topHTMLView]): Added.
807         (-[WebHTMLView _isTopHTMLView]): Added.
808         (-[WebHTMLView _insideAnotherHTMLView]): Changed to use _topHTMLView.
809         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
810         Forward to the top HTML view, so that only the top view ever starts a dragging operation.
811         Change dragging code to not assume that the dragged node is in the current view's document.
812         Added checks that the node is an element in a couple places and coordinate conversions.
813         (-[WebHTMLView _mayStartDragAtEventLocation:]): Forward to the top HTML view.
814         (-[NSArray addMouseMovedObserver]): Change to do nothing when the dataSource field is 0,
815         since we now use the dataSource field to get to the WebView.
816         (-[NSArray removeMouseMovedObserver]): Added a comment.
817         (-[NSArray dragImage:at:offset:event:pasteboard:source:slideBack:]):
818         Forward to the top HTML view.
819         (-[NSArray draggingSourceOperationMaskForLocal:]): Assert that it's the top HTML view.
820         (-[NSArray draggedImage:movedTo:]): Ditto.
821         (-[NSArray draggedImage:endedAt:operation:]): Ditto.
822         (-[NSArray namesOfPromisedFilesDroppedAtDestination:]): Ditto.
823         (-[NSArray _canProcessDragWithDraggingInfo:]): Ditto.
824         (-[NSArray _isMoveDrag]): Ditto.
825         (-[NSArray draggingUpdatedWithDraggingInfo:actionMask:]): Ditto.
826         (-[NSArray draggingCancelledWithDraggingInfo:]): Ditto.
827         (-[NSArray concludeDragForDraggingInfo:actionMask:]): Ditto. Also added code to work
828         with the appropriate bridge when receiving a drag. This fixes the problem where the
829         top level frame got a selection intended for the inner frame; the source of the bug.
830         (-[NSArray elementAtPoint:allowShadowContent:]): Added code to convert the coordinates
831         so this works properly when returning an element from an inner frame.
832         (-[NSArray setDataSource:]): Added a call to addMouseMovedObserver, needed now that
833         addMouseMovedObserver won't do anything if called when dataSource is nil.
834         (-[WebHTMLView _delegateDragSourceActionMask]): Forward to the top HTML view.
835
836         * WebView/WebView.m:
837         (-[WebViewPrivate dealloc]): Removed code to release dragCaretBridge since that field
838         is now gone.
839         (-[WebView moveDragCaretToPoint:]): Always call the main frame's bridge, since the
840         drag caret is now a page-level item. Later we'll move it to the page bridge.
841         (-[WebView removeDragCaret]): Ditto.
842
843 2006-06-07  David Hyatt  <hyatt@apple.com>
844
845         Add support for custom highlighting to WebKit.
846
847         Reviewed by justin
848
849         * WebCoreSupport/WebFrameBridge.m:
850         (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:]):
851         * WebView/WebHTMLView.m:
852         (-[WebHTMLView _highlighterForType:]):
853         * WebView/WebHTMLViewInternal.h:
854         * WebView/WebHTMLViewPrivate.h:
855
856 2006-06-07  Adele Peterson  <adele@apple.com>
857
858         Reviewed by Hyatt. 
859
860         Added resources for missingImage and textAreaResizeCorner.
861
862         * COM/WebKitDLL.cpp:
863         (loadResourceIntoArray): Added. Returns a DeprecatedByteArray with the resource's data.
864         * WebKit.vcproj/WebKit.rc: Added missing image and resize pngs as resources. 
865         * WebKit.vcproj/WebKit.vcproj: Added pngs.
866         * WebKit.vcproj/missingImage.png: Added.
867         * WebKit.vcproj/resource.h: Added entries for pngs.
868         * WebKit.vcproj/textAreaResizeCorner.png: Added.
869
870 2006-06-07  David Hyatt  <hyatt@apple.com>
871
872         Add SPI for setting and removing custom highlighters.
873
874         Reviewed by Tim H
875
876         * WebView/WebHTMLView.m:
877         (-[WebTextCompleteController dealloc]):
878         (-[WebHTMLView _setHighlighter:ofType:]):
879         (-[WebHTMLView _removeHighlighterOfType:]):
880         * WebView/WebHTMLViewInternal.h:
881         * WebView/WebHTMLViewPrivate.h:
882
883 2006-06-06  Adele Peterson  <adele@apple.com>
884
885         Reviewed by Justin. 
886
887         * COM/WebView.cpp:
888         (WebView::keyPress): Added case for VK_RETURN. 
889
890 2006-06-06  Anders Carlsson  <acarlsson@apple.com>
891
892         Reviewed by John.
893
894         * WebView/WebFrame.m:
895         (-[WebFrame _reloadForPluginChanges]):
896         Don't traverse the view hierarchy looking for plugin views. Instead, just
897         ask the frame whether it contains any plugins.
898
899 2006-06-03  Steve Falkenburg  <sfalken@apple.com>
900
901         Reviewed by hyatt.
902         
903         Add implementation of loadHTMLString for Spinneret
904
905         * COM/WebFrame.cpp:
906         (WebFrame::loadHTMLString):
907
908 2006-06-02  Steve Falkenburg  <sfalken@apple.com>
909
910         Reviewed by darin.
911
912         New hosting for Spinneret to avoid static linking
913
914         * COM: Added.
915         * COM/Interfaces: Added.
916         * COM/Interfaces/DOMCSS.idl: Added.
917         * COM/Interfaces/DOMCore.idl: Added.
918         * COM/Interfaces/DOMHTML.idl: Added.
919         * COM/Interfaces/DOMRange.idl: Added.
920         * COM/Interfaces/IWebArchive.idl: Added.
921         * COM/Interfaces/IWebAttributedString.idl: Added.
922         * COM/Interfaces/IWebBackForwardList.idl: Added.
923         * COM/Interfaces/IWebDataSource.idl: Added.
924         * COM/Interfaces/IWebDocument.idl: Added.
925         * COM/Interfaces/IWebDownload.idl: Added.
926         * COM/Interfaces/IWebEditingDelegate.idl: Added.
927         * COM/Interfaces/IWebError.idl: Added.
928         * COM/Interfaces/IWebFrame.idl: Added.
929         * COM/Interfaces/IWebFrameLoadDelegate.idl: Added.
930         * COM/Interfaces/IWebFrameView.idl: Added.
931         * COM/Interfaces/IWebHistoryItem.idl: Added.
932         * COM/Interfaces/IWebIconDatabase.idl: Added.
933         * COM/Interfaces/IWebImage.idl: Added.
934         * COM/Interfaces/IWebMutableURLRequest.idl: Added.
935         * COM/Interfaces/IWebNotification.idl: Added.
936         * COM/Interfaces/IWebPolicyDelegate.idl: Added.
937         * COM/Interfaces/IWebPreferences.idl: Added.
938         * COM/Interfaces/IWebResource.idl: Added.
939         * COM/Interfaces/IWebResourceLoadDelegate.idl: Added.
940         * COM/Interfaces/IWebScriptObject.idl: Added.
941         * COM/Interfaces/IWebUIDelegate.idl: Added.
942         * COM/Interfaces/IWebURLAuthenticationChallenge.idl: Added.
943         * COM/Interfaces/IWebURLRequest.idl: Added.
944         * COM/Interfaces/IWebURLResponse.idl: Added.
945         * COM/Interfaces/IWebUndoManager.idl: Added.
946         * COM/Interfaces/IWebView.idl: Added.
947         * COM/Interfaces/WebKit.idl: Added.
948         * COM/WebBackForwardList.cpp: Added.
949         (WebBackForwardList::WebBackForwardList):
950         (WebBackForwardList::~WebBackForwardList):
951         (WebBackForwardList::createInstance):
952         (WebBackForwardList::QueryInterface):
953         (WebBackForwardList::AddRef):
954         (WebBackForwardList::Release):
955         (WebBackForwardList::addItem):
956         (WebBackForwardList::goBack):
957         (WebBackForwardList::goForward):
958         (WebBackForwardList::goToItem):
959         (WebBackForwardList::backItem):
960         (WebBackForwardList::currentItem):
961         (WebBackForwardList::forwardItem):
962         (WebBackForwardList::backListWithLimit):
963         (WebBackForwardList::forwardListWithLimit):
964         (WebBackForwardList::capacity):
965         (WebBackForwardList::setCapacity):
966         (WebBackForwardList::backListCount):
967         (WebBackForwardList::forwardListCount):
968         (WebBackForwardList::containsItem):
969         (WebBackForwardList::itemAtIndex):
970         (WebBackForwardList::setPageCacheSize):
971         (WebBackForwardList::pageCacheSize):
972         * COM/WebBackForwardList.h: Added.
973         * COM/WebDataSource.cpp: Added.
974         (WebDataSource::WebDataSource):
975         (WebDataSource::~WebDataSource):
976         (WebDataSource::createInstance):
977         (WebDataSource::QueryInterface):
978         (WebDataSource::AddRef):
979         (WebDataSource::Release):
980         (WebDataSource::initWithRequest):
981         (WebDataSource::data):
982         (WebDataSource::representation):
983         (WebDataSource::webFrame):
984         (WebDataSource::initialRequest):
985         (WebDataSource::request):
986         (WebDataSource::response):
987         (WebDataSource::textEncodingName):
988         (WebDataSource::isLoading):
989         (WebDataSource::pageTitle):
990         (WebDataSource::unreachableURL):
991         (WebDataSource::webArchive):
992         (WebDataSource::mainResource):
993         (WebDataSource::subresources):
994         (WebDataSource::subresourceForURL):
995         (WebDataSource::addSubresource):
996         * COM/WebDataSource.h: Added.
997         * COM/WebFrame.cpp: Added.
998         (WebFrame::WebFramePrivate::WebFramePrivate):
999         (WebFrame::WebFramePrivate::~WebFramePrivate):
1000         (WebFrame::WebFrame):
1001         (WebFrame::~WebFrame):
1002         (WebFrame::createInstance):
1003         (WebFrame::QueryInterface):
1004         (WebFrame::AddRef):
1005         (WebFrame::Release):
1006         (WebFrame::initWithName):
1007         (WebFrame::name):
1008         (WebFrame::webView):
1009         (WebFrame::frameView):
1010         (WebFrame::DOMDocument):
1011         (WebFrame::frameElement):
1012         (WebFrame::loadRequest):
1013         (WebFrame::loadData):
1014         (WebFrame::loadHTMLString):
1015         (WebFrame::loadAlternateHTMLString):
1016         (WebFrame::loadArchive):
1017         (WebFrame::dataSource):
1018         (WebFrame::provisionalDataSource):
1019         (WebFrame::stopLoading):
1020         (WebFrame::reload):
1021         (WebFrame::findFrameNamed):
1022         (WebFrame::parentFrame):
1023         (WebFrame::childFrames):
1024         (WebFrame::paint):
1025         (WebFrame::impl):
1026         (WebFrame::loadDataSource):
1027         (WebFrame::loading):
1028         (WebFrame::goToItem):
1029         (WebFrame::loadItem):
1030         (WebSystemMainMemory):
1031         (WebFrame::getObjectCacheSize):
1032         (WebFrame::receivedRedirect):
1033         (WebFrame::receivedResponse):
1034         (WebFrame::receivedData):
1035         (WebFrame::receivedAllData):
1036         (WebFrame::openURL):
1037         (WebFrame::submitForm):
1038         (WebFrame::setTitle):
1039         (WebFrame::setStatusText):
1040         * COM/WebFrame.h: Added.
1041         * COM/WebHistoryItem.cpp: Added.
1042         (WebHistoryItem::WebHistoryItem):
1043         (WebHistoryItem::~WebHistoryItem):
1044         (WebHistoryItem::createInstance):
1045         (WebHistoryItem::QueryInterface):
1046         (WebHistoryItem::AddRef):
1047         (WebHistoryItem::Release):
1048         (WebHistoryItem::initWithURLString):
1049         (WebHistoryItem::originalURLString):
1050         (WebHistoryItem::URLString):
1051         (WebHistoryItem::title):
1052         (WebHistoryItem::lastVisitedTimeInterval):
1053         (WebHistoryItem::setAlternateTitle):
1054         (WebHistoryItem::alternateTitle):
1055         (WebHistoryItem::icon):
1056         * COM/WebHistoryItem.h: Added.
1057         * COM/WebIconDatabase.cpp: Added.
1058         (WebIconDatabase::WebIconDatabase):
1059         (WebIconDatabase::~WebIconDatabase):
1060         (WebIconDatabase::createInstance):
1061         (WebIconDatabase::QueryInterface):
1062         (WebIconDatabase::AddRef):
1063         (WebIconDatabase::Release):
1064         (WebIconDatabase::sharedIconDatabase):
1065         (WebIconDatabase::iconForURL):
1066         (WebIconDatabase::defaultIconWithSize):
1067         (WebIconDatabase::retainIconForURL):
1068         (WebIconDatabase::releaseIconForURL):
1069         (WebIconDatabase::delayDatabaseCleanup):
1070         (WebIconDatabase::allowDatabaseCleanup):
1071         * COM/WebIconDatabase.h: Added.
1072         * COM/WebKitClassFactory.cpp: Added.
1073         (WebKitClassFactory::WebKitClassFactory):
1074         (WebKitClassFactory::~WebKitClassFactory):
1075         (WebKitClassFactory::QueryInterface):
1076         (WebKitClassFactory::AddRef):
1077         (WebKitClassFactory::Release):
1078         (WebKitClassFactory::CreateInstance):
1079         (WebKitClassFactory::LockServer):
1080         * COM/WebKitClassFactory.h: Added.
1081         * COM/WebKitDLL.cpp: Added.
1082         (DllMain):
1083         (DllGetClassObject):
1084         (DllCanUnloadNow):
1085         (DllUnregisterServer):
1086         (DllRegisterServer):
1087         * COM/WebKitDLL.h: Added.
1088         * COM/WebMutableURLRequest.cpp: Added.
1089         (WebMutableURLRequest::WebMutableURLRequest):
1090         (WebMutableURLRequest::~WebMutableURLRequest):
1091         (WebMutableURLRequest::createInstance):
1092         (WebMutableURLRequest::QueryInterface):
1093         (WebMutableURLRequest::AddRef):
1094         (WebMutableURLRequest::Release):
1095         (WebMutableURLRequest::requestWithURL):
1096         (WebMutableURLRequest::allHTTPHeaderFields):
1097         (WebMutableURLRequest::cachePolicy):
1098         (WebMutableURLRequest::HTTPBody):
1099         (WebMutableURLRequest::HTTPBodyStream):
1100         (WebMutableURLRequest::HTTPMethod):
1101         (WebMutableURLRequest::HTTPShouldHandleCookies):
1102         (WebMutableURLRequest::initWithURL):
1103         (WebMutableURLRequest::mainDocumentURL):
1104         (WebMutableURLRequest::timeoutInterval):
1105         (WebMutableURLRequest::URL):
1106         (WebMutableURLRequest::valueForHTTPHeaderField):
1107         (WebMutableURLRequest::addValue):
1108         (WebMutableURLRequest::setAllHTTPHeaderFields):
1109         (WebMutableURLRequest::setCachePolicy):
1110         (WebMutableURLRequest::setHTTPBody):
1111         (WebMutableURLRequest::setHTTPBodyStream):
1112         (WebMutableURLRequest::setHTTPMethod):
1113         (WebMutableURLRequest::setHTTPShouldHandleCookies):
1114         (WebMutableURLRequest::setMainDocumentURL):
1115         (WebMutableURLRequest::setTimeoutInterval):
1116         (WebMutableURLRequest::setURL):
1117         (WebMutableURLRequest::setValue):
1118         (WebMutableURLRequest::setFormData):
1119         (WebMutableURLRequest::formData):
1120         * COM/WebMutableURLRequest.h: Added.
1121         * COM/WebView.cpp: Added.
1122         (WebView::WebView):
1123         (WebView::~WebView):
1124         (WebView::createInstance):
1125         (WebView::mouseMoved):
1126         (WebView::mouseDown):
1127         (WebView::mouseUp):
1128         (WebView::mouseDoubleClick):
1129         (WebView::keyPress):
1130         (registerWebView):
1131         (WebViewWndProc):
1132         (calculateScrollDelta):
1133         (scrollMessageForKey):
1134         (WebView::goToItem):
1135         (WebView::QueryInterface):
1136         (WebView::AddRef):
1137         (WebView::Release):
1138         (WebView::canShowMIMEType):
1139         (WebView::canShowMIMETypeAsHTML):
1140         (WebView::MIMETypesShownAsHTML):
1141         (WebView::setMIMETypesShownAsHTML):
1142         (WebView::URLFromPasteboard):
1143         (WebView::URLTitleFromPasteboard):
1144         (WebView::initWithFrame):
1145         (WebView::setUIDelegate):
1146         (WebView::uiDelegate):
1147         (WebView::setResourceLoadDelegate):
1148         (WebView::resourceLoadDelegate):
1149         (WebView::setDownloadDelegate):
1150         (WebView::downloadDelegate):
1151         (WebView::setFrameLoadDelegate):
1152         (WebView::frameLoadDelegate):
1153         (WebView::setPolicyDelegate):
1154         (WebView::policyDelegate):
1155         (WebView::mainFrame):
1156         (WebView::backForwardList):
1157         (WebView::setMaintainsBackForwardList):
1158         (WebView::goBack):
1159         (WebView::goForward):
1160         (WebView::goToBackForwardItem):
1161         (WebView::setTextSizeMultiplier):
1162         (WebView::textSizeMultiplier):
1163         (WebView::setApplicationNameForUserAgent):
1164         (WebView::applicationNameForUserAgent):
1165         (WebView::setCustomUserAgent):
1166         (WebView::customUserAgent):
1167         (WebView::userAgentForURL):
1168         (WebView::supportsTextEncoding):
1169         (WebView::setCustomTextEncodingName):
1170         (WebView::customTextEncodingName):
1171         (WebView::setMediaStyle):
1172         (WebView::mediaStyle):
1173         (WebView::stringByEvaluatingJavaScriptFromString):
1174         (WebView::windowScriptObject):
1175         (WebView::setPreferences):
1176         (WebView::preferences):
1177         (WebView::setPreferencesIdentifier):
1178         (WebView::preferencesIdentifier):
1179         (WebView::setHostWindow):
1180         (WebView::hostWindow):
1181         (WebView::searchFor):
1182         (WebView::registerViewClass):
1183         (WebView::takeStringURLFrom):
1184         (WebView::stopLoading):
1185         (WebView::reload):
1186         (WebView::canGoBack):
1187         (WebView::canGoForward):
1188         (WebView::canMakeTextLarger):
1189         (WebView::makeTextLarger):
1190         (WebView::canMakeTextSmaller):
1191         (WebView::makeTextSmaller):
1192         (WebView::computedStyleForElement):
1193         (WebView::editableDOMRangeForPoint):
1194         (WebView::setSelectedDOMRange):
1195         (WebView::selectedDOMRange):
1196         (WebView::selectionAffinity):
1197         (WebView::setEditable):
1198         (WebView::isEditable):
1199         (WebView::setTypingStyle):
1200         (WebView::typingStyle):
1201         (WebView::setSmartInsertDeleteEnabled):
1202         (WebView::smartInsertDeleteEnabled):
1203         (WebView::setContinuousSpellCheckingEnabled):
1204         (WebView::isContinuousSpellCheckingEnabled):
1205         (WebView::spellCheckerDocumentTag):
1206         (WebView::undoManager):
1207         (WebView::setEditingDelegate):
1208         (WebView::editingDelegate):
1209         (WebView::styleDeclarationWithText):
1210         (WebView::replaceSelectionWithNode):
1211         (WebView::replaceSelectionWithText):
1212         (WebView::replaceSelectionWithMarkupString):
1213         (WebView::replaceSelectionWithArchive):
1214         (WebView::deleteSelection):
1215         (WebView::applyStyle):
1216         (WebView::copy):
1217         (WebView::cut):
1218         (WebView::paste):
1219         (WebView::copyFont):
1220         (WebView::pasteFont):
1221         (WebView::delete_):
1222         (WebView::pasteAsPlainText):
1223         (WebView::pasteAsRichText):
1224         (WebView::changeFont):
1225         (WebView::changeAttributes):
1226         (WebView::changeDocumentBackgroundColor):
1227         (WebView::changeColor):
1228         (WebView::alignCenter):
1229         (WebView::alignJustified):
1230         (WebView::alignLeft):
1231         (WebView::alignRight):
1232         (WebView::checkSpelling):
1233         (WebView::showGuessPanel):
1234         (WebView::performFindPanelAction):
1235         (WebView::startSpeaking):
1236         (WebView::stopSpeaking):
1237         (WebView::viewWindow):
1238         * COM/WebView.h: Added.
1239         * WebKit.vcproj: Added.
1240         * WebKit.vcproj/Interfaces.vcproj: Added.
1241         * WebKit.vcproj/WebKit.def: Added.
1242         * WebKit.vcproj/WebKit.rc: Added.
1243         * WebKit.vcproj/WebKit.sln: Added.
1244         * WebKit.vcproj/WebKit.vcproj: Added.
1245         * WebKit.vcproj/WebKitGUID.vcproj: Added.
1246         * WebKit.vcproj/autoversion.h: Added.
1247         * WebKit.vcproj/resource.h: Added.
1248
1249 2006-06-02  Darin Adler  <darin@apple.com>
1250
1251         * WebCoreSupport/WebImageRendererFactory.m: Fix crash on Safari startup
1252         by include NSObject as a superclass (oops!).
1253
1254 2006-06-01  Darin Adler  <darin@apple.com>
1255
1256         Reviewed by Maciej.
1257
1258         - WebCore doesn't need to load WebKit images any more; removed code for that
1259
1260         * Resources/missing_image.tiff: Removed.
1261         * WebCoreSupport/WebImageRendererFactory.h: Removed.
1262
1263         * WebCoreSupport/WebImageRendererFactory.m: Moved @interface in here.
1264         Removed all but the "threaded decoding" calls that older Safari calls.
1265         This file can go altogether when compatibility with that older Safari
1266         is no longer needed.
1267
1268         * WebKit.xcodeproj/project.pbxproj: Removed WebImageRendererFactory.h
1269         and missing_image.tiff.
1270
1271         * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Removed call
1272         to [WebImageRendererFactory createSharedFactory].
1273
1274 2006-06-01  Brady Eidson  <beidson@apple.com>
1275
1276         Reviewed by Maciej.
1277
1278         Simple changes to hook up the new WebCore based Icon Database
1279         for testing.
1280
1281         * ChangeLog:
1282         * Misc/WebIconDatabase.m:
1283         (-[WebIconDatabase _applicationWillTerminate:]):
1284         * Misc/WebIconDatabasePrivate.h:
1285         * WebKit.xcodeproj/project.pbxproj:
1286
1287 2006-06-01  Anders Carlsson  <acarlsson@apple.com>
1288
1289         Reviewed by Darin.
1290
1291         http://bugzilla.opendarwin.org/show_bug.cgi?id=6309
1292         multiple problems prevent bookmarking/back button technique for AJAX/DHTML applications from working
1293
1294         * Misc/WebNSURLExtras.m:
1295         (-[NSString _webkit_URLFragment]):
1296         Don't include the "#" character in the fragment.
1297         
1298         * WebCoreSupport/WebFrameBridge.m:
1299         (-[WebFrameBridge historyURL:]):
1300         New function, returns the history URL for a given position in the back/forward list
1301         
1302         * WebView/WebFrame.m:
1303         (-[WebFrame _loadItem:withLoadType:]):
1304         Always call scrollToAnchorWithURL, even if there is no fragment. This way we keep the WebCore frame's
1305         URL up-to-date.
1306
1307 2006-06-01  Maciej Stachowiak  <mjs@apple.com>
1308
1309         Reviewed by Anders.
1310         
1311         - fixed "REGRESSION: Can't order from Pizza Hut (ToT, 05/24/06)"
1312         http://bugzilla.opendarwin.org/show_bug.cgi?id=9103
1313
1314         * WebView/WebDataSource.m:
1315         (-[WebDataSource _willSendRequest:forResource:redirectResponse:]): Set up the
1316         User-Agent header.
1317         * WebView/WebDataSourceInternal.h:
1318         * WebView/WebLoader.m:
1319         (-[NSURLProtocol willSendRequest:redirectResponse:]): Pass a mutable URL request
1320         so the above can work.
1321
1322 2006-06-01  Anders Carlsson  <acarlsson@apple.com>
1323
1324         Reviewed by Darin.
1325
1326         * WebView/WebFrameView.m:
1327         (+[WebFrameView _canShowMIMETypeAsHTML:]):
1328         Use _webkit_objectForMIMEType here so we'll get an object back for "text/".
1329
1330 2006-05-31  David Hyatt  <hyatt@apple.com>
1331
1332         Make programmatic focus/blur actually work on sub-frames.  Make the
1333         top-level UI delegate get called for deactivation of windows.
1334
1335         Reviewed by darin
1336
1337         * WebCoreSupport/WebFrameBridge.m:
1338         (-[WebFrameBridge activateWindow]):
1339         (-[WebFrameBridge deactivateWindow]):
1340         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
1341         (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
1342         * WebKit.xcodeproj/project.pbxproj:
1343
1344 === WebKit-521.12 ===
1345
1346 2006-05-26  David Harrison  <harrison@apple.com>
1347
1348         Reviewed by John Sullivan.
1349
1350         <rdar://problem/4514529> Add a list type parameter and a return value to _increaseSelectionListLevel
1351
1352         * WebView/WebHTMLView.m:
1353         (-[WebHTMLView _increaseSelectionListLevel]):
1354         - Now returns DOMNode*
1355
1356         (-[WebHTMLView _increaseSelectionListLevelOrdered]):
1357         (-[WebHTMLView _increaseSelectionListLevelUnordered]):
1358         - Added.  These also return DOMNode*
1359
1360         * WebView/WebHTMLViewPrivate.h:
1361         - Updated as above
1362
1363 2006-05-25  Tim Omernick  <timo@apple.com>
1364
1365         Reviewed by Anders.
1366
1367         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8347>
1368         REGRESSION: Flash movie audible but not visible until window is resized
1369
1370         * Plugins/WebNetscapePluginDocumentView.m:
1371         (-[WebNetscapePluginDocumentView dataSourceUpdated:]):
1372         Layout if needed here.  Maciej recently removed the "LayoutAcceptable" frame state, which used to
1373         cause plugin document views to lay out immediately upon receiving data.  This call to -layout has
1374         the same effect.
1375
1376 === WebKit-521.11.1 ===
1377
1378 2006-05-25  Timothy Hatcher  <timothy@apple.com>
1379
1380         Reviewed by Tim O.
1381
1382         <rdar://problem/4559808> WebKit fails to compile for ppc64
1383         <rdar://problem/4522085> 64-bit: WebKit uses FSSpec which is not available in 64-bit
1384         Gets WebKit building under 64-bit. Rename WebNSInt and WebNSUInt to WebNSInteger and WebNSUInteger.
1385         Start using WebNSInteger where we need to match AppKit API usage of NSInteger.
1386
1387         HIWebView and a couple of helper functions are disabled until they can be moved off of QuickDraw.
1388         <rdar://problem/4561772> HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit
1389
1390         * Carbon/CarbonUtils.m: disabled this file in 64-bit <rdar://problem/4561772>
1391         * Carbon/CarbonWindowAdapter.m:
1392         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
1393         * Carbon/CarbonWindowFrame.m:
1394         (+[CarbonWindowFrame frameRectForContentRect:styleMask:]):
1395         (+[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
1396         (+[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
1397         (-[CarbonWindowFrame frameRectForContentRect:styleMask:]):
1398         (-[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
1399         (-[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
1400         * Carbon/HIViewAdapter.m: disabled this file in 64-bit <rdar://problem/4561772>
1401         * Carbon/HIWebView.m: disabled this file in 64-bit <rdar://problem/4561772>
1402         (HIWebViewEventHandler):
1403         * DefaultDelegates/WebDefaultResourceLoadDelegate.m:
1404         (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
1405         * History/WebBackForwardList.m:
1406         (-[WebBackForwardList removeItem:]):
1407         (-[WebBackForwardList goToItem:]):
1408         * Misc/WebDownload.m:
1409         (-[WebDownloadInternal download:didReceiveDataOfLength:]):
1410         * Misc/WebFileDatabase.m:
1411         (UniqueFilePathForKey):
1412         * Misc/WebIconDatabase.m:
1413         (-[NSMutableDictionary retainIconForURL:]):
1414         (-[NSMutableDictionary releaseIconForURL:]):
1415         (-[WebIconDatabase _totalRetainCountForIconURLString:]):
1416         (-[WebIconDatabase _retainIconForIconURLString:]):
1417         (-[WebIconDatabase _releaseIconForIconURLString:]):
1418         * Misc/WebSearchableTextView.m:
1419         (-[NSString selectionRect]):
1420         * Misc/WebTypesInternal.h: Added.
1421         * Plugins/WebBaseNetscapePluginStream.m:
1422         (-[WebBaseNetscapePluginStream _destroyStream]):
1423         (CarbonPathFromPOSIXPath):
1424         * Plugins/WebBaseNetscapePluginView.m:
1425         (-[WebBaseNetscapePluginView sendActivateEvent:]):
1426         (-[WebBaseNetscapePluginView sendUpdateEvent]):
1427         (TSMEventHandler):
1428         (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
1429         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
1430         (-[NSData _web_locationAfterFirstBlankLine]):
1431         * Plugins/WebBasePluginPackage.m:
1432         (-[WebBasePluginPackage hash]):
1433         * Plugins/WebNetscapePluginPackage.m:
1434         (-[WebNetscapePluginPackage load]):
1435         (functionPointerForTVector):
1436         * WebInspector/WebInspector.m:
1437         (-[WebInspector _updateSystemColors]):
1438         * WebKit.xcodeproj/project.pbxproj:
1439         * WebView/WebDataSource.m:
1440         (-[WebDataSource _didReceiveData:contentLength:forResource:]):
1441         * WebView/WebFrame.m:
1442         (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
1443         * WebView/WebHTMLView.m:
1444         (-[NSArray drawRect:]):
1445         (-[WebHTMLView characterIndexForPoint:]):
1446         (-[WebHTMLView conversationIdentifier]):
1447         * WebView/WebResourceLoadDelegate.h:
1448         * WebView/WebUIDelegate.h:
1449         * WebView/WebView.h:
1450         * WebView/WebView.m:
1451         (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
1452         (-[WebView spellCheckerDocumentTag]):
1453         * WebView/WebViewInternal.h:
1454         * WebView/WebViewPrivate.h:
1455
1456 === WebKit-521.11 ===
1457
1458 2006-05-23  Maciej Stachowiak  <mjs@apple.com>
1459
1460         Reviewed by Tim.
1461         
1462         - more loader refactoring to simplify things and remove knowledge of WebView from WebSubresourceLoader
1463
1464         * WebCoreSupport/WebSubresourceLoader.m:
1465         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
1466         (-[WebSubresourceLoader didReceiveResponse:]):
1467         * WebView/WebDataSource.m:
1468         (-[WebDataSource _loadIcon]):
1469         (-[WebDataSource _startLoading]):
1470         * WebView/WebFrame.m:
1471         (-[WebFrame _loadRequest:archive:]):
1472         (-[WebFrame _loadItem:withLoadType:]):
1473         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
1474         (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
1475         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
1476         * WebView/WebFrameInternal.h:
1477         * WebView/WebFramePrivate.h:
1478         * WebView/WebLoader.h:
1479         * WebView/WebLoader.m:
1480         * WebView/WebMainResourceLoader.m:
1481         (-[WebMainResourceLoader initWithDataSource:]):
1482         (-[WebMainResourceLoader didReceiveResponse:]):
1483
1484 2006-05-23  Tim Omernick  <timo@apple.com>
1485
1486         Reviewed by John Sullivan.
1487
1488         <rdar://problem/4558301> REGRESSION (420+): After clearing history and closing bookmark view window,
1489         attempting to select Safari's menu bar results in a crash
1490
1491         * Misc/WebNSWindowExtras.m:
1492         (replacementPostWindowNeedsDisplay):
1493         My fix yesterday for 4557117 was not quite good enough.  Now that we cancel the display timer for a
1494         window *before* it deallocates, we need to make sure that while a window deallocates, no new display
1495         timers are scheduled for that window.  This is actually possible, as 4558301 demonstrates.
1496         Luckily, NSWindow sets a handy "windowDying" flag when it deallocates, so we can just check that flag
1497         and bail out of the throttle hack if it is set.  This should fix the last of the crashes involving
1498         display timers scheduled for deallocated or deallocating windows.
1499
1500 2006-05-23  Maciej Stachowiak  <mjs@apple.com>
1501
1502         Reviewed by Eric.
1503         
1504         - remove knowledge of WebView from WebLoader in preparation for moving the code down
1505
1506         * WebView/WebDataSource.m:
1507         (-[WebDataSource _defersCallbacks]):
1508         (-[WebDataSource _identifierForInitialRequest:]):
1509         (-[WebDataSource _willSendRequest:forResource:redirectResponse:]):
1510         (-[WebDataSource _didReceiveAuthenticationChallenge:forResource:]):
1511         (-[WebDataSource _didCancelAuthenticationChallenge:forResource:]):
1512         (-[WebDataSource _didReceiveResponse:forResource:]):
1513         (-[WebDataSource _didReceiveData:contentLength:forResource:]):
1514         (-[WebDataSource _didFinishLoadingForResource:]):
1515         (-[WebDataSource _didFailLoadingWithError:forResource:]):
1516         (-[WebDataSource _downloadWithLoadingConnection:request:response:proxy:]):
1517         (-[WebDataSource _privateBrowsingEnabled]):
1518         * WebView/WebDataSourceInternal.h:
1519         * WebView/WebLoader.h:
1520         * WebView/WebLoader.m:
1521         (-[WebLoader releaseResources]):
1522         (-[WebLoader setDataSource:]):
1523         (-[WebLoader willSendRequest:redirectResponse:]):
1524         (-[WebLoader didReceiveAuthenticationChallenge:]):
1525         (-[WebLoader didCancelAuthenticationChallenge:]):
1526         (-[WebLoader didReceiveResponse:]):
1527         (-[WebLoader didReceiveData:lengthReceived:]):
1528         (-[WebLoader signalFinish]):
1529         (-[WebLoader didFinishLoading]):
1530         (-[WebLoader didFailWithError:]):
1531         (-[WebLoader willCacheResponse:]):
1532         (-[WebLoader cancelWithError:]):
1533         * WebView/WebMainResourceLoader.m:
1534         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
1535         * WebView/WebView.m:
1536         (-[WebView _incrementProgressForIdentifier:response:]):
1537         (-[WebView _incrementProgressForIdentifier:data:]):
1538         (-[WebView _completeProgressForIdentifier:]):
1539         * WebView/WebViewInternal.h:
1540
1541 === WebKit-521.10 ===
1542
1543 2006-05-22  Tim Omernick  <timo@apple.com>
1544
1545         Reviewed by Geoff.
1546
1547         <rdar://problem/4557117> TOT REGRESSION: Repro crash in cancelPendingWindowDisplay --> _timerRelease when
1548         opening file from file open dialog
1549
1550         Note that I could not reproduce this situation at all on any of my machines; I had to debug this on Geoff's
1551         machine.
1552
1553         * Misc/WebNSWindowExtras.m:
1554         (replacementDealloc):
1555         Cancel display timer before dealloc, not after.  Cancelling the timer can cause a message to be sent to the
1556         window; best to do that before the window deallocates.
1557         (replacementFinalize):
1558         ditto
1559
1560 2006-05-20  Maciej Stachowiak  <mjs@apple.com>
1561
1562         Reviewed by Beth.
1563         
1564         - fix assertion failure on layout tests
1565
1566         * WebView/WebDataSource.m:
1567         (-[WebDataSource _mainReceivedError:complete:]): Don't do anything
1568         if this data source is no longer connected to a frame. Used to be
1569         this couldn't happen because the WebView would have been nil, but
1570         we no longer go through the WebView.
1571
1572 2006-05-20  Timothy Hatcher  <timothy@apple.com>
1573
1574         Reviewed by Anders.
1575
1576         Bug 9018: REGRESSION: resizing the top area of the inspector does not grow as expected
1577         http://bugzilla.opendarwin.org/show_bug.cgi?id=9018
1578         
1579         Use clientHeight now that offsetHeight includes the border and padding.
1580         clientHeight should have been used initially.
1581
1582         * WebInspector/WebInspector.m:
1583         (-[WebInspector resizeTopArea]):
1584
1585 2006-05-18  Maciej Stachowiak  <mjs@apple.com>
1586
1587         Reviewed by Eric.
1588         
1589         - remove loading-related code from WebView
1590         http://bugzilla.opendarwin.org/show_bug.cgi?id=8981
1591
1592         * Plugins/WebNetscapePluginStream.m:
1593         (-[WebNetscapePlugInStreamLoader didFinishLoading]):
1594         (-[WebNetscapePlugInStreamLoader didFailWithError:]):
1595         * WebCoreSupport/WebSubresourceLoader.m:
1596         (-[WebSubresourceLoader receivedError:]):
1597         (-[WebSubresourceLoader signalFinish]):
1598         * WebView/WebDataSource.m:
1599         (-[WebDataSource _stopLoading]):
1600         (-[WebDataSource _receivedMainResourceError:complete:]):
1601         (-[WebDataSource _finishedLoadingResource]):
1602         (-[WebDataSource _mainReceivedBytesSoFar:complete:]):
1603         (-[WebDataSource _receivedError:]):
1604         (-[WebDataSource _mainReceivedError:complete:]):
1605         * WebView/WebDataSourceInternal.h:
1606         * WebView/WebFrame.m:
1607         (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
1608         * WebView/WebMainResourceLoader.m:
1609         (-[WebMainResourceLoader didReceiveData:lengthReceived:]):
1610         (-[WebMainResourceLoader didFinishLoading]):
1611         * WebView/WebView.m:
1612         * WebView/WebViewInternal.h:
1613
1614 2006-05-18  Tim Omernick  <timo@apple.com>
1615
1616         Reviewed by John Sullivan.
1617
1618         <rdar://problem/4551938> More options needed for window display throttle
1619
1620         We decided to play it safe and leave our window flushing behavior unchanged from the previous
1621         public release.  By default, CoreGraphics deferred updates are once again OFF, and the window
1622         display throttle is OFF.
1623
1624         Individual applications should set the WebKitThrottleWindowDisplayPreferenceKey and 
1625         WebKitEnableDeferredUpdatesPreferenceKey defaults to suit their needs.
1626
1627         Old behavior (like 10.4.6): WebKitThrottleWindowDisplayPreferenceKey=0 (or unset), 
1628         WebKitEnableDeferredUpdatesPreferenceKey (or unset).
1629
1630         Tear-free scrolling/animations: WebKitThrottleWindowDisplayPreferenceKey=0 (or unset),
1631         WebKitEnableDeferredUpdatesPreferenceKey=1.  While this configuration fixes the tearing issues
1632         caused by over-flushing, some applications will experience performance problems as over-flushing
1633         with CG deferred updates enabled will cause the app to block.
1634
1635         Tear-free scrolling/animations, high performance: WebKitThrottleWindowDisplayPreferenceKey=1, 
1636         WebKitEnableDeferredUpdatesPreferenceKey=1.  This is the riskiest configuration in that it
1637         enables the window display throttle "feature", potentially breaking applications' assumptions
1638         about when displays occur.  However, it provides the "best of both worlds", in that updates
1639         are tear-free, and performance impact should me minimal.
1640
1641         * WebView/WebPreferenceKeysPrivate.h:
1642         Declared WebKitThrottleWindowDisplayPreferenceKey and WebKitEnableDeferredUpdatesPreferenceKey.
1643
1644         * WebView/WebFrameView.m:
1645         (-[WebFrameView initWithFrame:]):
1646         Turn off CG deferred updates if WebKitEnableDeferredUpdatesPreferenceKey is NO or has no value.
1647         Added some comments.
1648
1649 2006-05-18  John Sullivan  <sullivan@apple.com>
1650
1651         Reviewed by Darin Adler.
1652         
1653         - fixed <rdar://problem/4552713> REGRESSION: WebFrameView no longer responds to responder methods sent by Safari code
1654
1655         * WebView/WebView.m:
1656         (-[WebView _responderForResponderOperations]):
1657         Treat sibling views of the main frameView the same as views outside of the webview for the purposes of this mechanism.
1658
1659 2006-05-18  Tim Omernick  <timo@apple.com>
1660
1661         Reviewed by John Sullivan.
1662
1663         <rdar://problem/4553450> Make disabling window throttle safer
1664
1665         * Misc/WebNSWindowExtras.m:
1666         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
1667         Don't assume that +_webkit_disableWindowDisplayThrottle restored the NSWindow method implementations; 
1668         now we'll only swizzle them once, and our replacement IMPs will call the old IMPs when the window
1669         throttle is disabled.  This is a safer approach when other components/"haxies" override the same methods
1670         that we are overriding, as it allows the overrides to "chain" properly.
1671         Moved the dictionary initialization code down a bit.  The order doesn't matter here.
1672         (disableWindowDisplayThrottleApplierFunction):
1673         Noticed that this could have been written safer with respect to the timer having the last reference to
1674         the window.  I never experienced a crash here, but this code is definitely safer.
1675         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
1676         Don't restore NSWindow method implementations; just clear the flag, flush pending displays, and destroy
1677         the dictionary.
1678         (replacementPostWindowNeedsDisplay):
1679         If throttling is disabled, just call the original IMP.
1680         (clearWindowDisplayInfo):
1681         Added an assert.
1682         (replacementDealloc):
1683         Don't call clearWindowDisplayInfo() when throttling is disabled.
1684         (replacementFinalize):
1685         ditto
1686         (cancelPendingWindowDisplay):
1687         Removed an unnecessary assertion.
1688
1689 2006-05-17  Tim Omernick  <timo@apple.com>
1690
1691         Reviewed by Kevin Decker and John Sullivan.
1692
1693         <rdar://problem/4550801> REGRESSION: Window throttle code can sometimes leak NSWindows
1694
1695         The window display throttle depended on windows being closed before they were deallocated; this is
1696         not guaranteed by AppKit.  Windows that were being released without being closed were getting stuck
1697         in our NSWindow -> WindowDisplayInfo dictionary.
1698         
1699         * Misc/WebNSWindowExtras.m:
1700         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
1701         Don't retain the NSWindow keys in the window display info dictionary.
1702         Instead of overriding -close, override -dealloc and -finalize so that we can remove the NSWindow ->
1703         WindowDisplayInfo mapping when a window deallocates.
1704         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
1705         Restore -dealloc and -finalize.
1706         (clearWindowDisplayInfo):
1707         Factored the WindowDisplayInfo cleanup code out of the now-defunct replacementClose().
1708         (replacementClose):
1709         Removed; no longer needed.
1710         (replacementDealloc):
1711         Clear the WindowDisplayInfo for the window after deallocation.
1712         (replacementFinalize):
1713         ditto
1714         (-[NSWindow _webkit_doPendingPostWindowNeedsDisplay:]):
1715         Rewrote this method to be safe in the case where the firing display timer has the last reference to the
1716         window.
1717         Added comments.
1718         
1719 2006-05-17  bradeeoh  <beidson@apple.com>
1720
1721         Reviewed by Tim Hatcher
1722
1723         Consolidated WebDatabase base class into WebFileDatabase as the inheritance relationship became 
1724         obsolete.  This improves readability and sets the stage for a further in-depth rewrite of the 
1725         WebIcon* code.
1726
1727         * Misc/WebDatabase.h: Removed.
1728         * Misc/WebDatabase.m: Removed.
1729         * Misc/WebFileDatabase.h:
1730         * Misc/WebFileDatabase.m:
1731         (-[WebFileDatabaseOp dealloc]): 
1732         (-[WebFileDatabase dealloc]):  
1733         (-[WebFileDatabase path]):
1734         (-[WebFileDatabase isOpen]):
1735         (-[WebFileDatabase sizeLimit]):
1736         * WebKit.xcodeproj/project.pbxproj:
1737
1738 2006-05-17  Adele Peterson  <adele@apple.com>
1739
1740         Reviewed by Hyatt.
1741
1742         WebKit part of initial checkin to prepare for http://bugzilla.opendarwin.org/show_bug.cgi?id=8948
1743         Switch to use new text field implementation for <textarea>
1744
1745         * WebView/WebHTMLView.m:
1746         (-[NSArray insertNewline:]): If we're in plain text mode, insert a line break instead of a paragraph separator.
1747         (-[NSArray insertParagraphSeparator:]): ditto.
1748         * WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]):
1749         Checks for textareas as well as textfields before allowing the delegate to control
1750         the context menu.  This won't affect the old textareas because AppKit handles those context menus.
1751
1752 2006-05-17  John Sullivan  <sullivan@apple.com>
1753
1754         Reviewed by Maciej.
1755
1756         First step towards making text-matching mechanism more flexible; updated for changes
1757         to WebCoreFrameBridge calls.
1758
1759         * WebView/WebHTMLView.m:
1760         (-[WebHTMLView highlightAllMatchesForString:caseSensitive:]):
1761         updated for name change in WebCoreFrameBridge, also now calls setMarkedTextMatchesAreHighlighted:
1762         (-[WebHTMLView clearHighlightedMatches]):
1763         updated for name change in WebCoreFrameBridge
1764
1765 2006-05-16  Matt Gough  <matt@softchaos.com>
1766
1767         Reviewed by Geoff.
1768         
1769         Ensured all the public headers have a newline at their end.
1770
1771         Client code can now have 'Missing Newline at end of File' warnings enabled without emitting
1772         such warnings against any WebKit includes.
1773
1774         * Misc/WebDownload.h:
1775         * Plugins/npfunctions.h:
1776         * WebView/WebResourceLoadDelegate.h:
1777         * WebView/WebUIDelegate.h:
1778         * WebView/WebView.h:
1779
1780 2006-05-16  Tim Omernick  <timo@apple.com>
1781
1782         Reviewed by Tim Hatcher.
1783
1784         http://bugzilla.opendarwin.org/show_bug.cgi?id=8945 (REGRESSION: Scrolling is very slow when dragging
1785         the thumb)
1786
1787         Rolled out one of my tweaks to the window display throttle hack (remember the last flush time instead
1788         of the last display time).  While that was technically a better approach, we discovered a problem
1789         with how it interacts with NSView scroll tracking.  Rather than further complicate this already
1790         crazy hack, I'm reverting back to the simple version.  This should yield similar numbers on iBench,
1791         but not exhibit the nasty scrolling problem.
1792         
1793         * Misc/WebNSWindowExtras.m:
1794         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
1795         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
1796         (getWindowDisplayInfo):
1797         (requestWindowDisplay):
1798
1799 2006-05-16  bradeeoh  <beidson@apple.com>
1800
1801         Reviewed by Maciej Stachowiak
1802
1803         - Fixed an old deprecated method in Misc/WebFileDatabase.m
1804
1805         * Misc/WebFileDatabase.m:
1806         (UniqueFilePathForKey):  changed `lossyCString` to `UTF8String`
1807
1808 2006-05-16  Darin Adler  <darin@apple.com>
1809
1810         Reviewed by Anders.
1811
1812         - did the name change from "ImageElement" to "ImageForElement" that I said I would
1813           (oops!)
1814
1815         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
1816         (-[WebDefaultUIDelegate copyImageToClipboard:]):
1817         * Misc/WebNSPasteboardExtras.h:
1818         * Misc/WebNSPasteboardExtras.m:
1819         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
1820         * Misc/WebNSViewExtras.h:
1821         * Misc/WebNSViewExtras.m:
1822         (-[NSView _web_DragImageForElement:rect:event:pasteboard:source:offset:]):
1823         * WebView/WebHTMLView.m:
1824         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1825         * WebView/WebView.m:
1826         (-[WebView _writeImageForElement:withPasteboardTypes:toPasteboard:]):
1827         (-[WebView writeElement:withPasteboardTypes:toPasteboard:]):
1828         * WebView/WebViewInternal.h:
1829
1830 2006-05-16  Darin Adler  <darin@apple.com>
1831
1832         Reviewed by Anders.
1833
1834         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8940
1835           remove extra copy of image code
1836
1837         * English.lproj/StringsNotToBeLocalized.txt: Updated for many recent changes.
1838
1839         * WebKit.xcodeproj/project.pbxproj: Removed files.
1840         * WebCoreSupport/WebImageData.h: Removed.
1841         * WebCoreSupport/WebImageData.m: Removed.
1842         * WebCoreSupport/WebImageDecodeItem.h: Removed.
1843         * WebCoreSupport/WebImageDecodeItem.m: Removed.
1844         * WebCoreSupport/WebImageDecoder.h: Removed.
1845         * WebCoreSupport/WebImageDecoder.m: Removed.
1846         * WebCoreSupport/WebImageRenderer.h: Removed.
1847         * WebCoreSupport/WebImageRenderer.m: Removed.
1848
1849         * WebCoreSupport/WebImageRendererFactory.h:
1850         * WebCoreSupport/WebImageRendererFactory.m: Removed everything except for
1851         shouldUseThreadedDecoding, setShouldUseThreadedDecoding, and imageDataForName:.
1852
1853         * Misc/WebNSPasteboardExtras.h: Removed WebImageRenderer parameter from
1854         _web_declareAndWriteDragImage and renamed _web_declareAndWriteDragImageElement.
1855         * Misc/WebNSPasteboardExtras.m:
1856         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]): Changed to
1857         call +[WebFrameBridge supportedImageResourceMIMETypes] instead of
1858         -[WebImageRendererFactory supportedMIMETypes].
1859         (-[NSPasteboard _web_declareAndWriteDragImageElement:URL:title:archive:source:]):
1860         Removed WebImageRenderer parameter, and updated code since it was always nil.
1861
1862         * Misc/WebNSViewExtras.h: Removed WebImageRenderer parameter from
1863         _web_dragImage and renamed _web_dragImageElement.
1864         * Misc/WebNSViewExtras.m:
1865         (-[NSView _web_dragImageElement:rect:event:pasteboard:source:offset:]):
1866         Removed WebImageRenderer parameter, and updated code since it was always nil.
1867
1868         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Added some new
1869         functions now used by WebCore.
1870
1871         * WebView/WebDataSource.m: (-[WebDataSource _documentFragmentWithArchive:]):
1872         Call +[WebFrameBridge supportedImageResourceMIMETypes] instead of
1873         -[WebImageRendererFactory supportedMIMETypes].
1874
1875         * WebView/WebFrameView.m: Removed include of WebImageRenderer.h.
1876
1877         * WebView/WebHTMLRepresentation.m: (+[WebHTMLRepresentation supportedImageMIMETypes]):
1878         Removed call to +[WebImageRendererFactory createSharedFactory].
1879
1880         * WebView/WebHTMLView.m:
1881         (-[WebHTMLView _imageExistsAtPaths:]): Call +[WebFrameBridge supportedImageResourceMIMETypes]
1882         instead of -[WebImageRendererFactory supportedMIMETypes].
1883         (-[WebHTMLView _documentFragmentWithPaths:]): Ditto.
1884         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): Update
1885         to no longer pass nil for an image to _web_declareAndWriteDragImageElement and to
1886         _web_dragImageElement.
1887         (-[WebHTMLView dealloc]): Remove call to now-unneeded _reset.
1888         (-[WebHTMLView finalize]): Ditto.
1889         (-[WebHTMLView viewDidMoveToWindow]): Remove logic for calling _reset, including the inWindow
1890         boolean field.
1891
1892         * WebView/WebHTMLViewInternal.h: Removed inWindow boolean.
1893         * WebView/WebHTMLViewPrivate.h: Removed _reset method.
1894
1895 2006-05-16  Darin Adler  <darin@apple.com>
1896
1897         Reviewed by Hyatt.
1898
1899         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8898
1900           REGRESSION: Attempting to right-click image in own tab on website causes crash
1901         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8919
1902           REGRESSION: image could not be dragged, subsequent click-drag activity caused crash
1903
1904         These fixes may become obsolete when Anders lands his standalone image viewer
1905         patch, but in my tree they are needed to make Copy Image work after the fix
1906         over on the WebCore side to avoid the crashes.
1907
1908         * Misc/WebNSPasteboardExtras.h: Change _web_writeImage parameter to an NSImage.
1909         * Misc/WebNSPasteboardExtras.m:
1910         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]): Change parameter
1911         to an NSImage instead of a WebImageRenderer.
1912         (-[NSPasteboard _web_declareAndWriteDragImage:element:URL:title:archive:source:]):
1913         Call -[WebImageRenderer image] to get an NSImage to pass to _web_writeImage.
1914
1915         * WebView/WebView.m: (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
1916         Get the image using WebElementImageKey if WebElementDOMNodeKey is nil.
1917
1918 2006-05-16  Anders Carlsson  <acarlsson@apple.com>
1919
1920         Reviewed by Maciej.
1921
1922         http://bugzilla.opendarwin.org/show_bug.cgi?id=8921
1923         Use WebCore to render full-frame images
1924         
1925         * WebCoreSupport/WebFrameBridge.m:
1926         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
1927         Remove WebImageView handling.
1928         
1929         (-[WebFrameBridge mainResourceURLResponse]):
1930         New function which returns the URL response for the main resource. This is used by the
1931         manual loading of images.
1932         
1933         (-[WebFrameBridge imageTitleForFilename:size:]):
1934         New function which returns a correctly translated image title given a filename and a size.
1935         
1936         * WebCoreSupport/WebImageRenderer.m:
1937         (-[WebImageRenderer _startOrContinueAnimationIfNecessary]):
1938         Remove WebImageView handling.
1939         
1940         * WebKit.xcodeproj/project.pbxproj:
1941         Remove WebImageRepresentation and WebImageView.
1942         
1943         * WebView/WebArchiver.h:
1944         * WebView/WebArchiver.m:
1945         (+[WebArchiver archiveMainResourceForFrame:]):
1946         New functions which returns a WebArchive with just the main resource, ignoring any subresources.
1947         
1948         * WebView/WebDataSource.m:
1949         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
1950         Use MIME types from WebHTMLRepresentation instead of WebImageRepresentation.
1951         
1952         * WebView/WebFrameView.m:
1953         (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
1954         Use MIME types from WebHTMLRepresentation instead of WebImageRepresentation.
1955         
1956         (+[WebHTMLRepresentation supportedMIMETypes]):
1957         Create an array of image and non-image MIME Types.
1958         
1959         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
1960         (+[WebHTMLRepresentation supportedImageMIMETypes]):
1961         New functions, separating the list of MIME types into image and non-image ones.
1962         
1963         * WebView/WebHTMLView.m:
1964         (+[WebHTMLView supportedImageMIMETypes]):
1965         (+[WebHTMLView supportedNonImageMIMETypes]):
1966         New functions which call down to WebHTMLRepresentation.
1967         
1968         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1969         If the image element comes from an ImageDocument, just use an archive of the main resource
1970         instead of the generated HTML document.
1971         
1972         * WebView/WebHTMLViewPrivate.h:
1973         Declare new functions.
1974         
1975         * WebView/WebImageRepresentation.h: Removed.
1976         * WebView/WebImageRepresentation.m: Removed.
1977         * WebView/WebImageView.h: Removed.
1978         * WebView/WebImageView.m: Removed.
1979         
1980 2006-05-15  Tim Omernick  <timo@apple.com>
1981
1982         Reviewed by John Sullivan.
1983
1984         Part of <rdar://problem/4466508> Add 64-bit support to the Netscape Plugin API
1985
1986         Added to the Netscape Plugin API the concept of "plugin drawing models".  The drawing model
1987         determines the kind of graphics context created by the browser for the plugin, as well as 
1988         the Mac types of various Netscape Plugin API data structures.
1989
1990         There is a drawing model to represent the old QuickDraw-based API.  It is used by default
1991         if QuickDraw is available on the system, unless the plugin specifies another drawing model.
1992
1993         The big change is the addition of the CoreGraphics drawing model.  A plugin may request this
1994         drawing model to obtain access to a CGContextRef for drawing, instead of a QuickDraw CGrafPtr.
1995
1996         * Plugins/WebBaseNetscapePluginView.h:
1997         Added PluginPort union, which wraps a NP_Port and a NP_CGContext.  This is to make access to
1998         the nPort and lastSetPort ivars more convenient now that the port type differs based on the 
1999         drawing model.
2000         Changed types of nPort and lastSetPort to PluginPort so they can be used with any drawing model.
2001         Added drawingModel ivar.
2002         * Plugins/WebBaseNetscapePluginView.m:
2003         Renamed PortState to PortState_QD.  PortState is now an opaque pointer.  PortState_QD cannot be
2004         used if QuickDraw is unavailable.
2005         (-[WebBaseNetscapePluginView fixWindowPort]):
2006         Cannot be used if QuickDraw is unavailable.
2007         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
2008         Only fix window port if drawing model is QuickDraw.
2009         Re-ordered some code so I could group QuickDraw-specific stuff into switch and if blocks (that's
2010         why the diff here is so terrible).
2011         Now returns a malloc()'ed PortState that the caller is responsible for freeing.  Renamed to
2012         better reflect this behavior.
2013         Support for the CoreGraphics drawing model -- fill PortState_CG struct, save CGContext state.
2014         (-[WebBaseNetscapePluginView restorePortState:]):
2015         Switch based on drawing model.
2016         Support for the CoreGraphics drawing model -- restore CGContext state saved earlier.
2017         (-[WebBaseNetscapePluginView sendEvent:]):
2018         Formatting.
2019         Don't set save/set port state or set the window in CoreGraphics mode unless the event being
2020         sent is an updateEvt.  We can't provide the plugin with a CGContext outside of our view display
2021         cycle.
2022         Don't restore PortState if it's NULL (didn't used to be a pointer).  Free when we're done with it.
2023         (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]):
2024         Formatting.
2025         Switch how we compare ports based on the drawing model.
2026         (-[WebBaseNetscapePluginView updateAndSetWindow]):
2027         Fixed for CoreGraphics by triggering a redisplay instead of sending an update event to the plugin
2028         outside of the view display cycle.
2029         Don't restore PortState if it's NULL (didn't used to be a pointer).  Free when we're done with it.
2030         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
2031         Assert that the window is only set when updating in CoreGraphics mode.
2032         Log differently depending on the drawing model.
2033         (-[WebBaseNetscapePluginView start]):
2034         Fall back on QuickDraw if the plugin does not specify a drawing model.
2035         (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
2036         Cannot be used if QuickDraw is unavailable.
2037         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
2038         Only call -tellQuickTimeToChill in QuickDraw mode.
2039         (-[WebBaseNetscapePluginView viewHasMoved:]):
2040         ditto
2041         (-[WebBaseNetscapePluginView invalidateRegion:]):
2042         NPRegion is a CGPathRef in CoreGraphics mode.
2043         (-[WebBaseNetscapePluginView getVariable:value:]):
2044         Added support for retriveing the NPNVpluginDrawingModel, NPNVsupportsQuickDrawBool, and
2045         NPNVsupportsCoreGraphicsBool browser variables.
2046         (-[WebBaseNetscapePluginView setVariable:value:]):
2047         Added support for setting the NPNVpluginDrawingModel variable.
2048
2049 2006-05-15  Tim Omernick  <timo@apple.com>
2050
2051         Reviewed by Kevin Decker.
2052
2053         Follow-up to my previous PLT fix.  I found upon further testing (by dramatically decreasing the
2054         allowed display rate) that +_webkit_displayThrottledWindows did not always force a display when
2055         necessary.  The reason is that I was not giving a proper timeout to CFRunLoopRunInMode().  I was
2056         passing 0, which was causing only "expired" timers to fire.  This method is actually supposed to
2057         block until all currently scheduled display timers fire.
2058
2059         I tested this change and found that it did not affect my PLT times when the display rate was
2060         capped to 60 fps.  It also behaves as expected when the display rate is set much lower (say, 1
2061         display per second); my previous fix did not work well at such display rates.
2062
2063         * Misc/WebNSWindowExtras.m:
2064         (+[NSWindow _webkit_displayThrottledWindows]):
2065         Run the runloop for an amount of time equal to the minimum allowed interval between displays.
2066         This ensures that we'll block until all currently scheduled display timers fire (but we won't
2067         block for future display timers).
2068
2069 2006-05-15  John Sullivan  <sullivan@apple.com>
2070
2071         Reviewed by Tim Omernick.
2072         
2073         - followup to previous fix; I hadn't tested quitting adequately
2074
2075         * WebView/WebHTMLView.m:
2076         (-[WebHTMLView dealloc]):
2077         call removeAllToolTips before clearing _private so that removeTrackingRect: override can work 
2078         properly. Normally removeAllToolTips would be called by super, but that's too late.
2079         (-[WebHTMLView finalize]):
2080         ditto
2081
2082 2006-05-15  John Sullivan  <sullivan@apple.com>
2083
2084         Reviewed by Darin.
2085         
2086         - fixed <rdar://problem/4503016> TOT assertion failure in -[WebHTMLView(WebPrivate) removeTrackingRect:]
2087         
2088         We have some tricky code to deal with tracking rects, which succumbed to a fix in AppKit. Updated our
2089         tricky code to work with the AppKit fix.
2090
2091         * WebView/WebHTMLViewInternal.h:
2092         new instance variable lastToolTipTag
2093         
2094         * WebView/WebHTMLView.m:
2095         (-[WebHTMLView removeTrackingRect:]):
2096         handle removing lastToolTipTag by calling super
2097         (-[WebHTMLView _setToolTip:]):
2098         save tool tip tag in lastToolTipTag; this apparently used to always return 0, so we formerly had no way
2099         to distinguish it from the no-tool-tips-yet case.
2100
2101         * WebKit.xcodeproj/project.pbxproj:
2102         Xcode removed some old cruft
2103
2104 2006-05-15  Tim Omernick  <timo@apple.com>
2105
2106         Reviewed by Darin.
2107
2108         Safari's Page Load Test (PLT) saturates the runloop with so many sources that timers are not allowed to fire 
2109         as frequently as they should.  This is a general problem with the PLT -- because of this, it does not measure
2110         work done in timer callbacks during/after the page load process.
2111
2112         Unfortunately, this aspect of the PLT interferes with our window display throttle hack.  Because we throttle
2113         display using timers, and the PLT starves timers, most of the pages loaded by the PLT do not actually display.
2114         This makes the PLT run "too fast", yielding ridiculously fast numbers compared to when throttling is disabled.
2115
2116         I've added a new method that the PLT can call after each page load to force any starved display throttle timers
2117         to fire.  By doing this, Safari's PLT will be guaranteed to display each page at least once.
2118
2119         * Misc/WebNSWindowExtras.h:
2120         * Misc/WebNSWindowExtras.m:
2121         Added a special internal runloop mode for the throttle timers.
2122         (+[NSWindow _webkit_displayThrottledWindows]):
2123         Run the runloop in our special internal mode until there are no more sources to handle.
2124         (requestWindowDisplay):
2125         Schedule the timer in the new mode as well as the standard modes.
2126         
2127 2006-05-15  Anders Carlsson  <acarlsson@apple.com>
2128
2129         Reviewed by Maciej.
2130
2131         http://bugzilla.opendarwin.org/show_bug.cgi?id=8913
2132         REGRESSION: Can view source for text files
2133
2134         * WebView/WebDocumentPrivate.h:
2135         Add canSaveAsWebArchive.
2136         
2137         * WebView/WebHTMLRepresentation.m:
2138         (-[WebHTMLRepresentation canProvideDocumentSource]):
2139         Call the bridge.
2140         
2141         (-[WebHTMLRepresentation canSaveAsWebArchive]):
2142         New function. This will be used in Safari ToT to determine if a page can be saved as an archive.
2143
2144 2006-05-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2145
2146         Reviewed by Darin.
2147
2148         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8739
2149           Crash in RenderTableSection::paint due to manipulating DOM on resize
2150
2151         Manual test: manual-tests/dom-manipulation-on-resize.html
2152
2153         * WebView/WebHTMLView.m:
2154         (-[NSArray layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Relayout if necessary
2155         after sending the resize event.
2156
2157 2006-05-12  Maciej Stachowiak  <mjs@apple.com>
2158
2159         Reviewed by Brady.
2160         
2161         http://bugzilla.opendarwin.org/show_bug.cgi?id=8876
2162         - move most private WebDataSource methods to uninstalled header
2163         
2164         I put the declarations for the ones only used in WebKit in WebDataSourceInternal.h
2165         and removed two entirey unused ones.
2166
2167         * Plugins/WebNetscapePluginRepresentation.m:
2168         * Plugins/WebNetscapePluginStream.m:
2169         * Plugins/WebPluginController.m:
2170         * Plugins/WebPluginDocumentView.m:
2171         * WebCoreSupport/WebFrameBridge.m:
2172         (-[WebFrameBridge dataSource]):
2173         * WebCoreSupport/WebSubresourceLoader.m:
2174         * WebKit.xcodeproj/project.pbxproj:
2175         * WebView/WebDataSource.m:
2176         (-[WebDataSource _updateIconDatabaseWithURL:]):
2177         (-[WebDataSource _loadIcon]):
2178         (-[WebDataSource _clearErrors]):
2179         (-[WebDataSource _commitLoadWithData:]):
2180         (-[WebDataSource _doesProgressiveLoadWithMIMEType:]):
2181         (-[WebDataSource _addResponse:]):
2182         * WebView/WebDataSourceInternal.h: Added.
2183         * WebView/WebDataSourcePrivate.h:
2184         * WebView/WebFrame.m:
2185         * WebView/WebHTMLRepresentation.m:
2186         * WebView/WebHTMLView.m:
2187         * WebView/WebImageView.m:
2188         * WebView/WebLoader.m:
2189         * WebView/WebMainResourceLoader.m:
2190         * WebView/WebPDFView.m:
2191         * WebView/WebRenderNode.m:
2192         * WebView/WebView.m:
2193
2194 2006-05-12  Tim Omernick  <timo@apple.com>
2195
2196         Reviewed by John Sullivan.
2197
2198         <rdar://problem/4542808> REGRESSION: benchjs test 1 has slowed by over 150% (8740)
2199         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8740>
2200
2201         Improvement to my NSWindow display throttle hack.  Remember the last flush time instead of the last display time.
2202         Our goal is to never draw less than 1/60th of a second after the window is flushed in order to avoid blocking on
2203         a CG coalesced update.  Using the last display time is close, but this is much more accurate.  I have verified that
2204         this further improves our score on BenchJS Test 1 (by 9.8% with the status bar shown compared to the previous build),
2205         as well as on our internal PLT scores by a smaller percentage.
2206
2207         * Misc/WebNSWindowExtras.m:
2208         Renamed lastDisplayTime to lastFlushTime.
2209         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
2210         Replace -[NSWindow flushWindow] with our own implementation.
2211         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
2212         Restore -[NSWindow flushWindow].
2213         (replacementFlushWindow):
2214         Use the last flush time instead of the last display time.
2215         (getWindowDisplayInfo):
2216         Renamed lastDisplayTime to lastFlushTime.
2217         (requestWindowDisplay):
2218         Moved some code to replacementFlushWindow().
2219
2220 2006-05-11  Timothy Hatcher  <timothy@apple.com>
2221
2222         Reviewed by Darin.
2223
2224         Bug 8856: Web Inspector should show the Xpath for the selected node
2225         http://bugzilla.opendarwin.org/show_bug.cgi?id=8856
2226         
2227         Adds an Xpath area to the Node panel.
2228
2229         * WebInspector/webInspector/inspector.css:
2230         * WebInspector/webInspector/inspector.html:
2231         * WebInspector/webInspector/inspector.js:
2232
2233 2006-05-11  Timothy Hatcher  <timothy@apple.com>
2234
2235         Reviewed by Anders.
2236
2237         Fixes <rdar://problem/4411845> lots of SPOD trying to scroll through
2238         Markup & Content inspecting body at apple.com (6614)
2239         http://bugzilla.opendarwin.org/show_bug.cgi?id=6614
2240
2241         Removed the Markup & Content pane when viewing a element.
2242         This pane was not that useful and made the inspector really slow
2243         when the markup was large. Only show this pane for text nodes.
2244
2245         * WebInspector/webInspector/inspector.css: use -webkit prefix
2246         * WebInspector/webInspector/inspector.html:
2247         * WebInspector/webInspector/inspector.js:
2248
2249 2006-05-11  Sam Weinig  <sam.weinig@gmail.com>
2250
2251         Reviewed by Timothy.
2252
2253         Patch for <http://bugzilla.opendarwin.org/show_bug.cgi?id=8810>
2254         Bug 8810: Scrollbars in WebInspector rendered incorrectly
2255
2256         * WebInspector/webInspector/inspector.css: 
2257         Make scroll bars absolutely positioned.
2258
2259 2006-05-10  Tim Omernick  <timo@apple.com>
2260
2261         Reviewed by Darin.
2262
2263         <rdar://problem/4542808> REGRESSION: benchjs test 1 has slowed by over 150% (8740)
2264         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8740>
2265
2266         * Misc/WebNSWindowExtras.h:
2267         * Misc/WebNSWindowExtras.m:
2268         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
2269         Overrides certain NSWindow methods so that window autodisplay can be throttled to 60Hz.
2270
2271         (disableWindowDisplayThrottleApplierFunction):
2272         CFDictionary applier function for when the throttle is disabled.  Cancels all pending window displays,
2273         and calls -displayIfNeeded on each window with a pending display.
2274
2275         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
2276         Restores default NSWindow method implementations and clears pending window displays.
2277
2278         (swizzleInstanceMethod):
2279         Helper function to swizzle ObjC method implementations.
2280
2281         (replacementPostWindowNeedsDisplay):
2282         Don't call into -[NSWindow _postWindowNeedsDisplay] if requestWindowDisplay() returns NO (this is the
2283         function that throttles display).
2284
2285         (replacementClose):
2286         Clean up the WindowDisplayInfo struct for the window, since it's about to go away.
2287
2288         (getWindowDisplayInfo):
2289         Gets the WindowDisplayInfo struct for the window, or creates it if absent.
2290
2291         (requestWindowDisplay):
2292         Returns YES if a display is allowed right now.  Returns NO otherwise, and schedules a timer to try the
2293         display again.
2294
2295         (cancelPendingWindowDisplay):
2296         Cancels the pending display for the window, if any.
2297
2298         (-[NSWindow _webkit_doPendingPostWindowNeedsDisplay:]):
2299         Try to call _postWindowNeedsDisplay again.
2300
2301         * WebView/WebFrameView.m:
2302         (-[WebFrameView initWithFrame:]):
2303         If the secret "WebKitThrottleWindowDisplay" default is set, then enable the NSWindow throttle.
2304
2305 2006-05-10  Anders Carlsson  <acarlsson@apple.com>
2306
2307         Reviewed by Maciej.
2308
2309         * WebView/WebHTMLView.m:
2310         (+[WebHTMLView unsupportedTextMIMETypes]):
2311         Add text/rtf
2312         
2313 2006-05-09  Levi Weintraub  <lweintraub@apple.com>
2314
2315         Reviewed by justin.
2316
2317         <rdar://problem/4442395>
2318         Tiny MCE: Link isn't inserted after dragging into textarea field
2319         
2320         * WebView/WebHTMLView.m:
2321         (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]):
2322         Modified to create an anchor object with a title as opposed to just the URL as text.
2323
2324 2006-05-09  Tim Omernick  <timo@apple.com>
2325
2326         Reviewed by Dave Harrison.
2327
2328         <rdar://problem/4523432> safari crashed right after disabling "block pop up windows" (or
2329         other WebPreferences changes)
2330
2331         * Plugins/WebBaseNetscapePluginView.m:
2332         (-[WebBaseNetscapePluginView viewWillMoveToHostWindow:]):
2333         When the plugin view is removed from both its window and its hostWindow, stop observing
2334         WebPreferences.
2335
2336 2006-05-09  Anders Carlsson  <acarlsson@apple.com>
2337
2338         Reviewed by Darin.
2339
2340         http://bugzilla.opendarwin.org/show_bug.cgi?id=8808
2341         WebCore should handle text files
2342
2343         * WebKit.exp:
2344         Remove WebTextView.
2345         
2346         * WebKit.xcodeproj/project.pbxproj:
2347         Get rid of WebTextView and WebTextRepresentation.
2348         
2349         * WebView/WebDataSource.m:
2350         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
2351         * WebView/WebFrameView.m:
2352         (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
2353         * WebView/WebHTMLView.m:
2354         The text MIME types are now handled by WebHTMLView.
2355         
2356         (+[WebHTMLView unsupportedTextMIMETypes]):
2357         New function, moved here from WebTextView.
2358         
2359         * WebView/WebHTMLViewPrivate.h:
2360         * WebView/WebTextRepresentation.h: Removed.
2361         * WebView/WebTextRepresentation.m: Removed.
2362         * WebView/WebTextView.h: Removed.
2363         * WebView/WebTextView.m: Removed.
2364         
2365         * WebView/WebView.m:
2366         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2367         Now special-case WebHTMLView instead of WebTextView for MIME types
2368         that shouldn't be shown.
2369
2370 2006-05-09  Maciej Stachowiak  <mjs@apple.com>
2371
2372         Rubber stamped by Anders.
2373         
2374         - renamed kxmlcore to wtf
2375         
2376         kxmlcore --> wtf
2377         KXMLCore --> WTF
2378         KXC --> WTF
2379
2380         * Misc/WebKitLogging.h:
2381         * Misc/WebKitLogging.m:
2382         (initializeLogChannel):
2383
2384 2006-05-09  Timothy Hatcher  <timothy@apple.com>
2385
2386         Reviewed by Anders.
2387
2388         Bug 8804: Inspector should support searching by Xpath query
2389         http://bugzilla.opendarwin.org/show_bug.cgi?id=8804
2390
2391         * WebInspector/WebInspector.m:
2392         (-[WebInspector _refreshSearch]):
2393         * WebInspector/webInspector/inspector.js:
2394
2395 2006-05-08  Maciej Stachowiak  <mjs@apple.com>
2396
2397         Reviewed by Tim Hatcher.
2398         
2399         - refactor things so that WebKit doesn't save a WebResource for every loaded URL,
2400         but rather retrieves the data from the WebCore cache as needed.
2401         http://bugzilla.opendarwin.org/show_bug.cgi?id=8802
2402
2403         * WebCoreSupport/WebFrameBridge.m:
2404         (-[WebFrameBridge objectLoadedFromCacheWithURL:response:data:]):
2405         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2406         * WebCoreSupport/WebSubresourceLoader.m:
2407         (-[WebSubresourceLoader didReceiveResponse:]):
2408         * WebView/WebDataSource.m:
2409         (-[WebDataSourcePrivate dealloc]):
2410         (-[WebDataSource _setupForReplaceByMIMEType:]):
2411         (-[WebDataSource _archivedSubresourceForURL:]):
2412         (-[WebDataSource initWithRequest:]):
2413         (-[WebDataSource subresources]):
2414         (-[WebDataSource subresourceForURL:]):
2415         (-[WebDataSource addSubresource:]):
2416         * WebView/WebDataSourcePrivate.h:
2417         * WebView/WebFrame.m:
2418         * WebView/WebFrameInternal.h:
2419         * WebView/WebHTMLView.m:
2420         * WebView/WebLoader.h:
2421         * WebView/WebLoader.m:
2422         (-[NSURLProtocol loadWithRequest:]):
2423         (-[NSURLProtocol didFinishLoading]):
2424         * WebView/WebUnarchivingState.h:
2425         * WebView/WebUnarchivingState.m:
2426         (-[WebUnarchivingState addResource:]):
2427
2428 2006-05-04  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2429
2430         Reviewed by Darin.
2431
2432         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8594
2433           REGRESSION: Exception on closing a page containing (just) an mp3
2434
2435         Test: plugins/pluginDocumentView-deallocated-dataSource.html
2436
2437         * Plugins/WebPluginDocumentView.m:
2438         (-[WebPluginDocumentView dealloc]): Release the dataSource.
2439         (-[WebPluginDocumentView setDataSource:]): Retain the dataSource.
2440
2441 2006-05-04  Tim Omernick  <timo@apple.com>
2442
2443         Reviewed by Darin.
2444
2445         <rdar://problem/4537606> Give Java WebKit plugin access to its own DOM element
2446
2447         * WebCoreSupport/WebFrameBridge.m:
2448         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
2449         Pass the DOMElement to the plugin if it's a WebKit plugin (we need to handle Netscape plugins
2450         differently).
2451
2452 2006-05-04  Tim Omernick  <timo@apple.com>
2453
2454         Reviewed by John Sullivan.
2455
2456         <rdar://problem/4480186> Give WebKit plugins access to their own DOM element
2457
2458         This does not fix <rdar://problem/4480187> Give Netscape plugins access to their own DOM element --
2459         we're not going to use the ObjC DOM API for that, but rather the NP bindings API.
2460
2461         * Plugins/WebPluginPackage.m:
2462         Declared WebPlugInContainingElementKey.  This is not a new plugin argument -- it's been in our public
2463         headers since all along, but has never been concretely declared -- plugins that referenced it would not
2464         link.
2465
2466         * WebCoreSupport/WebFrameBridge.m:
2467         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:]):
2468         Added DOMElement parameter, which is now included in the plugin arguments dictionary.
2469         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:]):
2470         ditto
2471
2472         * WebKit.exp:
2473         Export WebPlugInContainingElementKey.
2474
2475 2006-05-02  Darin Adler  <darin@apple.com>
2476
2477         Reviewed by Eric.
2478
2479         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8677
2480           REGRESSION: wkSetUpFontCache() may be called before the SPIs are connected.
2481
2482         I don't know how reproduce this without one of Rosyna's hacks installed, so I
2483         did not include a test.
2484
2485         * Misc/WebStringTruncator.m: (+[WebStringTruncator initialize]): Add call to
2486         InitWebCoreSystemInterface.
2487
2488         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add a boolean
2489         so we will only do this one time.
2490
2491 2006-05-02  Adele Peterson  <adele@apple.com>
2492
2493         Reviewed by Tim O.
2494
2495         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6988
2496         REGRESSION: Display correct context menus for new text fields
2497
2498         * WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]):
2499         Don't let the UI delegate have control over the context menu for text fields.
2500
2501 2006-05-01  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2502
2503         Reviewed by Darin.
2504
2505         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8658
2506           Assertion failure in -[WebPluginContainerCheck _isForbiddenFileLoad]
2507           (bridge is null) when clicking QuickTime object with href
2508
2509         * WebView/WebHTMLView.m:
2510        (-[WebHTMLView setDataSource:]): Set the pluginController's dataSource.
2511
2512 2006-05-01  Maciej Stachowiak  <mjs@apple.com>
2513
2514         - fix build
2515
2516         * WebKit.exp: Add symbol that the new Safari will need.
2517
2518 2006-05-01  John Sullivan  <sullivan@apple.com>
2519
2520         Reviewed by Tim Omernick.
2521         
2522         - fixed <rdar://problem/3126419> history load enforces history limit, but deletes the newest instead of oldest items
2523         - added notification reporting items discarded during load because the age limit or item count limit is exceeded
2524         - a few other minor tweaks
2525
2526         * History/WebHistory.h:
2527         fixed a typo and an incorrect method name
2528         
2529         * History/WebHistoryPrivate.h:
2530         Added declaration of WebHistoryItemsDiscardedWhileLoadingNotification. Also changed signature of
2531         WebHistoryPrivate method -loadFromURL:error: to have new collectDiscardedItemsInto: parameter.
2532         Also deleted declarations of two methods that didn't actually exist (loadHistory and initWithFile:), 
2533         and added comments about which methods should become public API, WebKit-internal, or file-internal.
2534
2535         * History/WebHistory.m:
2536         (-[WebHistoryPrivate arrayRepresentation]):
2537         This method, called only by _saveHistoryGuts:, used to deliberately leave out items that violated
2538         either the age limit or the item count limit. Now all the items are included (and thus saved), and
2539         all the pruning is done at load time, so clients can keep track of the pruned items by observing
2540         the new WebHistoryItemsDiscardedWhileLoadingNotification
2541         (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
2542         Now keeps track of all the items that violated the age limit or item count limit in the new
2543         collectedDiscardedItemsInto: parameter. Also, now processes items in forward order rather than
2544         reverse order to fix 3126419. Now uses compare: rather than _webkit_compareDay: to check against
2545         age limit; this is faster and also more correct (most noticeable with small age limits).
2546         (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]):
2547         new collectDiscardedItemsInto: parameter, passed into _loadHistoryGuts:...
2548         (-[WebHistory loadFromURL:error:]):
2549         Now sends new WebHistoryItemsDiscardedWhileLoadingNotification if any items were discarded due
2550         to age limit or item count limit.
2551         
2552         * WebKit.exp:
2553         exported symbol for WebHistoryItemsDiscardedWhileLoadingNotification
2554
2555 2006-04-29  Timothy Hatcher  <timothy@apple.com>
2556
2557         Reviewed by Maciej.
2558
2559         Bug 8577: [TabBarView _web_superviewOfClass:stoppingAtClass:]
2560         http://bugzilla.opendarwin.org/show_bug.cgi?id=8577
2561
2562         Added back _web_superviewOfClass:stoppingAtClass:.
2563         This method was removed in r14032 (bug 8562), but Safari 2.0 still uses it.
2564         We should remove this method once Open Source users have a new version
2565         to use with TOT WebKit.
2566
2567         * Misc/WebNSViewExtras.m:
2568         (-[NSView _web_superviewOfClass:stoppingAtClass:]):
2569
2570 2006-04-28  David Hyatt  <hyatt@apple.com>
2571
2572         Double the cache size to account for our revised (more accurate)
2573         measurement of the image buffers.
2574
2575         Reviewed by darin
2576
2577         * WebView/WebPreferences.m:
2578         (+[WebPreferences initialize]):
2579
2580 2006-04-28  David Hyatt  <hyatt@apple.com>
2581
2582         Fix for 8586, move WebTextRenderer into WebCore.
2583
2584         Reviewed by darin
2585
2586         * Misc/WebKitNSStringExtras.m:
2587         (-[NSString _web_drawAtPoint:font:textColor:]):
2588         (-[NSString _web_widthWithFont:]):
2589         * Misc/WebStringTruncator.m:
2590         (+[WebStringTruncator centerTruncateString:toWidth:]):
2591         (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
2592         (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
2593         (+[WebStringTruncator widthOfString:font:]):
2594         * WebCoreSupport/WebSystemInterface.m:
2595         (InitWebCoreSystemInterface):
2596         * WebCoreSupport/WebTextRenderer.h: Removed.
2597         * WebCoreSupport/WebTextRenderer.m: Removed.
2598         * WebCoreSupport/WebTextRendererFactory.h: Removed.
2599         * WebCoreSupport/WebTextRendererFactory.m: Removed.
2600         * WebKit.xcodeproj/project.pbxproj:
2601         * WebView/WebFrameView.m:
2602         (-[WebFrameView initWithFrame:]):
2603         * WebView/WebHTMLView.m:
2604         (-[NSArray _addToStyle:fontA:fontB:]):
2605         * WebView/WebTextView.m:
2606         (-[WebTextView setFixedWidthFont]):
2607         * WebView/WebView.m:
2608         (+[WebView _setAlwaysUseATSU:]):
2609         (+[WebView _setShouldUseFontSmoothing:]):
2610         (+[WebView _shouldUseFontSmoothing]):
2611
2612 2006-04-28  Eric Seidel  <eseidel@apple.com>
2613
2614         Reviewed by darin.
2615
2616         Misc. style cleanup.
2617         http://bugzilla.opendarwin.org/show_bug.cgi?id=8643
2618
2619         * Misc/WebIconDatabase.m:
2620         (-[NSMutableDictionary iconForURL:withSize:cache:]):
2621         (-[NSMutableDictionary iconURLForURL:]):
2622         (-[NSMutableDictionary retainIconForURL:]):
2623         (-[NSMutableDictionary releaseIconForURL:]):
2624         (-[WebIconDatabase _setIcon:forIconURL:]):
2625         (-[WebIconDatabase _iconsForIconURLString:]):
2626         (-[WebIconDatabase _forgetIconForIconURLString:]):
2627         (-[WebIconDatabase _releaseIconForIconURLString:]):
2628         (-[WebIconDatabase _iconsBySplittingRepresentationsOfIcon:]):
2629         * Plugins/WebBasePluginPackage.m:
2630         (+[WebBasePluginPackage pluginWithPath:]):
2631         (-[WebBasePluginPackage pathByResolvingSymlinksAndAliasesInPath:]):
2632         (-[WebBasePluginPackage initWithPath:]):
2633         (-[WebBasePluginPackage getPluginInfoFromBundleAndMIMEDictionary:]):
2634         (-[WebBasePluginPackage pListForPath:createFile:]):
2635         (-[WebBasePluginPackage getPluginInfoFromPLists]):
2636         (-[WebBasePluginPackage load]):
2637         (-[WebBasePluginPackage setMIMEToExtensionsDictionary:]):
2638         (-[WebBasePluginPackage isNativeLibraryData:]):
2639         (-[NSArray _web_lowercaseStrings]):
2640         * Plugins/WebNetscapePluginPackage.m:
2641         (-[WebNetscapePluginPackage openResourceFile]):
2642         (-[WebNetscapePluginPackage closeResourceFile:]):
2643         (-[WebNetscapePluginPackage stringForStringListID:andIndex:]):
2644         (-[WebNetscapePluginPackage getPluginInfoFromResources]):
2645         (-[WebNetscapePluginPackage initWithPath:]):
2646         (-[WebNetscapePluginPackage executableType]):
2647         (-[WebNetscapePluginPackage unloadWithoutShutdown]):
2648         (-[WebNetscapePluginPackage load]):
2649         (-[WebNetscapePluginPackage unload]):
2650         * Plugins/WebNetscapePluginRepresentation.m:
2651         (-[WebNetscapePluginRepresentation redeliverStream]):
2652         * Plugins/WebPluginDatabase.m:
2653         (+[WebPluginDatabase installedPlugins]):
2654         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
2655         (-[WebPluginDatabase pluginForExtension:]):
2656         (pluginLocations):
2657         (-[WebPluginDatabase init]):
2658         (-[WebPluginDatabase refresh]):
2659         * Plugins/npapi.m:
2660         (NPN_MemAlloc):
2661         (NPN_MemFree):
2662         (pluginViewForInstance):
2663         * WebCoreSupport/WebSubresourceLoader.m:
2664         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
2665         (-[WebSubresourceLoader willSendRequest:redirectResponse:]):
2666         * WebView/WebDataSource.m:
2667         (-[WebDataSource isLoading]):
2668         * WebView/WebFrame.m:
2669         (-[WebFrame _loadDataSource:withLoadType:formState:]):
2670         (-[WebFrame _subframeIsLoading]):
2671         * WebView/WebView.m:
2672         (-[WebView initWithFrame:]):
2673         (-[WebView initWithFrame:frameName:groupName:]):
2674
2675 2006-04-26  Tim Omernick  <timo@apple.com>
2676
2677         Reviewed by Geoff.
2678
2679         <rdar://problem/4525105> Repro TOT crash in [WebBaseNetscapePluginView dealloc] at coachella.com
2680         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8564> crashed when closing a tab
2681
2682         * WebView/WebFrame.m:
2683         (-[WebFramePrivate dealloc]):
2684         Assert that plugInViews has been released.
2685         (-[WebFrame _addPlugInView:]):
2686         New method.  Adds the plug-in view to the plugInViews set and calls -setWebFrame: on it.
2687         (-[WebFrame _removeAllPlugInViews]):
2688         New method.  Calls -setWebFrame:nil on all plug-in views and releases the plugInViews set.
2689         (-[WebFrame _willCloseURL]):
2690         New method.  Dispose of plug-in views when leaving a page (or closing the WebView).
2691
2692         * WebView/WebFrameInternal.h:
2693         Declared -_addPlugInView:, -_removeAllPlugInViews, -_willCloseURL
2694
2695         * WebCoreSupport/WebFrameBridge.m:
2696         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
2697         Call -[WebFrame _addPlugInView:] instead of directly setting plug-in views' frames.  This
2698         allows us to keep track of them so that we can explicitly dispose of them when leaving the page.
2699         (-[WebFrameBridge closeURL]):
2700         Override -[WebCoreFrameBridge closeURL] so that we can perform our own teardown when leaving
2701         a page or closing the WebView.
2702
2703         * Plugins/WebBaseNetscapePluginView.h:
2704         Declared -stop so that subclass WebNetscapePluginEmbeddedView can call it.
2705
2706         * Plugins/WebNetscapePluginEmbeddedView.m:
2707         (-[WebNetscapePluginEmbeddedView setWebFrame:]):
2708         Stop the plug-in when it is removed from its WebFrame.
2709
2710 2006-04-25  Tim Omernick  <timo@apple.com>
2711
2712         Reviewed by John Sullivan.
2713
2714         <rdar://problem/4472035> SPI that checks for URL policy fails in plugin documents
2715
2716         * Plugins/WebPluginController.h:
2717         * Plugins/WebPluginController.m:
2718         (-[WebPluginController URLPolicyCheckReferrer]):
2719         New method.  Get the referrer from the frame's data source's NSURLResponse.  Note that for
2720         document types loaded by WebCore, this URL is the same as -[WebCorePageBridge referrer],
2721         since the response URL is what we pass to -[WebCorePageBridge openURL:].
2722
2723         * Plugins/WebPluginContainerCheck.m:
2724         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
2725         Use the WebPluginController's -URLPolicyCheckReferrer instead of assuming that the bridge's
2726         -referrer is valid.  -[WebCorePageBridge referrer] is only set during the normal WebCore page
2727         load process, which has nothing to do with loading standalone plugin documents.
2728
2729 2006-04-25  Tim Omernick  <timo@apple.com>
2730
2731         Reviewed by Eric.
2732
2733         <rdar://problem/4526052> intermittent assertion failure in -[WebBasePluginPackage dealloc]
2734         running layout tests
2735
2736         * Plugins/WebPluginPackage.m:
2737         (-[WebPluginPackage unload]):
2738         Clear isLoaded here.  It turns out that only WebNetscapePluginPackage cleared its isLoaded
2739         flag in -unload.  We need to also do it here, because the superclass (WebBasePluginPackage)
2740         asserts in -dealloc that -unload has been called.
2741
2742 2006-04-25  Tim Omernick  <timo@apple.com>
2743
2744         Reviewed by Eric.
2745
2746         <rdar://problem/4526120> -[WebBasePluginPackage finalize] leaks the CFBundle (under GC only)
2747
2748         * Plugins/WebBasePluginPackage.m:
2749         (-[WebBasePluginPackage finalize]):
2750         Release the CFBundle here.
2751
2752 2006-04-25  Tim Omernick  <timo@apple.com>
2753
2754         Reviewed by Geoff.
2755
2756         <rdar://problem/4472037>
2757         
2758         Private extensions to the WebPlugin interface.  A plugin may implement these methods to receive loading callbacks
2759         for its main resource.  Plug-ins that implement this SPI show better loading progress in the browser, can be saved
2760         to disk, and are more efficient by avoiding making duplicate GET or POST requests for the plug-in's main resource.
2761
2762         I want to provide a solid API for plug-in networking, but time constraints require that I first provide this simple
2763         SPI for internal clients.
2764
2765         * Plugins/WebPluginViewFactoryPrivate.h:
2766         Added a new plugin argument, WebPlugInShouldLoadMainResourceKey.  If YES, the plugin is responsible
2767         for loading its own content.  If NO, the plugin should wait for WebKit to send it the data via the
2768         new request-sharing SPI.
2769
2770         * Plugins/WebPluginPrivate.h: Added.
2771         Request-sharing SPI.  See comments in code.
2772
2773         * Plugins/WebPluginDocumentView.h:
2774         Hang onto the plugin view as an ivar so we can call the new resource loading methods on it.
2775         * Plugins/WebPluginDocumentView.m:
2776         (-[WebPluginDocumentView dealloc]):
2777         Release pluginView ivar.
2778         (-[WebPluginDocumentView setDataSource:]):
2779         Pass NO for WebPlugInShouldLoadMainResourceKey to indicate to the plugin that it should not 
2780         load its own main resource -- the data will come from WebKit.  This is only necessary for plugin
2781         documents.  By the time we create the view for a plugin document, we already have fetched some
2782         of its main resource's data.  Embedded plugins do not have this issue because WebKit is not
2783         involved in loading their content.
2784         Call -webPlugInMainResourceDidReceivResponse: on the plugin if necessary.  This lets the plugin
2785         know how much and what kind of data is going to be received.
2786         (-[WebPluginDocumentView dataSourceUpdated:]):
2787         If the plugin implements the new request-sharing SPI, don't cancel the in-progress request.
2788         (-[WebPluginDocumentView receivedData:withDataSource:]):
2789         Forward to the plugin via the new request-sharing SPI.
2790         (-[WebPluginDocumentView receivedError:withDataSource:]):
2791         ditto
2792         (-[WebPluginDocumentView finishedLoadingWithDataSource:]):
2793         ditto
2794
2795         * Plugins/WebPluginPackage.m:
2796         Added WebPlugInShouldLoadMainResourceKey, tweaked some style a bit.
2797
2798         * WebCoreSupport/WebFrameBridge.m:
2799         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]):
2800         Pass YES for WebPlugInShouldLoadMainResourceKey.  Embedded plugins must load their own data.
2801         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
2802         ditto
2803         
2804         * WebKit.xcodeproj/project.pbxproj:
2805         Added WebPluginPrivate.h
2806
2807 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
2808
2809         Reviewed by Geoff.
2810         
2811         <rdar://problem/4525364> REGRESSION (yesterday?): LOG() mechanism is broken
2812         
2813         - initialize WebKit's log channels
2814
2815         * Misc/WebKitLogging.h:
2816         * Misc/WebKitLogging.m:
2817         (initializeLogChannel):
2818         (WebKitInitializeLoggingChannelsIfNecessary):
2819         * WebView/WebPreferences.m:
2820         (+[WebPreferences initialize]):
2821         * WebView/WebView.m:
2822         (-[WebView _commonInitializationWithFrameName:groupName:]):
2823
2824 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
2825
2826         Build fix:
2827         
2828         - move some prematurely moved code back
2829
2830         * WebCoreSupport/WebFrameBridge.h:
2831         * WebCoreSupport/WebFrameBridge.m:
2832         (-[WebFrameBridge fini]):
2833         (-[WebFrameBridge _preferences]):
2834         (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
2835         (-[WebFrameBridge keyboardUIMode]):
2836
2837 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
2838
2839         Reviewed by Darin.
2840
2841         - move more code from WebFrameBridge to WebCoreFrameBridge
2842
2843         * WebCoreSupport/WebFrameBridge.h:
2844         * WebCoreSupport/WebFrameBridge.m:
2845         (-[WebFrameBridge fini]):
2846         (-[WebFrameBridge expiresTimeForResponse:]):
2847         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
2848         (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
2849         (-[WebFrameBridge valueForKey:keys:values:]):
2850         (-[WebFrameBridge _preferences]):
2851
2852 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
2853
2854         Reviewed by Anders.
2855         
2856         - Remove use of _webSuperviewOfClass: and related
2857         http://bugzilla.opendarwin.org/show_bug.cgi?id=8562
2858         
2859         I removed all use of these, now objects get at each other via
2860         actual pointers, not using the view hierarchy. However, I left two
2861         of the calls in because other clients rely on them as SPI (ugh).
2862
2863         * History/WebHistoryItem.m:
2864         * Misc/WebNSViewExtras.h:
2865         * Misc/WebNSViewExtras.m:
2866         (-[NSView _web_superviewOfClass:]):
2867         (-[NSView _web_parentWebFrameView]):
2868         * Plugins/WebNetscapePluginDocumentView.m:
2869         (-[WebNetscapePluginDocumentView layout]):
2870         * Plugins/WebNetscapePluginEmbeddedView.h:
2871         * Plugins/WebNetscapePluginEmbeddedView.m:
2872         (-[WebNetscapePluginEmbeddedView setWebFrame:]):
2873         (-[WebNetscapePluginEmbeddedView dataSource]):
2874         * Plugins/WebNullPluginView.h:
2875         * Plugins/WebNullPluginView.m:
2876         (-[WebNullPluginView setWebFrame:]):
2877         (-[WebNullPluginView viewDidMoveToWindow]):
2878         * Plugins/WebPluginController.h:
2879         * Plugins/WebPluginController.m:
2880         (-[WebPluginController setDataSource:]):
2881         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
2882         (-[WebPluginController webPlugInContainerShowStatus:]):
2883         (-[WebPluginController webPlugInContainerSelectionColor]):
2884         (-[WebPluginController webFrame]):
2885         * Plugins/WebPluginDocumentView.h:
2886         * Plugins/WebPluginDocumentView.m:
2887         (-[WebPluginDocumentView setDataSource:]):
2888         (-[WebPluginDocumentView layout]):
2889         (-[WebPluginDocumentView currentWindow]):
2890         (-[WebPluginDocumentView viewWillMoveToWindow:]):
2891         * WebCoreSupport/WebFrameBridge.m:
2892         (-[WebFrameBridge formControlIsBecomingFirstResponder:]):
2893         (-[WebFrameBridge formControlIsResigningFirstResponder:]):
2894         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
2895         * WebCoreSupport/WebViewFactory.m:
2896         (-[WebViewFactory bridgeForView:]):
2897         * WebView/WebClipView.m:
2898         (-[NSView initWithFrame:]):
2899         * WebView/WebFrameView.m:
2900         (-[WebFrameView _shouldDrawBorder]):
2901         (-[WebFrameView webCoreBridge]):
2902         * WebView/WebHTMLView.m:
2903         (-[WebTextCompleteController dealloc]):
2904         (-[WebHTMLView _dataSource]):
2905         (-[WebHTMLView _bridge]):
2906         (-[WebHTMLView _webView]):
2907         (-[WebHTMLView _frameView]):
2908         (-[WebHTMLView _web_firstResponderCausesFocusDisplay]):
2909         (-[NSArray becomeFirstResponder]):
2910         (-[NSArray setDataSource:]):
2911         (-[NSArray pageUp:]):
2912         (-[NSArray pageDown:]):
2913         (-[NSArray pageUpAndModifySelection:]):
2914         (-[NSArray pageDownAndModifySelection:]):
2915         (-[WebHTMLView _frame]):
2916         * WebView/WebHTMLViewInternal.h:
2917         * WebView/WebImageView.h:
2918         * WebView/WebImageView.m:
2919         (-[WebImageView drawRect:]):
2920         (-[WebImageView adjustFrameSize]):
2921         (-[WebImageView setDataSource:]):
2922         (-[WebImageView webView]):
2923         (-[WebImageView writeImageToPasteboard:types:]):
2924         (-[WebImageView copy:]):
2925         (-[WebImageView elementAtPoint:]):
2926         (-[WebImageView mouseDragged:]):
2927         * WebView/WebPDFView.h:
2928         * WebView/WebPDFView.m:
2929         (-[WebPDFView _applyPDFDefaults]):
2930         (-[WebPDFView _trackFirstResponder]):
2931         (-[PDFPrefUpdatingProxy forwardInvocation:]):
2932         * WebView/WebRenderNode.m:
2933         (-[WebRenderNode initWithWebFrameView:]):
2934         * WebView/WebTextView.h:
2935         * WebView/WebTextView.m:
2936         (-[WebTextView _textSizeMultiplierFromWebView]):
2937         (-[WebTextView _preferences]):
2938         (-[WebTextView setDataSource:]):
2939         (-[WebTextView _webFrame]):
2940         (-[WebTextView dragSelectionWithEvent:offset:slideBack:]):
2941         (-[WebTextView menuForEvent:]):
2942         (-[WebTextView resignFirstResponder]):
2943         (-[WebTextView drawPageBorderWithSize:]):
2944         (-[WebTextView knowsPageRange:]):
2945         * WebView/WebView.m:
2946         (-[WebView searchFor:direction:caseSensitive:wrap:]):
2947         (containingFrameView):
2948         (-[WebView _focusedFrame]):
2949         (-[WebView _frameViewAtWindowPoint:]):
2950
2951 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
2952
2953         Reviewed by Darin.
2954         
2955         - push WebFileButton and WebStringTruncator code down to WebCore
2956         http://bugzilla.opendarwin.org/show_bug.cgi?id=8552
2957
2958         * Misc/WebStringTruncator.m:
2959         (+[WebStringTruncator centerTruncateString:toWidth:]):
2960         (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
2961         (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
2962         (+[WebStringTruncator widthOfString:font:]):
2963         * WebCoreSupport/WebFileButton.h: Removed.
2964         * WebCoreSupport/WebFileButton.m: Removed.
2965         * WebCoreSupport/WebFrameBridge.h:
2966         * WebCoreSupport/WebFrameBridge.m:
2967         (-[WebFrameBridge runOpenPanelForFileButtonWithResultListener:]):
2968         * WebCoreSupport/WebViewFactory.m:
2969         (-[WebViewFactory fileButtonChooseFileLabel]):
2970         (-[WebViewFactory fileButtonNoFileSelectedLabel]):
2971         * WebKit.xcodeproj/project.pbxproj:
2972
2973 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
2974
2975         Reviewed by Eric.
2976         
2977         - remove WebCookieAdapter, WebCore can just use Foundation directly.
2978
2979         * WebCoreSupport/WebCookieAdapter.h: Removed.
2980         * WebCoreSupport/WebCookieAdapter.m: Removed.
2981         * WebKit.xcodeproj/project.pbxproj:
2982         * WebView/WebFrameView.m:
2983         (-[WebFrameView initWithFrame:]):
2984
2985 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
2986
2987         Reviewed by Adele.
2988         
2989         - prune WebView SPI of unused calls
2990         
2991         Specifically I moved methods that have no callers outside WebKit
2992         to WebViewInternal.h or removed them entirely.
2993
2994         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
2995         * Plugins/WebBaseNetscapePluginView.m:
2996         * Plugins/WebNetscapePluginDocumentView.m:
2997         * Plugins/WebNetscapePluginStream.m:
2998         * Plugins/WebNullPluginView.m:
2999         * Plugins/WebPluginContainerCheck.m:
3000         * Plugins/WebPluginController.m:
3001         * WebCoreSupport/WebFrameBridge.m:
3002         * WebCoreSupport/WebPageBridge.m:
3003         * WebCoreSupport/WebSubresourceLoader.m:
3004         * WebView/WebDataSource.m:
3005         * WebView/WebHTMLView.m:
3006         * WebView/WebImageView.m:
3007         * WebView/WebLoader.m:
3008         * WebView/WebMainResourceLoader.m:
3009         * WebView/WebPDFView.m:
3010         * WebView/WebScriptDebugDelegate.m:
3011         * WebView/WebView.m:
3012         (-[WebView _downloadURL:]):
3013         * WebView/WebViewInternal.h:
3014         * WebView/WebViewPrivate.h:
3015
3016 2006-04-22  Maciej Stachowiak  <mjs@apple.com>
3017
3018         Reviewed by Eric.
3019
3020         - remove WebKit copy of assertions code, use the assertions
3021         stuff from JavaScriptCore instead.
3022
3023         * Carbon/HIViewAdapter.m:
3024         * DOM/WebDOMOperations.m:
3025         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
3026         * DefaultDelegates/WebDefaultPolicyDelegate.m:
3027         (-[WebDefaultPolicyDelegate webView:unableToImplementPolicyWithError:frame:]):
3028         * History/WebBackForwardList.m:
3029         * History/WebHistory.m:
3030         (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
3031         (-[WebHistoryPrivate _saveHistoryGuts:URL:error:]):
3032         * History/WebHistoryItem.m:
3033         * Misc/WebAssertions.h: Removed.
3034         * Misc/WebAssertions.m: Removed.
3035         * Misc/WebDatabase.m:
3036         * Misc/WebDownload.m:
3037         * Misc/WebFileDatabase.m:
3038         (SetThreadPriority):
3039         * Misc/WebIconDatabase.m:
3040         (-[NSMutableDictionary iconForURL:withSize:cache:]):
3041         (-[NSMutableDictionary releaseIconForURL:]):
3042         (-[NSMutableDictionary delayDatabaseCleanup]):
3043         (-[NSMutableDictionary allowDatabaseCleanup]):
3044         (-[WebIconDatabase _loadIconDictionaries]):
3045         (-[WebIconDatabase _updateFileDatabase]):
3046         (-[WebIconDatabase _iconsBySplittingRepresentationsOfIcon:]):
3047         * Misc/WebIconLoader.m:
3048         * Misc/WebKitLogging.h:
3049         * Misc/WebKitLogging.m:
3050         * Misc/WebKitSystemBits.m:
3051         (initCapabilities):
3052         * Misc/WebLRUFileList.m:
3053         (WebLRUFileListRemoveOldestFileFromList):
3054         (WebLRUFileListGetFileSize):
3055         * Misc/WebLocalizableStrings.m:
3056         * Misc/WebNSCalendarDateExtras.m:
3057         * Misc/WebNSDataExtras.m:
3058         * Misc/WebNSDictionaryExtras.m:
3059         * Misc/WebNSFileManagerExtras.m:
3060         * Misc/WebNSPasteboardExtras.m:
3061         * Misc/WebNSURLExtras.m:
3062         (hexDigit):
3063         (hexDigitValue):
3064         (allCharactersInIDNScriptWhiteList):
3065         * Misc/WebNSURLRequestExtras.m:
3066         * Misc/WebNSUserDefaultsExtras.m:
3067         * Misc/WebStringTruncator.m:
3068         * Panels/WebAuthenticationPanel.m:
3069         (-[WebAuthenticationPanel loadNib]):
3070         * Panels/WebPanelAuthenticationHandler.m:
3071         * Plugins/WebBaseNetscapePluginStream.m:
3072         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
3073         (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
3074         * Plugins/WebBaseNetscapePluginView.m:
3075         (TSMEventHandler):
3076         (-[WebBaseNetscapePluginView start]):
3077         (-[WebBaseNetscapePluginView status:]):
3078         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
3079         * Plugins/WebBasePluginPackage.m:
3080         * Plugins/WebNetscapePluginDocumentView.m:
3081         * Plugins/WebNetscapePluginPackage.m:
3082         (-[WebNetscapePluginPackage load]):
3083         * Plugins/WebNetscapePluginRepresentation.m:
3084         * Plugins/WebPluginContainerCheck.m:
3085         * Plugins/WebPluginController.m:
3086         (-[WebPluginController addPlugin:]):
3087         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
3088         (-[WebPluginController webPlugInContainerShowStatus:]):
3089         * Plugins/WebPluginDatabase.m:
3090         * Plugins/WebPluginDocumentView.m:
3091         * WebCoreSupport/WebCookieAdapter.m:
3092         * WebCoreSupport/WebFileButton.m:
3093         * WebCoreSupport/WebFrameBridge.m:
3094         (-[WebFrameBridge runModal]):
3095         * WebCoreSupport/WebImageData.m:
3096         (-[WebImageData _checkSolidColor:]):
3097         (-[WebImageData tileInRect:fromPoint:context:]):
3098         (-[WebImageData scaleAndTileInRect:fromRect:withHorizontalTileRule:withVerticalTileRule:context:]):
3099         * WebCoreSupport/WebImageDecoder.m:
3100         * WebCoreSupport/WebImageRenderer.m:
3101         (-[WebImageRenderer TIFFRepresentation]):
3102         * WebCoreSupport/WebImageRendererFactory.m:
3103         * WebCoreSupport/WebJavaScriptTextInputPanel.m:
3104         * WebCoreSupport/WebKeyGenerator.m:
3105         * WebCoreSupport/WebPageBridge.m:
3106         * WebCoreSupport/WebSubresourceLoader.m:
3107         * WebCoreSupport/WebTextRenderer.m:
3108         (widthForGlyph):
3109         (-[WebTextRenderer initWithFont:]):
3110         (drawGlyphs):
3111         (initializeATSUStyle):
3112         (createATSULayoutParameters):
3113         (getTextBounds):
3114         (ATSU_draw):
3115         * WebCoreSupport/WebTextRendererFactory.m:
3116         * WebCoreSupport/WebViewFactory.m:
3117         * WebKit.exp:
3118         * WebKit.xcodeproj/project.pbxproj:
3119         * WebKitPrefix.h:
3120         * WebView/WebArchiver.m:
3121         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
3122         * WebView/WebClipView.m:
3123         * WebView/WebDataProtocol.m:
3124         * WebView/WebDataSource.m:
3125         (-[WebDataSource _startLoading]):
3126         * WebView/WebFormDataStream.m:
3127         (formEventCallback):
3128         (webSetHTTPBody):
3129         * WebView/WebFrame.m:
3130         (-[WebFrame _transitionToCommitted:]):
3131         * WebView/WebFrameView.m:
3132         * WebView/WebHTMLRepresentation.m:
3133         * WebView/WebHTMLView.m:
3134         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
3135         (-[NSArray drawSingleRect:]):
3136         (-[NSArray namesOfPromisedFilesDroppedAtDestination:]):
3137         (-[NSArray _scaleFactorForPrintOperation:]):
3138         (-[NSArray deleteBackwardByDecomposingPreviousCharacter:]):
3139         (-[NSArray checkSpelling:]):
3140         (-[NSArray showGuessPanel:]):
3141         (-[NSArray _changeSpellingToWord:]):
3142         (-[NSArray ignoreSpelling:]):
3143         (-[NSArray performFindPanelAction:]):
3144         (-[WebTextCompleteController doCompletion]):
3145         * WebView/WebImageView.m:
3146         * WebView/WebLoader.m:
3147         (-[NSURLProtocol connection:willCacheResponse:]):
3148         * WebView/WebPDFRepresentation.m:
3149         (+[WebPDFRepresentation PDFDocumentClass]):
3150         * WebView/WebPDFView.m:
3151         (+[WebPDFView PDFKitBundle]):
3152         (+[WebPDFView PDFViewClass]):
3153         (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
3154         * WebView/WebTextRepresentation.m:
3155         * WebView/WebTextView.m:
3156         * WebView/WebUnarchivingState.m:
3157         * WebView/WebView.m:
3158
3159 2006-04-22  Timothy Hatcher  <timothy@apple.com>
3160
3161         Reviewed by Eric.
3162
3163         http://bugzilla.opendarwin.org/show_bug.cgi?id=8514
3164         Bug 8514: Web Inspector hides when the app is in the background
3165
3166         Makes the inspector not hide in the background. Since the inspector is a floating panel
3167         we need to call setFloatingPanel:NO when the app is switching into the background. Then
3168         call setFloatingPanel:YES when the app is activated again. Without this the inspector
3169         would float above all applications.
3170
3171         * WebInspector/WebInspector.m:
3172         (-[NSWindow window]): setHidesOnDeactivate:NO
3173         (-[NSWindow windowWillClose:]): de-regiser appliction active notifications
3174         (-[NSWindow showWindow:]): register for appliction active notifications
3175         (-[WebInspector _applicationWillResignActive]): setFloatingPanel:NO
3176         (-[WebInspector _applicationDidBecomeActive]): setFloatingPanel:YES
3177
3178 2006-04-21  Adele Peterson  <adele@apple.com>
3179
3180         Reviewed by Darin.
3181
3182         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8181
3183         REGRESSION: After tabbing in page's field, attempting to tab from Google toolbar search to page fails on first try
3184
3185         Test: manual-tests/tabbing-input-google.html
3186
3187         * WebView/WebHTMLView.m: (-[NSArray resignFirstResponder]):
3188         When resigning first responder, reset willBecomeFirstResponderForNodeFocus, so when the WebHTMLView gets focus again
3189         it knows it can start moving through the tab cycle.
3190
3191 2006-04-20  Tim Omernick  <timo@apple.com>
3192
3193         Reviewed by John Sullivan.
3194
3195         <rdar://problem/4476875> Support printing for embedded Netscape plugins
3196
3197         NOTE: This only works with the Flash plugin right now.  It appears that the other
3198         major plugins either have awful printing support, or no printing support.  If someone
3199         can find an example of any other embedded Netscape plugin printing in any browser on
3200         the Mac, I will be happy to eat my own words!
3201
3202         * Plugins/WebBaseNetscapePluginView.m:
3203         (-[WebBaseNetscapePluginView drawRect:]):
3204         When printing, get the printed bitmap via -_printedPluginBitmap, and draw it into the
3205         plugin view.
3206         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
3207         Call NPP_Print on the plugin to render it into a GWorld.  This GWorld has the same
3208         underlying buffer as an NSBitmapImageRep, which is returned to the caller.
3209
3210 2006-04-20 Mitz Pettel  <opendarwin.org@mitzpettel.com>
3211
3212         Reviewed by Darin.
3213
3214         WebKit part of:
3215         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
3216           REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
3217             a file: URL being pasted instead of just the file name
3218         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
3219           REGRESSION: File's path doesn't appear after dragging file into input field
3220
3221         * WebView/WebHTMLView.m:
3222         (-[WebHTMLView _plainTextFromPasteboard:]): Added method that tries to copy AppKit
3223         text fields' logic for extracting plain text from the pasteboard.
3224         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Added helper method.
3225         (-[WebHTMLView _shouldInsertText:replacingDOMRange:givenAction:]):
3226         (-[WebHTMLView _shouldReplaceSelectionWithText:givenAction:]):
3227         (-[WebHTMLView readSelectionFromPasteboard:]): Paste as plain text if
3228         rich text is not allowed.
3229         (-[WebHTMLView validateUserInterfaceItem:]): Changed to not allow pasteAsRichText:
3230         if the paste is not going to be handled by the DOM and the selection
3231         does not allow pasting rich text.
3232         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Paste as plain text if
3233         rich text is not allowed.
3234         (-[WebHTMLView paste:]): Ditto.
3235         (-[WebHTMLView pasteAsPlainText:]):
3236
3237 2006-04-20  Darin Adler  <darin@apple.com>
3238
3239         Reviewed by Adele.
3240
3241         - WebKit part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
3242           eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
3243
3244         * WebCoreSupport/WebGraphicsBridge.h: Removed.
3245         * WebCoreSupport/WebGraphicsBridge.m: Removed.
3246         * WebCoreSupport/WebSystemInterface.h: Added.
3247         * WebCoreSupport/WebSystemInterface.m: Added.
3248
3249         * WebKit.xcodeproj/project.pbxproj: Updated for removed and added files.
3250
3251         * WebCoreSupport/WebImageData.m: Removed unneeded include of WebGraphicsBridge.h.
3252         * WebCoreSupport/WebImageRenderer.m: Ditto.
3253         * WebCoreSupport/WebTextRenderer.m: Ditto.
3254
3255         * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Guarded all the one-time
3256         initialization inside a boolean, just in case some things take a little time. Added
3257         a call to InitWebCoreSystemInterface to the one-time initialization here. Later, we
3258         will need to add it in some other places if we call code that requires the use of
3259         WebCoreSystemInterface functions from anywhere that can be invoked before creations
3260         of the first WebFrameView, but for now there is no need.
3261
3262 2006-04-19  James G. Speth  <speth@end.com>
3263
3264         Reviewed by Timothy.
3265
3266         http://bugzilla.opendarwin.org/show_bug.cgi?id=8442
3267         Bug 8442: improvements to Cocoa bindings support in WebView - code simplification
3268
3269         Removes the WebController class added earlier; changes NSTreeController and 
3270         WebView to together without it. Now you can just bind the contentObject binding
3271         of the tree controller directly to the mainFrameDocument key of the WebView.
3272
3273         * WebCoreSupport/WebFrameBridge.m:
3274         (-[WebFrameBridge windowObjectCleared]):
3275         * WebView/WebDataSource.m:
3276         (-[WebDataSource _setTitle:]):
3277         * WebView/WebFrame.m:
3278         (-[WebFrame _closeOldDataSources]):
3279         * WebView/WebView.m:
3280         (-[WebView _progressStarted:]):
3281         (-[WebView _finalProgressComplete]):
3282         (-[WebView _commonInitializationWithFrameName:groupName:]):
3283         (-[WebView setMainFrameDocumentReady:]):
3284         (-[WebView mainFrameDocument]):
3285         * WebView/WebViewPrivate.h:
3286
3287 2006-04-19  James G. Speth  <speth@end.com>
3288
3289         Reviewed by Timothy.
3290
3291         http://bugzilla.opendarwin.org/show_bug.cgi?id=6635
3292         Bug 6635: Crash selecting inspector nodes for tabs that aren't foremost
3293
3294         Stop observing window will close notifications before we tell the highlight window to close,
3295         this prevents the crash. Also prevent drawing highlights for hidden tabs.
3296
3297         * WebInspector/WebInspector.m:
3298         (-[WebInspector _highlightNode:]):
3299         * WebInspector/WebNodeHighlight.m:
3300         (-[WebNodeHighlight expire]):
3301
3302 2006-04-19  James G. Speth  <speth@end.com>
3303
3304         Reviewed by Timothy.
3305
3306         http://bugzilla.opendarwin.org/show_bug.cgi?id=6637
3307         Bug 6637: selecting node in Inspector after closing window crashes Safari
3308
3309         When the window the Web Inspector was inspecting is closed, the inspector goes into its
3310         no-selection state. Choosing to inspect another element activates it again. The inspector
3311         will also follow the WebView if the URL changes and select the root element on the new page.
3312
3313         * WebInspector/WebInspector.m:
3314         (-[NSWindow setWebFrame:]):
3315         (-[NSWindow setRootDOMNode:]):
3316         (-[WebInspector _revealAndSelectNodeInTree:]):
3317         (-[WebInspector _update]):
3318         (-[WebInspector _updateRoot]):
3319         (-[WebInspector inspectedWebViewProgressFinished:]):
3320         (-[WebInspector inspectedWindowWillClose:]):
3321         (-[WebInspector webView:didFinishLoadForFrame:]):
3322         * WebInspector/WebInspectorPanel.m:
3323         (-[WebInspectorPanel canBecomeMainWindow]):
3324
3325 2006-04-18  Darin Adler  <darin@apple.com>
3326
3327         Reviewed by Beth.
3328
3329         * WebInspector/webInspector/inspector.css: Add "-webkit-" prefixes to the border
3330         radius properties to make the corners rounded again.
3331
3332 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3333
3334         Reviewed by Darin.
3335
3336         - WebKit part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8324
3337           REGRESSION: textarea :focus not applied immediately
3338
3339         * WebCoreSupport/WebFrameBridge.m:
3340         (-[WebFrameBridge formControlIsBecomingFirstResponder:]): Added. Calls the ancestor
3341         WebHTMLView's _formControlIsBecomingFirstResponder:
3342         * WebView/WebHTMLView.m:
3343         (-[WebHTMLView _updateFocusState:]): If a descendant is becoming first responder,
3344         enable focused appearance.
3345         (-[WebHTMLView _formControlIsBecomingFirstResponder:]): Added. Calls _updateFocusState,
3346         causing the frame to display with focus attributes.
3347         * WebView/WebHTMLViewInternal.h:
3348
3349 2006-04-14  James G. Speth  <speth@end.com>
3350
3351         Reviewed by Timothy.
3352
3353         Bug 8389: support for Cocoa bindings - binding an NSTreeController to the WebView's DOM
3354         http://bugzilla.opendarwin.org/show_bug.cgi?id=8389
3355
3356         Added a controller class, WebController, that is a subclass of
3357         NSTreeController that has a new outlet/binding for the WebView.
3358
3359         * WebCoreSupport/WebFrameBridge.m:
3360         (-[WebFrameBridge windowObjectCleared]): notify bindings about the document change
3361         * WebView/WebView.m:
3362         (-[WebView _progressStarted:]): notify bindings about the document change
3363         (-[WebView _finalProgressComplete]): notify bindings about the document change
3364         (-[WebView _declaredKeys]): added a key for the main frame document
3365         (-[WebController init]):
3366         (-[WebController exposedBindings]):
3367         (-[WebController valueClassForBinding:]):
3368         (-[WebController setContent:]):
3369         (-[WebController webView]):
3370         (-[WebController setWebView:]):
3371         (-[WebView mainFrameDocument]): get the main frame's DOMDocument
3372         * WebView/WebViewPrivate.h: Adds mainFrameDocument to pending public.
3373
3374 2006-04-12  David Harrison  <harrison@apple.com>
3375
3376         Reviewed by Darin.
3377         
3378         <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
3379         <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app
3380         
3381         (see related changes in WebCore)
3382         
3383         Tests added:
3384         * editing/selection/extend-by-sentence-001.html: Added.
3385         * fast/dom/inner-text-001.html: Added.
3386
3387         * WebView/WebHTMLView.m:
3388         (-[NSArray validateUserInterfaceItem:]):
3389         (-[NSArray moveToBeginningOfSentence:]):
3390         (-[NSArray moveToBeginningOfSentenceAndModifySelection:]):
3391         (-[NSArray moveToEndOfSentence:]):
3392         (-[NSArray moveToEndOfSentenceAndModifySelection:]):
3393         (-[NSArray selectSentence:]):
3394         * WebView/WebView.m:
3395         * WebView/WebViewPrivate.h:
3396         Add sentence navigation and selection.
3397
3398 2006-04-12  Tim Omernick  <timo@apple.com>
3399
3400         Reviewed by Darin.
3401
3402         Part of <rdar://problem/4482530>
3403
3404         * WebView/WebView.m:
3405         (-[WebView _focusedFrame]):
3406         Fixed up the logic here to take into account immediate subviews of WebView, which are not actually in a WebFrameView
3407         (they are peers to the main frame's WebFrameView).
3408
3409 2006-04-10  John Sullivan  <sullivan@apple.com>
3410
3411         Reviewed by Tim Omernick.
3412         
3413         - fixed <rdar://problem/4139799> Seed: Safari: Private Browsing leaves traces in Icon Cache
3414         
3415         * Misc/WebIconDatabasePrivate.h:
3416         new ivars: pageURLsBoundDuringPrivateBrowsing, iconURLsBoundDuringPrivateBrowsing, and privateBrowsingEnabled
3417
3418         * Misc/WebIconDatabase.m:
3419         (-[NSMutableDictionary init]):
3420         initialize new ivars, and listen for notifications that WebPreferences changed so we can react to changes
3421         to private browsing.
3422         (-[NSMutableDictionary iconForURL:withSize:cache:]):
3423         Don't remove icon URL from extraRetain dictionary; that's now done in _forgetIconForIconURLString. (I left a
3424         comment here earlier about why I was worried about this change, but I convinced myself that it's fine.)
3425         (-[WebIconDatabase removeAllIcons]):
3426         Removed no-longer-true (and never very clear) comment, and braces. Also remove all objects from the two
3427         private-browsing-related dictionaries.
3428         (-[WebIconDatabase _setIcon:forIconURL:]):
3429         remember icon URL if private browsing is enabled
3430         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
3431         remember icon URL if private browsing is enabled
3432         (-[WebIconDatabase _setIconURL:forURL:]):
3433         added an assert that helped me out at one point
3434         (-[WebIconDatabase _clearDictionaries]):
3435         clear the two new dictionaries too
3436         (-[WebIconDatabase _loadIconDictionaries]):
3437         made an existing ERROR not fire in the expected case where there are no icons at all on disk
3438         (-[WebIconDatabase _updateFileDatabase]):
3439         when saving the pageURLToIconURL dictionary to disk, first remove any values that were created during
3440         private browsing
3441         (-[WebIconDatabase _retainIconForIconURLString:]):
3442         skip the code that deals with saving changes to disk if private browsing is enabled
3443         (-[WebIconDatabase _forgetIconForIconURLString:]):
3444         Remove the icon URL from extraRetain dictionary here. We're forgetting everything about this icon URL
3445         so we should forget its former extraRetain count too.
3446         (-[WebIconDatabase _resetCachedWebPreferences:]):
3447         Cache the new value of private browsing. If it has now been turned off, forget everything we learned
3448         while it was on. This causes (e.g.) icons for bookmarks or pre-existing history items to be forgotten
3449         if the icon was only learned during private browsing.
3450
3451         * History/WebHistoryItem.m:
3452         removed an unnecessary #import I happened to notice
3453         
3454 2006-04-10  David Hyatt  <hyatt@apple.com>
3455
3456         Make the broken CG focus ring painting work when WebCore sets a clip
3457         (in addition to respecting the dirty rect clip).
3458
3459         Reviewed by darin
3460
3461         * WebCoreSupport/WebGraphicsBridge.m:
3462         (-[WebGraphicsBridge drawFocusRingWithPath:radius:color:clipRect:]):
3463
3464 2006-04-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3465
3466         Reviewed by Darin.
3467
3468         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8100
3469           REGRESSION (NativeTextField): Right-aligned and RTL text jitters in new text fields
3470
3471         * WebCoreSupport/WebTextRenderer.m:
3472         (overrideLayoutOperation): For RTL runs, apply the word-rounding on the left.
3473         (CG_floatWidthForRun): For RTL runs, apply the last character's rounding
3474         on the left by adjusting the start position.
3475         (initializeWidthIterator): Added finalRoundingWidth field to WidthIterator.
3476         (advanceWidthIterator): For RTL runs, apply rounding on the left of the character,
3477         by increasing the width of the next character (which is the character to the left). For
3478         the last character, keep the rounding width in the iterator's finalRoundingWidth, to be used by
3479         CG_floatWidthForRun().
3480
3481 2006-04-08  John Sullivan  <sullivan@apple.com>
3482
3483         Reviewed by Adele Peterson.
3484
3485         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8260
3486         REGRESSION: Assertion failure: ![_private->iconsToSaveWithURLs containsObject:iconURLString] 
3487         in WebIconDatabase.m:695-[WebIconDatabase(WebInternal) _retainIconForIconURLString:]
3488
3489         * Misc/WebIconDatabase.m:
3490         (-[WebIconDatabase _retainIconForIconURLString:]):
3491         This new assertion was one block too high; moved it in.
3492
3493 2006-04-07  David Hyatt  <hyatt@apple.com>
3494
3495         A fix that makes coalesced updates work much better (and makes our
3496         single animated GIF timer work better).  The new rect painting algorithm
3497         for WebHTMLView will use the single unioned rect if the # of rects exceeds
3498         a threshold (10 is my initial cut), or if the union has enough "wasted"
3499         additional pixels (conservatively set at 75%).
3500
3501         Reviewed by darin
3502
3503         * WebView/WebHTMLView.m:
3504         (-[NSArray drawSingleRect:]):
3505         (-[NSArray drawRect:]):
3506
3507 2006-04-07  Maciej Stachowiak  <mjs@apple.com>
3508
3509         Reviewed by Darin.
3510         
3511         - simplify archive loading
3512
3513         * WebView/WebDataSource.m:
3514         (-[WebDataSource representation]): fix whitespace
3515         * WebView/WebHTMLRepresentation.m:
3516         (-[WebHTMLRepresentation loadArchive]): Use WebFrame's loadArchive: instead
3517         of trying to do a manual load here.