initial import
[vuplus_webkit] / Source / WebKit / mac / ChangeLog-2007-10-14
1 === Start merge of feature-branch 2007-10-12 ===
2
3 2007-10-03  Andrew Wellington  <proton@wiretapped.net>
4
5         Reviewed by Mark Rowe.
6         
7         Mac build fix for issue introduced in r26027
8
9         * WebCoreSupport/WebSystemInterface.m:
10         (InitWebCoreSystemInterface):
11
12 2007-10-01  Eric Seidel  <eric@webkit.org>
13
14         Reviewed by Oliver Hunt.
15         
16         SVG Subresources will not be saved when creating WebArchives
17         http://bugs.webkit.org/show_bug.cgi?id=15280
18         
19         Implement _subresourceURLs methods for more SVGElement types
20         more such methods will be needed as we add support for other
21         external references (such as use, mpath, tref, etc.)
22
23         * DOM/WebDOMOperations.mm:
24         (-[DOMSVGScriptElement _subresourceURLs]): added.
25         (-[DOMSVGCursorElement _subresourceURLs]): added.
26         (-[DOMSVGFEImageElement _subresourceURLs]): added.
27
28 2007-10-01  Eric Seidel  <eric@webkit.org>
29
30         Reviewed by Oliver Hunt.
31         
32         WebArchives do not embed stylesheets referenced by xml-stylesheeet
33         http://bugs.webkit.org/show_bug.cgi?id=15320
34
35         * DOM/WebDOMOperations.mm:
36         (-[DOMProcessingInstruction _stylesheetURL]): needed to access [[self sheet] href]
37         (-[DOMProcessingInstruction _subresourceURLs]): call and return _stylesheetURL
38
39 2007-10-01  Eric Seidel  <eric@webkit.org>
40
41         Reviewed by Oliver Hunt.
42
43         * DOM/WebDOMOperations.mm: added DOMSVGElementImage _subresources implementation
44         (-[DOMNode _URLsFromSelectors:]): now handles DOMSVGAnimatedString return values
45         (-[DOMSVGImageElement _subresourceURLs]): added.
46         * MigrateHeaders.make: copies DOMSVG* headers into WebKit/PrivateHeaders
47
48 2007-10-01  Oliver Hunt  <oliver@apple.com>
49
50         Reviewed by Mark.
51
52         Enable Experimental SVG features by default when building from Xcode
53
54         * Configurations/WebKit.xcconfig:
55
56 === End merge of feature-branch 2007-10-12 ===
57
58 2007-10-11  Mark Rowe  <mrowe@apple.com>
59
60         Reviewed by Tim Hatcher.
61
62         Fix for <rdar://problem/5488678>.  Disable debugging symbols in production builds for 10.4
63         PowerPC to prevent a huge STABS section from being generated.
64
65         * Configurations/Base.xcconfig:
66
67 2007-10-10  Alice Liu  <alice.liu@apple.com>
68
69         Reviewed by Geoff Garen.
70
71         Fixed <rdar://5464402> Crash when running fast/frames/onload-remove-iframe-crash.html in DRT
72         createFrame() now returns a RefPtr instead of a raw Frame pointer. 
73         Making this change improves the way we handle frames on Windows WebKit. 
74
75         * WebCoreSupport/WebFrameLoaderClient.h:
76         * WebCoreSupport/WebFrameLoaderClient.mm:
77         (WebFrameLoaderClient::createFrame):
78
79 2007-10-04  Beth Dakin  <bdakin@apple.com>
80
81         Reviewed by John Sullivan.
82
83         Fix for <rdar://problem/5441823> REGRESSION (r25142, Tiger only): 
84         Vertical scroll bar not redrawn properly when going back in history 
85         (15033)
86
87         This fix if-defs r25142 to be Leopard-only since it causes 
88         correctness issues on Tiger and does not seem to have any 
89         performance impact on Tiger either.
90
91         * WebView/WebDynamicScrollBarsView.m:
92         (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]):
93         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
94
95 2007-10-04  Mark Rowe  <mrowe@apple.com>
96
97         Reviewed by Oliver.
98
99         Switch to default level of debugging symbols to resolve <rdar://problem/5488678>.
100         The "full" level appears to offer no observable benefits even though the documentation
101         suggests it be used for dead code stripping.  This should also decrease link times.
102
103         * Configurations/Base.xcconfig:
104
105 2007-10-04  Adele Peterson  <adele@apple.com>
106
107         Reviewed by Darin.
108
109         WebKit part of fix for <rdar://problem/5369017> REGRESSION: Can't tab to webview that doesn't have editable content
110
111         * WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Pass in the FocusDirection.
112
113 2007-10-04  Darin Adler  <darin@apple.com>
114
115         * WebView/WebHTMLView.mm: (-[WebHTMLView _updateActiveState]):
116         Removed a bogus comment.
117
118 2007-10-02  Kevin Decker  <kdecker@apple.com>
119
120         Reviewed by Mark Rowe.
121
122         Re-added _minimumRequiredSafariBuildNumber. It turns out older version of Safari still rely
123         on this method, so we need to keep it around at least until the next major Safari release.
124
125         * StringsNotToBeLocalized.txt:
126         * WebView/WebView.mm:
127         (+[WebView _minimumRequiredSafariBuildNumber]):
128         * WebView/WebViewPrivate.h:
129
130 2007-10-02  Kevin Decker  <kdecker@apple.com>
131
132         Reviewed by John Sullivan.
133
134         <rdar://problem/5517710> 
135
136         * WebView/WebView.mm: Removed -[WebView _minimumRequiredSafariBuildNumber] because newer
137          versions of Safari no longer use this method. This won't break existing Safaris because
138          they always use a respondsToSelector check before calling this.
139          
140         * WebView/WebViewPrivate.h: Ditto. 
141
142 2007-09-27  John Sullivan  <sullivan@apple.com>
143
144         Reviewed by Ollie
145         
146         - fixed <rdar://problem/5408186> REGRESSION (5522-5523.9): Safari leaks every browser window
147         
148         The leak started occurring when we removed the code to clear the delegates and the host window
149         from Safari as part of the fix for 5479443. But it turns out that Safari code was masking a
150         bug here in WebView: setHostWindow:nil needs to be called before setting _private->closed to
151         YES, or it will do nothing at all, causing a world leak due to a circular reference between
152         the window and the WebView.
153         
154         I toyed with a more complex fix, but this is the simplest one that retains the fix for 5479443
155         while otherwise restoring the code order to be as close as possible to what it was before
156         5479443 was fixed.
157
158         * WebView/WebView.mm:
159         (-[WebView _close]):
160         Moved the call that sets _private->closed to YES to be after the code that clears the delegates
161         and the host window. Added a comment about this order.
162
163 2007-09-27  Kevin Decker  <kdecker@apple.com>
164
165         Rubber stamped by Darin.
166
167         <rdar://problem/5493093>
168
169         * WebKit.order: Added.
170         * WebKit.xcodeproj/project.pbxproj:  We're changing from using an order file built by
171          another team to using one we actually check into our project repository. Linker settings for
172          Symbol Ordering Flags have been updated accordingly.
173
174 2007-09-26  Geoffrey Garen  <ggaren@apple.com>
175
176         Reviewed by Adele Peterson.
177         
178         Fixed <rdar://problem/5507476> Promote cache model SPI to API
179         
180         Promoted cache model SPI to API. This was just a move, with some small 
181         edits to the documentation (changing 'application' to 'WebView' in 
182         some cases, since the interface is now per-WebView).
183
184         * WebView/WebPreferences.h:
185         * WebView/WebPreferences.m:
186         (-[WebPreferences setCacheModel:]):
187         (-[WebPreferences cacheModel]):
188         * WebView/WebPreferencesPrivate.h:
189
190 2007-09-24  Timothy Hatcher  <timothy@apple.com>
191
192         Reviewed by Darin.
193
194         <rdar://problem/5498016> Photoshop CS3: Adobe Help Viewer 1.1 crashes in 9A553
195
196         WebKit started calling the mouseDidMoveOverElement delegate method with a nil dictionary in r14982.
197         We originally intended to call this delegate method sometimes with a nil dictionary, but due to
198         a bug dating back to WebKit 1.0 this delegate was never called with nil! Unfortunately we can't
199         start calling this with nil since it will break Adobe Help Viewer, and possibly other clients.
200
201         * WebView/WebView.mm:
202         (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
203
204 2007-09-21  Kevin Decker  <kdecker@apple.com>
205
206         * Plugins/WebBaseNetscapePluginView.mm: Build fix. 
207         The first argument of aglChoosePixelFormat() has changed from const AGLDevice *gdevs on Tiger to
208         const void *gdevs on Leopard.
209
210 2007-09-20  Kevin Decker  <kdecker@apple.com>
211
212         Reviewed by Darin Adler.
213
214         <rdar://problem/5493093>
215
216         Reduced launch time by lazily linking both the AGL and OpenGL frameworks until they are really needed.
217
218         * Plugins/WebBaseNetscapePluginView.mm: Soft link all AGL and OpenGL functions used by
219         WebBaseNetscapePluginView.
220
221         * WebKit.xcodeproj/project.pbxproj: Removed AGL and OpenGL from the project.
222
223 2007-09-20  John Sullivan  <sullivan@apple.com>
224
225         Build fix for stoooopid old PPC gcc compiler
226
227         * WebCoreSupport/WebEditorClient.mm:
228         (WebEditorClient::checkSpellingOfString):
229         replace perfectly valid ?: syntax with if/else
230
231 2007-09-19  John Sullivan  <sullivan@apple.com>
232
233         Reviewed by Darin Adler.
234
235         - WebKit part of speculative fix for <rdar://problem/5490627>, about crashes constructing a
236           String using the values filled in by checkSpellingOfString()
237
238         * WebCoreSupport/WebEditorClient.mm:
239         (WebEditorClient::checkSpellingOfString):
240         convert NSNotFound to -1, since WebCore code expects -1 for this purpose. We already do this
241         in checkGrammarOfString.
242
243 2007-09-19  Kevin Decker  <kdecker@apple.com>
244
245         Reviewed by Darin Adler.
246
247         <rdar://problem/5491066> soft link Accelerate.framework
248         
249         * Misc/WebGraphicsExtras.c:
250         (WebConvertBGRAToARGB): Improve launch time performance and reduce vsize
251         footprint by soft linking the Accelerate.framework.
252         * WebKit.xcodeproj/project.pbxproj: Remove no longer needed frameworks.
253
254 2007-09-18  Geoffrey Garen  <ggaren@apple.com>
255
256         Reviewed by Darin Adler.
257         
258         Fixed <rdar://problem/5490204> In some cases, WebKit can make the 
259         Foundation disk cache way too big or way too small
260         
261         Use the actual location of the foundation disk cache, rather than 
262         the user's home directory, when determining how big to make it.
263
264         * WebView/WebView.mm:
265         (+[WebView _setCacheModel:]):
266
267 2007-09-17  Geoffrey Garen  <ggaren@apple.com>
268
269         Reviewed by Darin Adler.
270
271         Fixed a hang due to an infinite script running in the window's unload 
272         event handler, which may be the cause of <rdar://problem/5479443> 
273         REGRESSION: Hang due to infinite JS recursion on close @ engadget.com 
274         (onunload-based ad)
275
276         * WebView/WebUIDelegatePrivate.h: Added FIXME.
277         
278         * WebView/WebView.h: Clarified headerdoc ambiguity about when delegate 
279         methods stop firing.
280
281         * WebView/WebView.mm:
282         (-[WebView _close]): The fix: don't nil out our delegates until after
283         detaching the FrameLoader, because the act of detaching the FrameLoader
284         might fire important delegate methods, like webViewShouldInterruptJavaScript:.
285         Don't do other tear-down either, because the unload event handler needs 
286         to run in a fully constructed page.
287         
288         This change is fairly low risk because niling out our delegates is a 
289         very recent, never-shipped feature in WebKit, so it's unlikely that any 
290         apps rely on it in a crazy way.
291
292 2007-09-15  Darin Adler  <darin@apple.com>
293
294         Reviewed by John Sullivan.
295
296         - fix <rdar://problem/5391540> REGRESSION: Can't drag images from Safari to applications
297           in the dock (Tiger Preview, others in Leopard)
298
299         * Misc/WebNSPasteboardExtras.mm:
300         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
301         Re-implement code here that has been missing for the last couple of years since we
302         did some image refactoring. Was pretty easy now that we can freely call C++ code
303         in WebKit.
304
305 2007-09-14  Mark Rowe  <mrowe@apple.com>
306
307         Build fix for Tiger.
308
309         * WebView/WebArchive.m:
310         (-[WebArchive initWithCoder:]): Use @catch(id) rather than @catch(...).
311         * WebView/WebPreferences.m:
312         (-[WebPreferences initWithCoder:]): Ditto.
313         * WebView/WebResource.mm:
314         (-[WebResource initWithCoder:]): Ditto.
315         (-[WebResource _initWithPropertyList:]): Ditto.
316
317 2007-09-14  Darin Adler  <darin@apple.com>
318
319         Reviewed by Geoff Garen and Tim Hatcher.
320
321         - fixed <rdar://problem/5482745> initFromCoder: and initWithPropertyList: functions
322           should guard against incorrect types
323
324         * WebView/WebArchive.m:
325         (isArrayOfClass): Added helper function.
326         (-[WebArchive _initWithPropertyList:]): Tweaked function to remove the need for a
327         type cast.
328         (-[WebArchive initWithCoder:]): Added type checking for the main resource,
329         subresources array, and subframe archives array. Also replaced NS_DURING with @try.
330         * WebView/WebPreferences.m: (-[WebPreferences initWithCoder:]): Added type checking
331         for the identifier and the values dictionary, including ensuring that it's a mutable
332         dictionary.
333         * WebView/WebResource.mm:
334         (-[WebResource initWithCoder:]): Added type checking for all the fields.
335         (-[WebResource _initWithPropertyList:]): Added type checking for the NSURLResponse.
336
337         * WebKit.exp: Removed accidentally exported internal symbol; I checked and it's not
338         used anywhere.
339
340 2007-09-13  Darin Adler  <darin@apple.com>
341
342         Reviewed by Oliver.
343
344         - fix <rdar://problem/5470457> REGRESSION: Input method inline hole is mishandled in text
345           <input> elements with maxlength limit
346
347         * WebView/WebHTMLView.mm:
348         (-[WebHTMLView _selectionChanged]): Tweaked code a bit.
349         (-[WebHTMLView markedRange]): Simplified logic, since markedTextNSRange works when there's
350         no composition range.
351         (-[WebHTMLView hasMarkedText]): Call directly to Editor instead of bridge.
352         (-[WebHTMLView unmarkText]): Call new confirmComposition to make it clear that this is
353         confirming text, not just unmarking it to discard it.
354         (extractUnderlines): Added. Converts directly from an NSAttributedString to the
355         CompositionUnderline vector that's used by WebCore.
356         (-[WebHTMLView setMarkedText:selectedRange:]): Changed to use the new setComposition.
357         (-[WebHTMLView insertText:]): Changed to use confirmComposition when appropriate, instead
358         of relying on special behavior of Editor::insertText.
359         (-[WebHTMLView _updateSelectionForInputManager]): Rewrote to use getCompositionSelection
360         and confirmCompositionWithoutDisturbingSelection.
361
362         * WebCoreSupport/WebEditorClient.h:
363         * WebCoreSupport/WebEditorClient.mm:
364         Removed obsolete markedTextAbandoned function.
365  
366 2007-09-12  David Kilzer  <ddkilzer@apple.com>
367
368         Rubber-stamped by Darin and reviewed by Adam.
369
370         Removed import of unused icon database headers.
371
372         * WebCoreSupport/WebFrameBridge.mm:
373
374 2007-09-11  Timothy Hatcher  <timothy@apple.com>
375
376         Reviewed by Darin.
377
378         Remove the unused class_getMethodImplementation function.
379
380         * Misc/WebNSObjectExtras.h:
381
382 2007-09-11  Geoffrey Garen  <ggaren@apple.com>
383
384         Reviewed by Oliver Hunt.
385         
386         Fixed CFNetwork version check so it actually works.
387
388         * Misc/WebKitVersionChecks.h:
389         * WebView/WebView.mm:
390         (+[WebView _setCacheModel:]): Don't use NSVersionOfLinkTimeLibrary because
391         we don't link against CFNetwork directly, so it returns -1. Also, use
392         the proper hex encoding instead of decimal numbers.
393
394 2007-09-11  Darin Adler  <darin@apple.com>
395
396         - redo fix for <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
397
398         * WebView/WebView.mm:
399         (getMethod): Added.
400         (-[WebView _cacheResourceLoadDelegateImplementations]): Use getMethod.
401         (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
402
403 2007-09-11  Darin Adler  <darin@apple.com>
404
405         Rubber-stamped by Dave Harrison.
406
407         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
408         Removed wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
409
410 2007-09-11  Darin Adler  <darin@apple.com>
411
412         Reviewed by Mark Rowe.
413
414         - fix <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
415
416         * Misc/WebNSObjectExtras.h:
417         (class_getMethodImplementation): Added.
418         (method_setImplementation): Added.
419
420         * WebView/WebHTMLView.mm: (+[WebHTMLViewPrivate initialize]):
421         * Carbon/HIViewAdapter.m: (+[HIViewAdapter bindHIViewToNSView:nsView:]):
422         Remove old-ObjC code path, since WebNSObjectExtras.h now implements everything we need.
423
424         * WebView/WebView.mm:
425         (-[WebView _cacheResourceLoadDelegateImplementations]): Don't bother doing a separate
426         respondsToSelector call, since class_getMethodImplementation will return 0 for selectors
427         that we don't respond to. The bug fix is to actually set the cached pointer to 0.
428         Also get rid of the unnecessary use of a macro; instead use the functions from
429         WebNSObjectExtras.h on Tiger and the appropriate function directly on Leopard.
430         (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
431
432 2007-09-11  Darin Adler  <darin@apple.com>
433
434         Reviewed by Sam, Ollie.
435
436         * WebView/WebView.mm: (+[WebView _setCacheModel:]): A slightly cleaner 64-bit
437         fix for the NSURLCache capacity code in this file.
438
439 2007-09-11  Darin Adler  <darin@apple.com>
440
441         Rubber-stamped by Mark Rowe.
442
443         * Misc/WebNSPasteboardExtras.mm: Fix incorrect strings in my last check-in.
444         The strings I checked in were wrong and were breaking layout tests too.
445         These new ones match what WebKitSystemInterface was returning.
446
447 2007-09-10  Geoffrey Garen  <ggaren@apple.com>
448
449         Fixed 64-bit build (I think).
450
451         * WebView/WebView.mm:
452         (max): Added. In 64-bit land, -diskCapacity magically starts returning
453         unsigned long instead of unsigned, so we define a custom max() that's
454         willing to compare unsigned to unsigned long.
455
456 2007-09-10  Darin Adler  <darin@apple.com>
457
458         Reviewed by Tim Hatcher.
459
460         - <rdar://problem/5471082> Removing WebURLPboardType from headers broke SPI-using applications
461
462         Rolled out my fix for bug 4582212 and fixed it in a much simpler way.
463
464         * Misc/WebNSPasteboardExtras.h:
465         * Misc/WebNSPasteboardExtras.mm:
466         * WebCoreSupport/WebPasteboardHelper.mm:
467         * WebKit.exp:
468         * WebView/WebHTMLView.mm:
469         * WebView/WebView.mm:
470         Rolled out the new PasteboardType functions and changed the PboardType globals to be initialized
471         with constant values.
472
473 2007-09-10  Timothy Hatcher  <timothy@apple.com>
474
475         Reviewed by Darin.
476
477         Always animate when calling _scrollTo.
478
479         * WebView/WebFrameView.mm:
480         (-[WebFrameView _scrollVerticallyBy:]):
481         (-[WebFrameView _scrollHorizontallyBy:]):
482
483 2007-09-08  Brady Eidson  <beidson@apple.com>
484
485         Reviewed by Darin
486
487         <rdar://problem/5434431> - Asynchronous Icon Database
488
489         WebKit side of things
490         Mainly, there are Notifications WebKit has to listen for now that tell it when to either call back into WebCore
491         for some purpose or to send the webView:didReceiveIcon: delegate call
492
493         Many smaller tweaks as well.
494
495         * Misc/WebIconDatabase.h:
496         * Misc/WebIconDatabase.mm:
497         (defaultClient):
498         (-[WebIconDatabase init]):
499         (+[WebIconDatabase delayDatabaseCleanup]): Accessor so clients can prevent the thread from cleaning up the database
500           before they've done all their necessary retaining of icons.
501         (+[WebIconDatabase allowDatabaseCleanup]):
502         (-[WebIconDatabase removeAllIcons]):
503         (-[WebIconDatabase _isEnabled]):
504         (-[WebIconDatabase _sendNotificationForURL:]):
505         (-[WebIconDatabase _sendDidRemoveAllIconsNotification]):
506         (-[WebIconDatabase _databaseDirectory]):
507
508         (-[ThreadEnabler threadEnablingSelector:]): Quick and dirty class to enabled Cocoa multithreading
509         (+[ThreadEnabler enableThreading]):
510         (importToWebCoreFormat):
511         * Misc/WebIconDatabaseInternal.h: Expose the internal methods of WebIconDatabase that are required by WebIconDatabaseClient
512
513         * Misc/WebNSNotificationCenterExtras.h: Added. - Great utility class whose design was borrowed from Colloquy
514           that allows the posting of a Cocoa notification on the main thread from *any* thread
515         * Misc/WebNSNotificationCenterExtras.m: Added.
516         (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:]):
517         (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:]):
518         (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]):
519         (+[NSNotificationCenter _postNotificationName:]):
520
521         * WebCoreSupport/WebFrameLoaderClient.h:
522         * WebCoreSupport/WebFrameLoaderClient.mm:
523         (WebFrameLoaderClient::dispatchDidReceiveIcon): Send the webView:didReceiveIcon: delegate call
524         (WebFrameLoaderClient::registerForIconNotification):
525
526         * WebCoreSupport/WebIconDatabaseClient.h: Added.
527         * WebCoreSupport/WebIconDatabaseClient.mm: Added.
528         (WebIconDatabaseClient::performImport):  Perform the Safari 2 icon import
529         (WebIconDatabaseClient::dispatchDidRemoveAllIcons): Send the NSNotification
530         (WebIconDatabaseClient::dispatchDidAddIconForPageURL): Ditto
531
532         * WebView/WebView.mm:
533         (-[WebView _receivedIconChangedNotification:]): Check and see if this notification is for this WebView's current URL by
534           calling back into the IconDatabase
535         (-[WebView _registerForIconNotification:]): Support for WebIconDatabaseClient
536         (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Dispatch this delegate call as well as unregister for the notification
537         * WebView/WebViewInternal.h:
538
539         * WebKit.xcodeproj/project.pbxproj:
540
541 2007-09-07  Geoffrey Garen  <ggaren@apple.com>
542
543         Suggested by Maciej Stachowiak.
544         
545         Added wKiosk Browser to the browser list. Pretty sweet app.
546
547         * WebView/WebPreferences.m:
548         (cacheModelForMainBundle):
549
550 2007-09-07  Geoffrey Garen  <ggaren@apple.com>
551
552         Build fix.
553
554         * WebView/WebView.mm:
555         (+[WebView _setCacheModel:]):
556
557 2007-09-05  Geoffrey Garen  <ggaren@apple.com>
558
559         Reviewed by Darin Adler, Maciej Stachowiak, Mark Rowe, Tim Hatcher.
560         
561         Fixed <rdar://problem/5326009> Make non-browser WebKit clients have no 
562         memory cache, or a very tiny one
563         
564         High level explanation:
565             - Added SPI for specifying a cache model on a per-WebView basis. 
566             (Hopefully, this will become API soon.) We balance competing
567             cache models simply by using the largest one that pertains at a
568             given time.
569
570             - Added heuristic for guessing a default cache model in WebViews
571             that don't specify one:
572                 1) Default to DocumentViewer for apps linked on or after this
573                 WebKit. Default to DocumentBrowser otherwise.
574
575                 2) Assign specific defaults to well-known clients based on 
576                 bundle ID.
577
578                 3) Grow the default to DocumentBrowser if a navigation takes 
579                 place.
580
581             - As a part of the DocumentBrowser & PrimaryWebBrowser settings:
582                 1) Make the Foundation disk cache much much bigger than the 
583                 default 20MB, if space allows. (This is a hedge against a small 
584                 WebCore cache in DocumentBrowser mode, but also an all-around 
585                 win for page load speed.)
586
587                 2) Scaled the Foundation memory cache's capacity with physical
588                 RAM, just like we do with other caches. This is a small win on
589                 low memory systems.
590
591         * Misc/WebKitSystemBits.h:
592         * Misc/WebKitSystemBits.m:
593         (WebMemorySize): Renamed from "WebSystemMainMemory."
594         (WebHomeDirectoryFreeSize): Added function to measure the free space
595         on the user's home directory. We use this as a factor in determining 
596         the disk cache's cacpacity.
597
598         * Misc/WebKitVersionChecks.h: Support for linked on or after check.
599         
600         * WebCoreSupport/WebFrameLoaderClient.h:
601         * WebCoreSupport/WebFrameLoaderClient.mm:
602         (WebFrameLoaderClient::didPerformFirstNavigation): Implementation of
603         heuristic rule #3.
604
605         * WebView/WebPreferenceKeysPrivate.h:
606         * WebView/WebPreferences.m:
607         (cacheModelForMainBundle): Implementation of heuristic rule #2.
608         (-[NSMutableDictionary _web_checkLastReferenceForIdentifier:]): Added
609         notification for when a WebPreferences instance becomes inert. We use
610         this to shrink the cache model back down if possible. Moved this code
611         into a WebPreferences method, since it's not really a feature of 
612         NSDictionary.
613
614         * WebView/WebPreferencesPrivate.h: SPI declarations.
615         
616         * WebView/WebView.mm: Replaced manual notification posts with calls to
617         the _postPreferencesChangesNotification convenience method.
618
619         (-[WebView _preferencesChangedNotification:]): Merged dispersed code
620         for updating preferences-related settings into this one function. This
621         was needed for an earlier version of the patch, even though the 
622         current version could probably do without it.
623
624         (+[WebView _preferencesChangedNotification:]): Added a class-level 
625         listener for WebPreferences changes. This listener takes care of 
626         modifying the class-level global cache model setting if necessary.
627
628         (+[WebPreferences standardPreferences]): Removed call to 
629         _postPreferencesChangesNotification because the notification already 
630         posts when you create the WebPreferences object. (I noticed this 
631         inefficiency because my new _preferencesChangedNotification: method was
632         called excessively at startup.)
633
634         Also Added explicit tracking of WebPreferences clients, so we know when
635         a WebPreferences instance becomes inert:
636         
637         (-[WebPreferences didRemoveFromWebView]):
638         (-[WebPreferences willAddToWebView]):
639
640         (+[WebView _setCacheModel:]): Translates a cache model into actual 
641         settings in various APIs. Caches that have unbounded value grow 
642         linearly relative to available space. Caches that have bounded value 
643         grow inverse-squaredly relative to available space.
644
645 2007-09-05  Timothy Hatcher  <timothy@apple.com>
646
647         Reviewed by Darin.
648
649         <rdar://problem/5443883> Uncaught Objective-C exceptions in WebKit clients lead to hard-to-diagnose crashes
650
651         Changed all the direct delegate calls to use helper functions that have direct access to
652         WebView's delegate objects. These helper methods will catch any ObjC exceptions and call
653         ReportDiscardedDelegateException to log the discarded exception. WebView's that have
654         catchesDelegateExceptions set to NO will not pay the cost of a @try/@catch. The delegate
655         forwarders also have the same behavior.
656
657         * Misc/WebKitLogging.h:
658         * Misc/WebKitLogging.m:
659         (ReportDiscardedDelegateException):
660         * Plugins/WebBaseNetscapePluginView.mm:
661         (-[WebBaseNetscapePluginView loadPluginRequest:]):
662         * Plugins/WebNullPluginView.mm:
663         (-[WebNullPluginView viewDidMoveToWindow]):
664         * WebCoreSupport/WebChromeClient.mm:
665         (WebChromeClient::createWindow):
666         (WebChromeClient::createModalDialog):
667         (WebChromeClient::runModal):
668         (WebChromeClient::toolbarsVisible):
669         (WebChromeClient::statusbarVisible):
670         (WebChromeClient::addMessageToConsole):
671         (WebChromeClient::canRunBeforeUnloadConfirmPanel):
672         (WebChromeClient::runBeforeUnloadConfirmPanel):
673         (WebChromeClient::runJavaScriptAlert):
674         (WebChromeClient::runJavaScriptConfirm):
675         (WebChromeClient::runJavaScriptPrompt):
676         (WebChromeClient::shouldInterruptJavaScript):
677         (WebChromeClient::setStatusbarText):
678         (WebChromeClient::print):
679         * WebCoreSupport/WebContextMenuClient.mm:
680         (WebContextMenuClient::getCustomMenuFromDefaultItems):
681         (WebContextMenuClient::contextMenuItemSelected):
682         * WebCoreSupport/WebDragClient.mm:
683         (WebDragClient::startDrag):
684         * WebCoreSupport/WebEditorClient.mm:
685         (WebEditorClient::textFieldDidBeginEditing):
686         (WebEditorClient::textFieldDidEndEditing):
687         (WebEditorClient::textDidChangeInTextField):
688         (WebEditorClient::doTextFieldCommandFromEvent):
689         (WebEditorClient::textWillBeDeletedInTextField):
690         (WebEditorClient::textDidChangeInTextArea):
691         * WebCoreSupport/WebFrameBridge.mm:
692         (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
693         * WebCoreSupport/WebFrameLoaderClient.mm:
694         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
695         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
696         (WebFrameLoaderClient::dispatchWillSendRequest):
697         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
698         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
699         (WebFrameLoaderClient::dispatchDidReceiveResponse):
700         (WebFrameLoaderClient::willCacheResponse):
701         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
702         (WebFrameLoaderClient::dispatchDidFinishLoading):
703         (WebFrameLoaderClient::dispatchDidFailLoading):
704         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
705         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
706         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
707         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
708         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
709         (WebFrameLoaderClient::dispatchWillClose):
710         (WebFrameLoaderClient::dispatchDidReceiveIcon):
711         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
712         (WebFrameLoaderClient::dispatchDidReceiveTitle):
713         (WebFrameLoaderClient::dispatchDidCommitLoad):
714         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
715         (WebFrameLoaderClient::dispatchDidFailLoad):
716         (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
717         (WebFrameLoaderClient::dispatchDidFinishLoad):
718         (WebFrameLoaderClient::dispatchDidFirstLayout):
719         (WebFrameLoaderClient::dispatchCreatePage):
720         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
721         (WebFrameLoaderClient::dispatchWillSubmitForm):
722         (WebFrameLoaderClient::dispatchDidLoadMainResource):
723         * WebView/WebHTMLView.mm:
724         (-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]):
725         (-[WebHTMLView validateUserInterfaceItem:]):
726         * WebView/WebPDFView.mm:
727         (-[WebPDFView validateUserInterfaceItem:]):
728         (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
729         * WebView/WebView.mm:
730         (-[WebView _openNewWindowWithRequest:]):
731         (-[WebView _menuForElement:defaultItems:]):
732         (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
733         (-[WebView _cacheResourceLoadDelegateImplementations]):
734         (-[WebView _cacheFrameLoadDelegateImplementations]):
735         (-[WebView _policyDelegateForwarder]):
736         (-[WebView _UIDelegateForwarder]):
737         (-[WebView _editingDelegateForwarder]):
738         (-[WebView _scriptDebugDelegateForwarder]):
739         (-[WebView _setCatchesDelegateExceptions:]):
740         (-[WebView _catchesDelegateExceptions]):
741         (-[_WebSafeForwarder initWithTarget:defaultTarget:]):
742         (-[_WebSafeForwarder forwardInvocation:]):
743         (-[_WebSafeForwarder methodSignatureForSelector:]):
744         (-[WebView _commonInitializationWithFrameName:groupName:]):
745         (-[WebView validateUserInterfaceItem:]):
746         (-[WebView _headerHeight]):
747         (-[WebView _footerHeight]):
748         (-[WebView _drawHeaderInRect:]):
749         (-[WebView _drawFooterInRect:]):
750         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
751         (CallDelegate):
752         (CallDelegateReturningFloat):
753         (CallDelegateReturningBoolean):
754         (CallUIDelegate):
755         (CallUIDelegateReturningFloat):
756         (CallUIDelegateReturningBoolean):
757         (CallFrameLoadDelegate):
758         (CallResourceLoadDelegate):
759         (CallFormDelegate):
760         (CallFormDelegateReturningBoolean):
761         * WebView/WebViewInternal.h:
762         * WebView/WebViewPrivate.h:
763
764 2007-09-04  Timothy Hatcher  <timothy@apple.com>
765
766         Reviewed by Darin.
767
768         <rdar://problem/5452908> NIBs saved in the Pre-10.2 format while Safari 3 installed do not work without Safari 3
769
770         This happened because we encoded a new field that the old WebKit does not know how to read.
771         And NSCoder throws an exception if initWithCoder finishes while there is still unread data in the archive.
772
773         The WebViewVersion is now 4 to distinguish that we do not encode/decode allowsUndo.
774
775         * WebView/WebView.mm:
776         (-[WebView initWithCoder:]): Only try to read allowsUndo if the version is 3.
777         (-[WebView encodeWithCoder:]): No longer encode allowsUndo.
778
779 2007-09-04  David Hyatt  <hyatt@apple.com>
780
781         Fix for <rdar://problem/5271213>, resizing iChat window is slower than in
782         Tiger.  This patch implements a fast scaling mode that can be used by
783         WebViews, e.g., during window resizing.
784
785         Reviewed by John Sullivan
786
787         * WebView/WebView.mm:
788         (-[WebView _setUseFastImageScalingMode:]):
789         (-[WebView _inFastImageScalingMode]):
790         * WebView/WebViewPrivate.h:
791
792 2007-09-04  Darin Adler  <darin@apple.com>
793
794         Reviewed by Hyatt.
795
796         * WebView/WebView.mm:
797         (-[WebView _loadBackForwardListFromOtherView:]): Added missing null check.
798         (-[WebView _setInitiatedDrag:]): Ditto.
799         (-[WebView _clearUndoRedoOperations]): Ditto.
800         (-[WebView encodeWithCoder:]): Ditto.
801         (-[WebView backForwardList]): Ditto.
802         (-[WebView setMaintainsBackForwardList:]): Ditto.
803
804 2007-09-04  Tristan O'Tierney  <tristan@apple.com>
805
806         Reviewed by John Sullivan.
807         
808         <rdar://problem/5454935> Can't reply to this message in Mail -- -[DOMRange webArchive] is throwing an exception
809
810         * WebView/WebArchiver.mm:
811         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
812         Guard the creation of WebResource by ensuring that the passed in
813         responseURL is never nil.
814
815 2007-09-03  Mark Rowe  <mrowe@apple.com>
816
817         Reviewed by Tim Hatcher.
818
819         <rdar://problem/5452164> Production build with in symbols directory has no debug info
820
821         Enable debug symbol generation on all build configurations.  Production builds are stripped
822         of symbols by Xcode during deployment post-processing.
823
824         * Configurations/Base.xcconfig:
825         * WebKit.xcodeproj/project.pbxproj:
826
827 2007-09-02  Brady Eidson  <beidson@apple.com>
828
829         Reviewed by John Sullivan and Mark Rowe
830
831         Groundwork for support for monitoring IconDatabase in-memory statistics
832  
833         * Misc/WebCoreStatistics.h:
834         * Misc/WebCoreStatistics.mm:
835         (+[WebCoreStatistics iconPageURLMappingCount]):
836         (+[WebCoreStatistics iconRetainedPageURLCount]):
837         (+[WebCoreStatistics iconRecordCount]):
838         (+[WebCoreStatistics iconsWithDataCount]):
839
840 2007-09-01  Oliver Hunt  <oliver@apple.com>
841
842         Reviewed by Sam.
843
844         <rdar://problem/5344848> IME is incorrectly used for key events when on non-editable regions
845
846         EditorClient::setInputMethodState stub
847
848         * WebCoreSupport/WebEditorClient.h:
849         * WebCoreSupport/WebEditorClient.mm:
850         (WebEditorClient::setInputMethodState):
851
852 2007-08-30  Maciej Stachowiak  <mjs@apple.com>
853
854         Reviewed by Tim.
855         
856         <rdar://problem/5439953> REGRESSION: Cannot load feeds in widgets in Dashcode due to change in WebKit delegate methods
857
858         * WebView/WebFrame.mm:
859         (-[WebFrame _attachScriptDebugger]): Don't create the debugger object if the frame has not yet
860         created its script interpreter, to avoid premature dispatch of windowScriptObjectAvailable/Cleared
861         delegate methods. The script debugger will be created in any case when the window object does appear.
862
863 2007-08-29  Darin Adler  <darin@apple.com>
864
865         Reviewed by Tim Hatcher.
866
867         - fix <rdar://problem/4582212> WebKit inappropriately adds +initialize to
868           NSPasteboard via a category, prevents AppKit initialize
869           http://bugs.webkit.org/show_bug.cgi?id=9417
870
871         * Misc/WebNSPasteboardExtras.h: Got rid of the global data objects and replaced
872         them with global functions.
873
874         * Misc/WebNSPasteboardExtras.mm:
875         (initializePasteboardTypes): Changed the initialize method to be this function.
876         (WebURLPasteboardType): Added, calls the initialize function and then returns
877         the value of the global.
878         (WebURLNamePasteboardType): Ditto.
879         (+[NSPasteboard _web_writableTypesForURL]): Changed to call the new function instead
880         of getting at the global directly.
881         (+[NSPasteboard _web_dragTypesForURL]): Ditto.
882         (-[NSPasteboard _web_writeURL:andTitle:types:]): Ditto.
883         * WebCoreSupport/WebPasteboardHelper.mm:
884         (WebPasteboardHelper::urlFromPasteboard): Ditto.
885         * WebView/WebHTMLView.mm:
886         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
887
888         * WebView/WebView.mm:
889         (+[WebView initialize]): Added a call to one of the functions to take advantage
890         of the side effect that initializes the globals; this is to help out old versions
891         of Safari.
892         (+[WebView URLTitleFromPasteboard:]): Changed to call the new function instead
893         of getting at the global directly.
894
895         * WebKit.exp: Add exports of the new functions.
896
897 2007-08-29  Adele Peterson  <adele@apple.com>
898
899         Reviewed by Darin.
900
901         Fix for http://bugs.webkit.org/show_bug.cgi?id=15098
902         <rdar://problem/5440319> REGRESSION (9A530-9A534): Double scroll bar on pdfs
903
904         * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::makeDocumentView):
905          Don't suppress scrollbars before the view creation if we're making the view for a non-html view
906
907         * WebView/WebFrameViewInternal.h: Make _scrollView return a WebDynamicScrollBarsView since so many clients were relying on it being that type anyway.
908         * WebView/WebFrameView.mm:
909         (-[WebFrameView _setDocumentView:]):
910         (-[WebFrameView _scrollView]):
911         (-[WebFrameView setAllowsScrolling:]):
912         (-[WebFrameView allowsScrolling]):
913         * WebView/WebView.mm:
914         (-[WebView setAlwaysShowVerticalScroller:]):
915         (-[WebView alwaysShowVerticalScroller]):
916         (-[WebView setAlwaysShowHorizontalScroller:]):
917         (-[WebView alwaysShowHorizontalScroller]):
918
919 2007-08-29  David Hyatt  <hyatt@apple.com>
920
921         The method that was swizzled to fix 5441281 does not exist on Tiger.
922         Tiger has to do a double swizzle instead (of resetCursorRects and NSCursor's
923         set method) in order to roughly achieve the same effect.
924
925         Reviewed by darin
926
927         * WebView/WebHTMLView.mm:
928         (resetCursorRects):
929         (setCursor):
930         (+[WebHTMLViewPrivate initialize]):
931
932 2007-08-29  Anders Carlsson  <andersca@apple.com>
933
934         Fix 64-bit build.
935         
936         * WebCoreSupport/WebFrameBridge.mm:
937
938 2007-08-29  David Hyatt  <hyatt@apple.com>
939
940         Fix for 5441281, remove our dependency on cursor rects and drag margins
941         in AppKit for a large performance boost on the PLT and iBench.
942
943         Reviewed by darin
944
945         * Plugins/WebBaseNetscapePluginView.h:
946         * Plugins/WebBaseNetscapePluginView.mm:
947         (-[WebBaseNetscapePluginView sendNullEvent]):
948         (-[WebBaseNetscapePluginView mouseEntered:]):
949         (-[WebBaseNetscapePluginView mouseExited:]):
950         (-[WebBaseNetscapePluginView stop]):
951         Clean up cursor setting from Netscape plugins.  Don't unconditionally mutate
952         the cursor when a plugin stops.
953
954         * WebView/WebFrameView.mm:
955         (-[WebFrameView _setDocumentView:]):
956         Suppress the resetting of drag margins while the new document view is being
957         added to the view hierarchy.
958
959         * WebView/WebHTMLView.mm:
960         (-[NSWindow _web_borderView]):
961         Expose the border view of the NSWindow so that it can be hit tested.
962
963         (setCursorForMouseLocation):
964         Apply a method swizzle to override the private AppKit method, _setCursorForMouseLocation.
965         We have to do this to suppress the cursor rect invalidation handling from resetting
966         the cursor for no reason.
967
968         The swizzle will do a hit test and allow the cursor set to occur if the mouse ends up
969         being over a plugin or over a view other than a WebHTMLView.
970
971         (+[WebHTMLViewPrivate initialize]):
972         The swizzle for setCursorForMouseLocation is set up here.
973
974         (-[WebHTMLView _frameOrBoundsChanged]):
975         Add a 100ms delay to the fake mouse moved event that fires when the view moves
976         under the mouse (without the mouse moving).  This happens on iBench when the
977         pages get scrolled.  By adding a delay we ensure that even with the mouse inside
978         the window, we don't experience cursor thrashing when pages are updating and
979         scrolling rapidly.
980
981 2007-08-28  Anders Carlsson  <andersca@apple.com>
982
983         Reviewed by Darin.
984
985         <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent
986         
987         * WebCoreSupport/WebFrameBridge.mm:
988         Use the enum from FrameLoaderTypes.h.
989         
990         * WebCoreSupport/WebFrameLoaderClient.mm:
991         (WebFrameLoaderClient::objectContentType):
992         Return ObjectContentNetscapePlugin and ObjectContentOtherPlugin depending on the plug-in type.
993
994 2007-08-28  Mark Rowe  <mrowe@apple.com>
995
996         Reviewed by Maciej Stachowiak.
997
998         Fix fallout from the fix for <rdar://problem/5437983> (Loading history containing 100,000 entries adds 20s to Safari's startup)
999         in r25275.  The array of entries for each day was being maintained in the reverse of the order that was expected.
1000
1001         * History/WebHistory.mm:
1002         (-[WebHistoryPrivate insertItem:forDateKey:]): Maintain the array of entries in descending order.
1003
1004 2007-08-28  Mark Rowe  <mrowe@apple.com>
1005
1006         Fix the buildbot build.
1007
1008         * History/WebHistory.mm:
1009         (timeIntervalForBeginningOfDay):  Explicitly cast to silence compiler warning.
1010
1011 2007-08-28  Mark Rowe  <mrowe@apple.com>
1012
1013         Reviewed by Darin Adler.
1014
1015         <rdar://problem/5437983> Loading history containing 100,000 entries adds 20s to Safari's startup
1016
1017         Move WebHistoryItemPrivate from using a sorted array of NSCalendarDate's that map to a sorted array of arrays
1018         of WebHistoryItem's over to using a HashMap of NSTimeIntervals and arrays of WebHistoryItems.  NSTimeInterval
1019         uses less memory and is substantially cheaper during comparisons than NSCalendarDate.  The use of the HashMap
1020         avoids the needs to repeatedly search within an array to locate the array that corresponds to the given days
1021         history items.
1022
1023         The result of these changes is that loading 100,000 history items drops from around 25s to 1.6s.  Loading
1024         100 items drops from 0.003s to 0.002s.
1025
1026         * History/WebHistory.mm:
1027         (-[WebHistoryPrivate init]):
1028         (-[WebHistoryPrivate dealloc]):
1029         (timeIntervalForBeginningOfDay): Return the NSTimeInterval representing the beginning of the specified day.
1030         (-[WebHistoryPrivate findKey:forDay:]):
1031         (-[WebHistoryPrivate insertItem:forDateKey:]): Perform a binary search within the day's history items rather than a linear search.
1032         (-[WebHistoryPrivate _removeItemFromDateCaches:]):
1033         (-[WebHistoryPrivate _addItemToDateCaches:]):
1034         (-[WebHistoryPrivate removeAllItems]):
1035         (-[WebHistoryPrivate orderedLastVisitedDays]): Generate and cache the sorted NSArray of NSCalendarDate's exposed in the API.
1036         This cache is invalidated by _removeItemFromDateCaches: and _addItemToDateCaches: when needed.
1037         (-[WebHistoryPrivate orderedItemsLastVisitedOnDay:]):
1038         (-[WebHistoryPrivate arrayRepresentation]):
1039         (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): Use an autorelease pool to keep the
1040         number of live autoreleased objects generated to a reasonable level.
1041         * History/WebHistoryItem.mm:
1042         (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
1043         (-[WebHistoryItem initFromDictionaryRepresentation:]): Use the new HistoryItem constructor that accepts the alternate title
1044         rather than setting it after construction.  This prevents a modification notification from being sent for each WebHistoryItem that is loaded.
1045         * History/WebHistoryItemInternal.h:
1046         * History/WebHistoryPrivate.h:
1047         * Misc/WebNSCalendarDateExtras.h: Removed as _webkit_compareDay: is no longer used.
1048         * Misc/WebNSCalendarDateExtras.m: Removed.
1049         * WebKit.xcodeproj/project.pbxproj:
1050
1051 2007-08-28  Anders Carlsson  <andersca@apple.com>
1052
1053         Reviewed by Darin.
1054
1055         <rdar://problem/5298296> XMLHttpRequest readyState 3 & responseText buffer issues
1056         
1057         Expose WKSetNSURLRequestShouldContentSniff to WebCore.
1058         
1059         * WebCoreSupport/WebSystemInterface.m:
1060         (InitWebCoreSystemInterface):
1061
1062 2007-08-24  Kevin McCullough  <kmccullough@apple.com>
1063
1064         Reviewed by Darin.
1065
1066         <rdar://problem/5437038> 1 credential object leaked for each call to credentialWithUser:password:persistence
1067         - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
1068
1069         * Panels/WebAuthenticationPanel.m:
1070         (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
1071         (-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
1072
1073 2007-08-24  Adele Peterson  <adele@apple.com>
1074
1075         Fix by Darin, reviewed by Adele.
1076
1077         Fix for <rdar://problem/5433422> Upon quitting, WebKit loads the WebPlugin shared database and immediately closes it
1078
1079         * Plugins/WebPluginDatabase.h: Added closeSharedDatabase, which won't create a new database if we're just trying to close it.
1080         * Plugins/WebPluginDatabase.m: (+[WebPluginDatabase closeSharedDatabase]): Added.
1081         * WebView/WebView.mm:
1082         (-[WebView _close]): Call closeSharedDatabase.
1083         (+[WebView _applicationWillTerminate]): Call closeSharedDatabase.
1084
1085 2007-08-24  Timothy Hatcher  <timothy@apple.com>
1086
1087         Reviewed by John Sullivan.
1088
1089         <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1090
1091         This is a more localized fix for yesterday's change. Now explicitly call _web_layoutIfNeededRecursive inside the
1092         HIWebView Draw() function. Adds a FIXME to explain that we need to do layout before Carbon has decided what regions to draw.
1093         Doing layout in Draw() will potentially cause drawing to happen in two passes, but this has always been a problem in Carbon.
1094
1095         * Carbon/HIWebView.m:
1096         (Draw): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
1097         (SetFocusPart): Fix to work in ObjC++ (now that HIWebView.m is treated as a ObjC++ file.)
1098         * WebView/WebView.mm: Removes the 4 displayIfNeeded methods from yesterday's change.
1099         * WebKit.xcodeproj/project.pbxproj: Force the file type of HIWebView.m to ObjC++ so WebHTMLViewInternal.h can be included.
1100
1101 2007-08-23  Timothy Hatcher  <timothy@apple.com>
1102
1103         Reviewed by Dave Hyatt.
1104
1105         <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1106
1107         The Carbon HIWebView was relying on layout happening when displayIfNeededInRect: was called on the WebView.
1108         This would happen on Tiger because _recursiveDisplayRectIfNeededIgnoringOpacity: would always do a layout if needed.
1109         Doing a layout in _recursiveDisplayRectIfNeededIgnoringOpacity was removed in Leopard in favor of viewWillDraw, and
1110         the fact that adding new dirty rects inside _recursiveDisplayRectIfNeededIgnoringOpacity on Leopard will not
1111         cause a drawRect in the same display loop.
1112
1113         So any client on Leopard calling displayIfNeeded* on the WebView would get a layout and any new dirty rects. So
1114         _web_layoutIfNeededRecursive needs to be called on the main frame's WebHTMLView to make sure we layout and
1115         display anything that is really needed.
1116
1117         * WebView/WebHTMLView.mm:
1118         (-[WebHTMLView _layoutIfNeeded]):
1119         (-[WebHTMLView _web_layoutIfNeededRecursive]):
1120         * WebView/WebHTMLViewInternal.h:
1121         * WebView/WebView.mm:
1122         (-[WebView displayIfNeeded]): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
1123         (-[WebView displayIfNeededIgnoringOpacity]): Ditto.
1124         (-[WebView displayIfNeededInRect:]): Ditto. 
1125         (-[WebView displayIfNeededInRectIgnoringOpacity:]): Ditto.
1126
1127 2007-08-22  Timothy Hatcher  <timothy@apple.com>
1128
1129         Rolling out r25102 for <rdar://problem/5410937> until
1130         <rdar://problem/5429920> is resolved.
1131
1132         * Carbon/CarbonUtils.m:
1133         (WebInitForCarbon):
1134         (PoolCleaner):
1135         * Carbon/CarbonWindowAdapter.h:
1136         * Carbon/CarbonWindowAdapter.m:
1137         * Carbon/CarbonWindowContentView.h:
1138         * Carbon/CarbonWindowContentView.m:
1139         * Carbon/CarbonWindowFrame.h:
1140         * Carbon/CarbonWindowFrame.m:
1141         * Carbon/HIViewAdapter.h:
1142         * Carbon/HIViewAdapter.m:
1143         * Carbon/HIWebView.h:
1144         * Carbon/HIWebView.m:
1145
1146 2007-08-20  John Sullivan  <sullivan@apple.com>
1147
1148         Reviewed by Adam Roben
1149         
1150         WebKit part of fix for: 
1151         <rdar://problem/5417777> WebKit focus ring color no longer matches system focus rings
1152
1153         * Misc/WebNSAttributedStringExtras.mm:
1154         now includes <WebCore/ColorMac.h> to account for moved declaration
1155         * WebView/WebFrame.mm:
1156         ditto
1157         
1158         * WebView/WebViewPrivate.h:
1159         * WebView/WebView.mm:
1160         (+[WebView _setUsesTestModeFocusRingColor:]):
1161         new SPI, calls through to new WebCore function. This is used by DumpRenderTree to make sure the
1162         focus ring color is always the same when performing layout tests, regardless of OS X version.
1163         (+[WebView _usesTestModeFocusRingColor]):
1164         new SPI, calls through to new WebCore function
1165
1166 2007-08-20  Antti Koivisto  <antti@apple.com>
1167
1168         Reviewed by John.
1169         
1170         Fix <rdar://problem/5378390>
1171         Crash at Range::startContainer() when creating multiple ToDos on the same line
1172         
1173         Null check range.
1174         
1175         No layout test, this only happens with ObjC API.
1176
1177         * WebView/WebHTMLView.mm:
1178         (-[WebHTMLView _expandSelectionToGranularity:]):
1179
1180 2007-08-20  Maciej Stachowiak  <mjs@apple.com>
1181
1182         Not reviewed, fix for crash on launch bug in last patch.
1183
1184         * WebView/WebHTMLView.mm:
1185         (-[WebHTMLView setDataSource:]): Remove an assertion, fix code to work right in the
1186         face of that condition.
1187
1188 2007-08-18  Maciej Stachowiak  <mjs@apple.com>
1189
1190         Reviewed by Darin.
1191         
1192         - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)
1193
1194         There were three main cuases of extra time due to creating the initial empty document:
1195         
1196         1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
1197         2) Parsing the minimal markup for the initial document's contents.
1198         3) Clearing the Window object an extra time and dispatching the corresponding delegate method.
1199         
1200         The WebKit part of the fixes addresses 1.
1201
1202         * WebCoreSupport/WebFrameLoaderClient.mm:
1203         (WebFrameLoaderClient::makeDocumentView): When switching from the initial
1204         empty document to the first real document, reuse the WebHTMLView.
1205         
1206         It might actually be a significant performance improvement to always
1207         reuse the WebHTMLView, but that is a much riskier change and not
1208         needed to fix the regression right now.
1209
1210 2007-08-17  Maciej Stachowiak  <mjs@apple.com>
1211
1212         Reviewed by Darin.
1213
1214         - WebKit part of fix to scrollbar suppression hack for Leopard
1215
1216         * WebView/WebDynamicScrollBarsView.m:
1217         (-[WebDynamicScrollBarsView reflectScrolledClipView:]): Don't call the superclass method
1218         when scrollbars are suppressed.
1219         (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): Instead call it
1220         here, when unsuppressing.
1221
1222 2007-08-17  Darin Adler  <darin@apple.com>
1223
1224         Reviewed by Maciej.
1225
1226         - fix <rdar://problem/5414518> Use root URL as origin URL when quarantining downloads
1227
1228         * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::setOriginalURLForDownload):
1229         Extract only the scheme and host name and make the originating URL from that.
1230
1231         * WebKit/StringsNotToBeLocalized.txt: Updated for recent changes.
1232
1233 2007-08-17  Timothy Hatcher  <timothy@apple.com>
1234
1235         Reviewed by Darin.
1236
1237         <rdar://problem/5398301> Xcode threw mutation exception while enumerating subviews (GC only)
1238
1239         I was never able to reproduce this exception. But there can be cases where layout will
1240         trigger JavaScript or plugin code that can modify the WebView view hierarchy during a
1241         recursive enumeration of all the subviews.
1242
1243         This patch does two things:
1244         1) Adds a check in debug builds that will LOG when any view is added or removed during layout.
1245         Noting that added views will not recieve layout this round and might paint without first recieving layout.
1246
1247         2) Recursivly builds up an array of descendant WebHTMLViews before calling layout on them.
1248         This matches the behavior of makeObjectsPerformSelector: in the non-GC case (making a copy
1249         before enumerating.)
1250
1251         * WebView/WebHTMLView.mm:
1252         (-[WebHTMLView _web_setPrintingModeRecursive]): Use _web_addDescendantWebHTMLViewsToArray to build up an array
1253         of WebHTMLViews to enumerate.
1254         (-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto.
1255         (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto.
1256         (-[WebHTMLView _web_layoutIfNeededRecursive]): Ditto.
1257         (-[WebHTMLView _layoutIfNeeded]): Moved to WebHTMLViewFileInternal category.
1258         (-[WebHTMLView didAddSubview:]): LOG in debug builds.
1259         (-[WebHTMLView willRemoveSubview:]): Ditto.
1260         (-[NSView _web_addDescendantWebHTMLViewsToArray:]): Recursivly build an array of descendant WebHTMLViews.
1261         * WebView/WebHTMLViewInternal.h: Added a BOOL in WebHTMLViewPrivate to track subview changes (debug only.)
1262
1263 2007-08-17  Anders Carlsson  <andersca@apple.com>
1264
1265         Reviewed by Dave Hyatt.
1266
1267         <rdar://problem/5379040> 
1268         REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
1269         
1270         Pass the right size when creating the views.
1271         
1272         * WebCoreSupport/WebFrameBridge.mm:
1273         (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1274         * WebCoreSupport/WebFrameLoaderClient.h:
1275         * WebCoreSupport/WebFrameLoaderClient.mm:
1276         (WebFrameLoaderClient::createPlugin):
1277
1278 2007-08-13  Geoffrey Garen  <ggaren@apple.com>
1279
1280         Reviewed by Dave Hyatt.
1281         
1282         WebKit changes to support new cache eviction model in WebCore.
1283
1284         * WebView/WebPreferences.m:
1285         (+[WebPreferences initialize]): Modified to reflect new API in WebCore.
1286         * WebView/WebView.mm:
1287         (+[WebView _initializeCacheSizesIfNecessary]): Slightly increased cache
1288         size on low memory systems to avoid affecting the PLT for now.
1289
1290 2007-08-15  Timothy Hatcher  <timothy@apple.com>
1291
1292         Reviewed by Darin.
1293
1294         <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1295
1296         HIWebViewCreate now just returns a HIViewRef created with HICocoaViewCreate. This eliminates lots of old code and
1297         makes HIWebView a better citizen starting with Leopard. The old code paths are still needed for Tiger, so now
1298         most of the files in the WebKit/Carbon directory are #ifdef BUILDING_ON_TIGER.
1299
1300         The Tiger code is unchanged and dosen't exhibit the invalidation problem when the window resizes.
1301
1302         * Carbon/CarbonUtils.m:
1303         (WebInitForCarbon): #ifdef BUILDING_ON_TIGER portions of this code that is not needed on Leopard.
1304         * Carbon/CarbonWindowAdapter.h: #ifdef BUILDING_ON_TIGER
1305         * Carbon/CarbonWindowAdapter.m: Ditto.
1306         * Carbon/CarbonWindowContentView.h: Ditto.
1307         * Carbon/CarbonWindowContentView.m: Ditto.
1308         * Carbon/CarbonWindowFrame.h: Ditto.
1309         * Carbon/CarbonWindowFrame.m: Ditto.
1310         * Carbon/HIViewAdapter.h: Ditto.
1311         * Carbon/HIViewAdapter.m: Ditto.
1312         * Carbon/HIWebView.h: Consolidate two #ifdef __OBJC__ blocks into one.
1313         * Carbon/HIWebView.m: Implement Leopard specific HIWebViewCreate, HIWebViewCreateWithClass and HIWebViewGetWebView.
1314         (HIWebViewCreate): Call HIWebViewCreateWithClass passing [WebView class].
1315         (HIWebViewCreateWithClass): Call HICocoaViewCreate with an instance of the class passed in.
1316         (HIWebViewGetWebView): Call HICocoaViewGetView.
1317
1318 2007-08-14  Brady Eidson  <beidson@apple.com>
1319
1320         Reviewed by Darin, John, Maciej, Oliver, and Tim
1321
1322         <rdar://problem/5394708> - Crash on launch with corrupt icon database
1323
1324         Expose some new SPI to help recover from this case should it happen again
1325
1326         * Misc/WebIconDatabase.mm:
1327         (-[WebIconDatabase init]): Use the new _databaseDirectory to determine where to open the database on disk
1328         (+[WebIconDatabase _checkIntegrityBeforeOpening]): Tell the icon database to check integrity when it opens
1329         (-[WebIconDatabase _databaseDirectory]): Moved the database-directory-determining logic here as it's now used in two places
1330         * Misc/WebIconDatabasePrivate.h: Added _checkIntegrityBeforeOpening SPI for clients to give hints about when the
1331           integrity check should run
1332
1333 2007-08-12  Alexey Proskuryakov  <ap@webkit.org>
1334
1335         Reviewed by Darin.
1336
1337         http://bugs.webkit.org/show_bug.cgi?id=4648
1338         Shockwave unable to load GZip'd text resources when server sends Content-Length header
1339
1340         * Plugins/WebBaseNetscapePluginStream.mm:
1341         (-[WebBaseNetscapePluginStream startStreamWithResponse:]): Don't trust 
1342         -[NSURLResponse expectedContentLength] if Content-Encoding is not identity.
1343
1344 2007-08-10  Timothy Hatcher  <timothy@apple.com>
1345
1346         Reviewed by Mark Rowe.
1347
1348         <rdar://problem/5403302> HIWebView.h should be #ifdefed out for 64-bit
1349
1350         * Carbon/HIWebView.h: #ifdef out the header in 64-bit. Adds a comment about 32-bit only.
1351         * Carbon/CarbonUtils.h: Ditto.
1352
1353 2007-08-10  Timothy Hatcher  <timothy@apple.com>
1354
1355         Reviewed by Adam.
1356
1357         <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
1358
1359         Disable NPObject use in 64-bit on Mac OS X. Also generate the 64-bit export file.
1360
1361         * Configurations/WebKit.xcconfig: Point to the generated 64-bit export file.
1362         * Plugins/WebBasePluginPackage.h:
1363         * Plugins/npfunctions.h: #ifdef out this header in 64-bit on Mac OS X.
1364         * WebKit.LP64.exp: Removed.
1365         * WebKit.xcodeproj/project.pbxproj: Generate the the 64-bit export file.
1366         * WebKitPrefix.h: Define WTF_USE_NPOBJECT.
1367
1368 2007-08-10  Anders Carlsson  <andersca@apple.com>
1369
1370         Reviewed by Geoff.
1371
1372         <rdar://problem/5390568>
1373         REGRESSION: -[WebFrame loadHTMLString:baseURL:] leaks the data source
1374         
1375         If the identifier is not in the map, just bail out instead of asserting. This is a better fix for
1376         <rdar://problem/5133420> because WebCore shouldn't have to worry about the lifetime of WebKit objects.
1377         
1378         * WebView/WebDocumentLoaderMac.mm:
1379         (WebDocumentLoaderMac::decreaseLoadCount):
1380
1381 2007-08-10  Oliver Hunt  <oliver@apple.com>
1382
1383         Reviewed by Darin.
1384
1385         Fixed <rdar://problem/5000470> REGRESSION: ATOK IM: reconvert returns incorrect symbol due to inconsistent range domains in TSM by working around <rdar://problem/5400551> [NSAttributedString(WebKitExtras) _web_attributedStringFromRange:] adds whitespace to the requested range
1386
1387         We truncate the returned string to the expected length.
1388
1389         * WebView/WebHTMLView.mm:
1390         (-[WebHTMLView attributedSubstringFromRange:]):
1391
1392 2007-08-09  Mark Rowe  <mrowe@apple.com>
1393
1394         Reviewed by Antti.
1395
1396         <rdar://problem/5400709> Versioning in debug and release builds should include minor and tiny version before +
1397
1398         * Configurations/Version.xcconfig:
1399         * WebKit.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between
1400         Version.xcconfig and Info.plist explicit to Xcode.
1401
1402 2007-08-08  Kevin Decker <kdecker@apple.com>
1403
1404         Reviewed by Anders Carlsson.
1405
1406         Fixed: <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
1407         
1408         #ifdef'd out Netscape style plug-ins on 64-bit because Mac OS X doesn't support 64-bit Carbon UI.
1409         
1410         * Plugins/WebBaseNetscapePluginStream.h:
1411         * Plugins/WebBaseNetscapePluginStream.mm:
1412         * Plugins/WebBaseNetscapePluginView.h:
1413         * Plugins/WebBaseNetscapePluginView.mm:
1414         (+[WebBaseNetscapePluginView getCarbonEvent:]):
1415         (TSMEventHandler):
1416         * Plugins/WebBaseNetscapePluginViewInternal.h:
1417         * Plugins/WebBaseNetscapePluginViewPrivate.h:
1418         * Plugins/WebBasePluginPackage.m:
1419         (+[WebBasePluginPackage pluginWithPath:]):
1420         * Plugins/WebNetscapePluginEmbeddedView.h:
1421         * Plugins/WebNetscapePluginEmbeddedView.mm:
1422         * Plugins/WebNetscapePluginPackage.h:
1423         * Plugins/WebNetscapePluginPackage.m:
1424         * Plugins/WebNetscapePluginStream.h:
1425         * Plugins/WebNetscapePluginStream.mm:
1426         * Plugins/WebPluginDatabase.m:
1427         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
1428         * Plugins/npapi.m:
1429         * WebCoreSupport/WebFrameBridge.mm:
1430         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1431         * WebView/WebFrame.mm:
1432         * WebView/WebFramePrivate.h:
1433         * WebView/WebHTMLView.mm:
1434         (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
1435         * WebView/WebHTMLViewInternal.h:
1436
1437 2007-08-07  David Hyatt  <hyatt@apple.com>
1438
1439         Fix a botched backout of the Quicktime plugin clipping fix that broke Java.  The plugin view should not
1440         be set to autosize with the parent view.  Also, cleanup of script objects was removed accidentally as
1441         well.
1442
1443         Reviewed by olliej
1444
1445         * Plugins/WebPluginController.mm:
1446         (-[WebPluginController destroyPlugin:]):
1447         (-[WebPluginController destroyAllPlugins]):
1448         * WebCoreSupport/WebFrameBridge.mm:
1449         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
1450
1451 2007-08-03  Brady Eidson  <beidson@apple.com>
1452
1453         Reviewed by Oliver
1454
1455         Fix for http://bugs.webkit.org/show_bug.cgi?id=14824 and <rdar://problem/5372989>
1456
1457         When unregistering a MIMEType, remove it from the WebCore registry unconditionally
1458         When registrying a MIMEType whose view class is WebHTMLView, add it to the WebCore registry
1459
1460         * WebView/WebView.mm:
1461         (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]): 
1462         (+[WebView _registerViewClass:representationClass:forURLScheme:]):
1463         (+[WebView registerViewClass:representationClass:forMIMEType:]):
1464
1465 2007-08-03  Timothy Hatcher  <timothy@apple.com>
1466
1467         Reviewed by Mark Rowe.
1468
1469         Correct the bundle version check to work in Debug and Release builds too.
1470
1471         * WebKit.xcodeproj/project.pbxproj:
1472
1473 2007-08-02  Brady Eidson  <beidson@apple.com>
1474
1475         Reviewed by Tim
1476
1477         <rdar://problem/5381463> - setMIMETypesShownAsHTML mutates while enumerating
1478
1479         * WebView/WebView.mm:
1480         (+[WebView setMIMETypesShownAsHTML:]): Copy the dictionary before we work with it.
1481
1482 2007-08-02  Alice Liu  <alice.liu@apple.com>
1483
1484         Reviewed by Kevin McCullough.
1485
1486         fixed <rdar://problem/5310312> REGRESSION: javascript is mis-escaped at http://labs.zarate.org/passwd causing bookmarklet to break
1487
1488         * Misc/WebNSURLExtras.mm:
1489         (+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
1490         (-[NSURL _web_userVisibleString]):
1491         (-[NSURL _web_URLWithLowercasedScheme]):
1492         (-[NSURL _web_dataForURLComponentType:]):
1493         These 4 changes are just casting changes.
1494
1495         (-[NSString _webkit_stringByReplacingValidPercentEscapes]):
1496         This change replaces the call to an NSURL method with a webcore one that doesn't abort the escaping effort once an illegal character is encountered. 
1497
1498 2007-08-01  Anders Carlsson  <andersca@apple.com>
1499
1500         Fix build.
1501         
1502         * Misc/WebNSURLExtras.mm:
1503         (+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
1504         (-[NSURL _web_userVisibleString]):
1505         (-[NSURL _web_URLWithLowercasedScheme]):
1506         (-[NSURL _web_dataForURLComponentType:]):
1507
1508 2007-08-01  Alice Liu  <alice.liu@apple.com>
1509
1510         Reviewed by .
1511
1512         Making WebNSURLExtras objc++
1513
1514         * Misc/WebNSURLExtras.m: Removed.
1515         * Misc/WebNSURLExtras.mm: Copied from WebKit/Misc/WebNSURLExtras.m.
1516         * WebKit.xcodeproj/project.pbxproj:
1517
1518 2007-08-01  Darin Adler  <darin@apple.com>
1519
1520         Reviewed by Anders Carlsson and Kevin Decker.
1521
1522         - fix <rdar://problem/5377432> Removal of MakeDataExecutable from 64-bit breaks WebKit build
1523
1524         The trick was to ifdef out more of the code that's only needed to support CFM, which exists
1525         only for 32-bit PowerPC.
1526
1527         * Plugins/WebNetscapePluginPackage.h: Define a SUPPORT_CFM symbol in this internal header when
1528         we support CFM. We support it only on 32-bit PowerPC. Only define the isBundle, isCFM, and
1529         connID fields when SUPPORT_CFM is on. Also use ResFileRefNum instead of SInt16.
1530         * Plugins/WebNetscapePluginPackage.m: Only compile the function pointer and transition vector
1531         functions when SUPPORT_CFM is on.
1532         (-[WebNetscapePluginPackage openResourceFile]): Put the non-bundle case inside a SUPPORT_CFM
1533         ifdef, since all non-CFM plug-ins are bundles.
1534         (-[WebNetscapePluginPackage closeResourceFile:]): Ditto.
1535         (-[WebNetscapePluginPackage _initWithPath:]): Use SUPPORT_CFM to compile out the code for
1536         non-bundle and bundle-based CFM plug-ins, and code that sets isBundle and isCFM.
1537         (-[WebNetscapePluginPackage executableType]): Put the CFM case inside SUPPORT_CFM.
1538         (-[WebNetscapePluginPackage load]): Put the non-bundle and CFM cases inside SUPPORT_CFM.
1539         There was a bit of dead code here.
1540         (-[WebNetscapePluginPackage _unloadWithShutdown:]): Put the non-bundle case inside
1541         SUPPORT_CFM.
1542
1543 2007-07-31  Timothy Hatcher  <timothy@apple.com>
1544
1545         Reviewed by Oliver and Beth.
1546
1547         <rdar://problem/5211271> ADOBE Leopard 9A410: At the first Launching InDesign after deactivate, EULA page gets blanked.
1548
1549         Check for more Adobe applications that need the frame reload quirk. Also cache the answer
1550         so the version check dosen't happen more than once.
1551
1552         * WebView/WebView.mm:
1553         (-[WebView _needsAdobeFrameReloadingQuirk]):
1554         (-[WebView _updateWebCoreSettingsFromPreferences:]):
1555
1556 2007-07-30  Adele Peterson  <adele@apple.com>
1557
1558         Reviewed by Oliver.
1559
1560         Fix for <rdar://problem/5308020> REGRESSION: Command-N with Dvorak-Qwerty keyboard layout stopped working inside web page text fields
1561
1562         * WebView/WebHTMLView.mm: (-[WebHTMLView _handleStyleKeyEquivalent:]):
1563         The input method may have modified the character we get, so don't use charactersIgnoringModifiers to interpret the character we get.
1564
1565 2007-07-30  John Sullivan  <sullivan@apple.com>
1566
1567         Reviewed by Darin
1568         
1569         - fixed <rdar://problem/5216176> Need WebKit SPI to allow clients using embedded WebViews to avoid 
1570           clipping ends of some printed pages
1571           
1572         This provides Mail, and other clients that print views that embed WebViews, a way to ensure that
1573         the HTML is laid out for printing before pagination occurs.
1574
1575         * WebView/WebHTMLViewPrivate.h:
1576         new SPI method -_layoutForPrinting
1577         
1578         * WebView/WebHTMLView.mm:
1579         (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]):
1580         new method, just like existing _web_setPrintingModeRecursive except passes YES for adjustViewSize
1581         (-[WebHTMLView _layoutForPrinting]):
1582         new SPI method, sets printing mode temporarily to adjust the view size for printing 
1583         (-[NSView _web_setPrintingModeRecursiveAndAdjustViewSize]):
1584         new helper method to do the recursion
1585
1586 2007-07-30  Adele Peterson  <adele@apple.com>
1587
1588         Reviewed by Darin.
1589
1590         Fix for <rdar://problem/5367919> A crash occurs at WebCore::Frame::isFrameSet() when attempting to print a iframe before it loads at http://www.monster.com/
1591
1592         * WebView/WebHTMLView.mm: (-[WebHTMLView knowsPageRange:]): Nil check for frame.
1593
1594 2007-07-30  Anders Carlsson  <andersca@apple.com>
1595
1596         Reviewed by Darin.
1597
1598         <rdar://problem/5370710> 
1599         REGRESSION: After switching from Bookmark view, the Find Banner won't appear while displaying a PDF file
1600
1601         Implement hasHTMLView.
1602         
1603         * WebCoreSupport/WebFrameLoaderClient.h:
1604         * WebCoreSupport/WebFrameLoaderClient.mm:
1605         (WebFrameLoaderClient::hasHTMLView):
1606
1607 2007-07-30  Justin Garcia  <justin.garcia@apple.com>
1608
1609         Reviewed by Tristan.
1610         
1611         <rdar://problem/5098931> Attachments are lost when they are moved into a ToDo after a delete
1612         
1613         Mail needs to be asked if it is OK to do the content movement that happens 
1614         after a deleting in a situation like this one: 
1615         <div contenteditable="plaintext-only">foo</div><div>^bar</div> 
1616         so that they can prevent the move or so that they can save content that 
1617         will be stripped by the move. This could have been done with shouldInsertNode 
1618         and a new WebViewInsertAction for "moves", but WebKit clients like Mail and 
1619         DashCode think that a shouldInsert* means that the user pasted something and
1620         perform actions only appropriate for pastes.  This change is less risky because
1621         it won't require those clients to change their code.
1622
1623         * DefaultDelegates/WebDefaultEditingDelegate.m:
1624         (-[WebDefaultEditingDelegate webView:shouldMoveRangeAfterDelete:replacingRange:]):
1625         * WebCoreSupport/WebEditorClient.h:
1626         * WebCoreSupport/WebEditorClient.mm:
1627         (WebEditorClient::shouldMoveRangeAfterDelete):
1628         * WebView/WebEditingDelegatePrivate.h:
1629
1630 2007-07-29  Adele Peterson  <adele@apple.com>
1631
1632         Reviewed by John.
1633
1634         WebKit part of fix for <rdar://problem/5102522> REGRESSION: Can't tab to webview that doesn't have editable content
1635
1636         * WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Call new setInitialFocus method instead of advanceFocus.
1637
1638 2007-07-27  Darin Adler  <darin@apple.com>
1639
1640         - fix build
1641
1642         * WebKitPrefix.h: Removed the USING_WEBCORE_XXX definitions.
1643         * WebView/WebHTMLView.mm:
1644         (-[WebHTMLView delete:]): Fixed this to use WebCore again; I accidentally revived a dead
1645         code path that didn't work in the last patch!
1646         (-[WebHTMLView deleteToMark:]): Ditto.
1647         (-[WebHTMLView copy:]): Removed the unused side of the ifdef.
1648         (-[WebHTMLView cut:]): Ditto.
1649         (-[WebHTMLView paste:]): Ditto.
1650
1651 2007-07-27  Darin Adler  <darin@apple.com>
1652
1653         Reviewed by Tim Hatcher and Oliver Hunt.
1654
1655         - fix <rdar://problem/5355815> webView:doCommandBySelector: isn't getting called for copy:
1656
1657         Added code so that webView:doCommandBySelector: is called for every command.
1658
1659         * WebView/WebHTMLView.mm: Made 44 of the commands use the WEBCORE_COMMAND macro instead
1660         of being handwritten. For all the others, added invocation of COMMAND_PROLOGUE macro at
1661         the start of the command.
1662         (-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]): Added.
1663         (-[WebHTMLView callWebCoreCommand:]): Added.
1664         (-[WebHTMLView delete:]): Removed unused code path -- easy to bring back some day, but
1665         we don't need it compiled in.
1666         (-[WebHTMLView deleteBackwardByDecomposingPreviousCharacter:]): Changed so this doesn't
1667         call deleteBackward: any more so we don't call the delegate two times.
1668         (-[WebHTMLView deleteToMark:]): Changed so this doesn't call delete: any more so we don't
1669         call the delegate two times.
1670         (-[WebHTMLView selectToMark:]): Changed so this doesn't call setMark: any more so we don't
1671         call the delegate two times.
1672         (-[WebHTMLView doCommandBySelector:]): Added code to set the private variable
1673         selectorForDoCommandBySelector. This allows callDelegateDoCommandBySelectorIfNeeded to
1674         detect that we've already called the delegate and avoids calling it twice.
1675
1676         * WebView/WebHTMLViewInternal.h: Added the selectorForDoCommandBySelector field.
1677
1678 2007-07-26  Alexey Proskuryakov  <ap@webkit.org>
1679
1680         Reviewed by Oliver.
1681
1682         http://bugs.webkit.org/show_bug.cgi?id=14733
1683         Add a logging channel for text input
1684         <rdar://problem/5364667>
1685
1686         * Misc/WebKitLogging.h:
1687         * Misc/WebKitLogging.m:
1688         (WebKitInitializeLoggingChannelsIfNecessary):
1689         * WebView/WebHTMLView.mm:
1690         (-[WebHTMLView validAttributesForMarkedText]):
1691         (-[WebHTMLView textStorage]):
1692         (-[WebHTMLView characterIndexForPoint:]):
1693         (-[WebHTMLView firstRectForCharacterRange:]):
1694         (-[WebHTMLView selectedRange]):
1695         (-[WebHTMLView markedRange]):
1696         (-[WebHTMLView attributedSubstringFromRange:]):
1697         (-[WebHTMLView hasMarkedText]):
1698         (-[WebHTMLView unmarkText]):
1699         (-[WebHTMLView setMarkedText:selectedRange:]):
1700         (-[WebHTMLView doCommandBySelector:]):
1701         (-[WebHTMLView insertText:]):
1702
1703 2007-07-26  Darin Adler  <darin@apple.com>
1704
1705         - fix Tiger build
1706
1707         * Misc/WebTypesInternal.h: For use inside the library, use NSInteger and
1708         NSUInteger, just like on Leopard. WebNSInteger and WebNSUInteger are still
1709         present, but they are used in public and private headers only.
1710
1711         * Carbon/CarbonWindowAdapter.m:
1712         * Carbon/CarbonWindowFrame.m:
1713         * DefaultDelegates/WebScriptDebugServer.m:
1714         * History/WebBackForwardList.mm:
1715         * Misc/WebDownload.m:
1716         * Misc/WebSearchableTextView.m:
1717         * Plugins/WebBaseNetscapePluginView.mm:
1718         * WebCoreSupport/WebFrameLoaderClient.mm:
1719         * WebView/WebHTMLView.mm:
1720         * WebView/WebPDFView.mm:
1721         * WebView/WebView.mm:
1722         * WebView/WebViewInternal.h:
1723         Update all implementation files and internal headers to use NSInteger and
1724         NSUInteger rather than WebNSInteger and WebNSUInteger.
1725
1726 2007-07-26  John Sullivan  <sullivan@apple.com>
1727
1728         Reviewed by Kevin Decker
1729         
1730         - fixed <rdar://problem/5362989> Searching a pdf in some modes shows hilights for all instances 
1731           of the word, even those not on the current page
1732           
1733         It turns out that there were three different issues here, all contributing to incorrect display
1734         of multiple matches for PDF pages in certain display modes. (1) in non-continuous display modes,
1735         we weren't updating the match rects when the displayed page is changed with page up/down (e.g.);
1736         (2) the mechanism to update the match rects on scrolling was busted except for the first scroll
1737         away from 0,0; (3) the PDFKit API returns selection bounds for non-displayed pages in non-continuous
1738         modes just as if they were the displayed pages. This patch fixes all three issues.
1739
1740         * WebView/WebPDFView.h:
1741         made ivar name even longer
1742         
1743         * WebView/WebPDFView.mm:
1744         (-[WebPDFView setPDFDocument:]):
1745         updated for ivar name change
1746         (-[WebPDFView viewDidMoveToWindow]):
1747         observe page-change notifications as well as the others; this is necessary because in the
1748         non-continuous modes the view can be completely updated without any scrolling involved (problem 1)
1749         (-[WebPDFView viewWillMoveToWindow:]):
1750         stop observing page-change notifications
1751         (-[WebPDFView rectsForTextMatches]):
1752         skip any pages that aren't visible; this avoids treating matches on non-displayed non-continous
1753         modes as if they were on the displayed page (problem 3)
1754         (-[WebPDFView _PDFDocumentViewMightHaveScrolled:]):
1755         after checking whether scroll position has changed since we last checked it, remember the new
1756         one (d'oh!) (problem 2)
1757
1758         (-[WebPDFView _scaleOrDisplayModeOrPageChanged:]):
1759         renamed to include page changes
1760         
1761         (-[WebPDFView _visiblePDFPages]):
1762         new method, returns the set of pages that are at least partly visible
1763
1764 2007-07-24  Oliver Hunt  <oliver@apple.com>
1765
1766         Reviewed by Adam and Justin.
1767
1768         <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
1769
1770         editableDOMRangeForPoint:, moveDragCaretToPoint:, and removeDragCaret now call directly into
1771         WebCore without relying on bridge look up through the now removed _bridgeAtPoint:.
1772
1773         * WebKit.xcodeproj/project.pbxproj:
1774         * WebView/WebView.mm:
1775         (-[WebView moveDragCaretToPoint:]):
1776         (-[WebView removeDragCaret]):
1777         (-[WebView editableDOMRangeForPoint:]):
1778
1779 2007-07-24  Kevin Decker  <kdecker@apple.com>
1780
1781         Reviewed by Anders.
1782
1783         <rdar://problem/4699455> REGRESSION (Safari 2->Safari 3): Adobe Reader 7.0.8 plug-in doesn't work
1784         
1785         * Plugins/WebNetscapePluginEmbeddedView.h: Added a #define that renames this class to "WebNetscapePluginDocumentView"
1786         This is necessary because the Adobe 7.x Acrobat plug-in has a hard coded check for a view named "WebNetscapePluginDocumentView"
1787         and will not function correctly if it doesn't find a view in the hierarchy without the old class name.
1788
1789 2007-07-24  Mark Rowe  <mrowe@apple.com>
1790
1791         Reviewed by Antti.
1792
1793         <rdar://problem/5356666> NSMenuItem's seen leaking on buildbot
1794
1795         * WebCoreSupport/WebContextMenuClient.mm:
1796         (WebContextMenuClient::contextMenuItemSelected): Release platformItem as we were transferred its ownership by releasePlatformDescription.
1797
1798 2007-07-23  Oliver Hunt  <oliver@apple.com>
1799
1800         Reviewed by Darin.
1801
1802         We have to be able to support insertText: followed by doCommandBySelector: in 
1803         order to support the 2- and 3-Set Korean and RuSwitcher IMs at least.
1804
1805         * WebView/WebHTMLView.mm:
1806         (-[WebHTMLView insertText:]):
1807
1808 2007-07-23  Alice Liu  <alice.liu@apple.com>
1809
1810         Reverting change 24535 now that a solution has been found that doesn't 
1811         involve exposing an interface unnecessarily.
1812
1813         * WebView/WebHTMLView.mm:
1814         * WebView/WebHTMLViewPrivate.h:
1815
1816 2007-07-23  Alice Liu  <alice.liu@apple.com>
1817
1818         Reviewed by Oliver Hunt.
1819
1820         Expose [WebHTMLView hasMarkedText] to 
1821         fix <rdar://problem/4830074> autocomplete breaks Japanese typing
1822
1823         * WebView/WebHTMLView.mm:
1824         * WebView/WebHTMLViewPrivate.h:
1825
1826 2007-07-22  Darin Adler  <darin@apple.com>
1827
1828         * StringsNotToBeLocalized.txt: Updated for recent changes.
1829
1830 2007-07-21  Adam Roben  <aroben@apple.com>
1831
1832         Fix REGRESSION: Right-click/control-click broken
1833
1834         http://bugs.webkit.org/show_bug.cgi?id=14658
1835         <rdar://problem/5346830>
1836
1837         Reviewed by Mitz.
1838
1839         * WebCoreSupport/WebContextMenuClient.mm:
1840         (fixMenusToSendToOldClients): Update defaultItemsCount after removing
1841         items from the defaultItems array.
1842
1843 2007-07-20  Oliver Hunt  <oliver@apple.com>
1844
1845         Reviewed by Adele.
1846
1847         <rdar://problem/5319438> REGRESSION: Cannot paste into an active inline input area (14522)
1848         http://bugs.webkit.org/show_bug.cgi?id=14522
1849
1850         AppKit sends noop: to -[WebHTMLView doCommandBySelector:] when an IM does not handle event,
1851         we now check this as it is necessary to work around some IMs that do send messages 
1852         (such as insertText: rather than unmarkText: to confirm a composition)
1853
1854         * WebView/WebHTMLView.mm:
1855         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
1856         (-[WebHTMLView doCommandBySelector:]):
1857         * WebView/WebHTMLViewInternal.h:
1858
1859 2007-07-20  Brady Eidson  <beidson@apple.com>
1860
1861         Reviewed by Adele and Andersca
1862
1863         <rdar://problem/5336105> - WebBackForwardList created from scratch is unusable (always leads to crash)
1864
1865         * History/WebBackForwardList.mm:
1866         (-[WebBackForwardList init]): Have a default initializer that uses an empty BackFowardList not associated with a page.
1867
1868         * WebView/WebFrame.mm:
1869         (kit): For clarity's sake, this should return nil, not 0
1870
1871 2007-07-20  Justin Garcia  <justin.garcia@apple.com>
1872
1873         Reviewed by Darin.
1874         
1875         <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
1876
1877         * WebCoreSupport/WebEditorClient.h:
1878         * WebCoreSupport/WebEditorClient.mm: Removed the method
1879         for enabling/disabling word selection on right click.
1880         * WebView/WebView.mm: Ditto.
1881         * WebView/WebViewPrivate.h: Removed the getter/setter entirely, 
1882         it was in a private Category for Mail, but wasn't used by Mail
1883         on Tiger or Leopard, they apparently implement word selection on 
1884         their own.
1885
1886 2007-07-20  Timothy Hatcher  <timothy@apple.com>
1887
1888         Reviewed by Darin.
1889
1890         <rdar://problem/5199812> WebView needs to adopt viewWillDraw (moving off of _propagateDirtyRectsToOpaqueAncestors)
1891         <rdar://problem/5017301> REGRESSION: Scroller in Widget Manager splits down the middle while scrolling
1892
1893         On Leopard _propagateDirtyRectsToOpaqueAncestors is no longer called by AppKit. Also marking new dirty rects
1894         underneath _recursiveDisplayRectIfNeededIgnoringOpacity will wait until the next runloop to draw them,
1895         causing rendering to happen in two steps instead of one as WebCore expected.
1896
1897         * WebView/WebHTMLView.mm:
1898         (-[WebHTMLView _topHTMLView]): Move to the file internal category so we can use it in viewWillDraw.
1899         (-[WebHTMLView _isTopHTMLView]): Ditto.
1900         (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]): #ifdef for Tiger only.
1901         (-[WebHTMLView viewWillDraw]): Do a recursive layout if this is the top WebHTMLView.
1902         (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1903           Don't do layout here on Leopard since viewWillDraw handled it.
1904         (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]): Ditto.
1905
1906 2007-07-20  Beth Dakin  <bdakin@apple.com>
1907
1908         Reviewed by Tim and Geoff.
1909
1910         Fix for <rdar://problem/5346855> Mail crashes at 
1911         WebCore::RenderTableSection:paint + 846 when attempting to display 
1912         a HTML based message
1913
1914         After reapplying styles, the RenderView needs layout. However, 
1915         layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize used to 
1916         return early if the WebHTMLView itself does not need layout. 
1917         Because the WebHTMLView is not necessarily in synch with the 
1918         RenderTree, returning early here can get us into a bad situation 
1919         where we paint before laying out the Render Tree. This patch checks 
1920         both the WebHTMLView and the bridge (which checks the RenderView, 
1921         etc), so that we do not return early without laying out the Render 
1922         Tree. 
1923
1924         Some day, we should phase out WebHTMLView keeping track of 
1925         needsLayout at all. But that is a bit beyond the scope of this fix.  
1926
1927         * WebView/WebHTMLView.mm:
1928         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1929
1930 2007-07-20  John Sullivan  <sullivan@apple.com>
1931
1932         Reviewed by Darin Adler and David Harrison
1933         
1934         - fixed <rdar://problem/5307075> REGRESSION: Bottom of some printed pages are truncated
1935         
1936         The "avoid orphan" code I added a year ago was causing the page to be imaged to a larger 
1937         height (good), but not shrinking everything to compensate (bad). Bad one-year-ago me!
1938
1939         * WebView/WebHTMLViewInternal.h:
1940         added avoidingPrintOrphan boolean
1941
1942         * WebView/WebHTMLView.mm:
1943         (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
1944         clear _private->avoidingPrintOrphan when clearing _private->printing
1945         (-[WebHTMLView _scaleFactorForPrintOperation:]):
1946         take _private->avoidingPrintOrphan into account when computing the scale factor
1947         (-[WebHTMLView knowsPageRange:]):
1948         set _private->avoidingPrintOrphan when we're shrinking to avoid an orphan
1949
1950 2007-07-19  Adam Roben  <aroben@apple.com>
1951
1952         Fix <rdar://problem/5344972> REGRESSION: A error dialog occurs when
1953         attempting to ctrl-click in a iChat message window (webview)
1954
1955         Reviewed by Oliver.
1956
1957         * WebCoreSupport/WebContextMenuClient.mm:
1958         (fixMenusToSendToOldClients): Don't check for the Inspect Element item
1959         if we have fewer than 2 items.
1960
1961 2007-07-18  Geoffrey Garen  <ggaren@apple.com>
1962
1963         Reviewed by Dave Hyatt.
1964         
1965         <rdar://problem/5345099>
1966         
1967         Reduced default WebCore cache size from 32 MB to 23 MB on systems below 
1968         512 MB RAM. This improves RPRVT usage in the Safari pageout test by 
1969         ~10% on a system with 384 MB RAM.
1970         
1971         At 23 MB, no extra resources are evicted from the cache during a PLT 
1972         run, so this is a safe change PLT-wise. 23 MB is also seems to be a
1973         generous number in real world usage.
1974
1975         * WebView/WebPreferences.m:
1976         (+[WebPreferences initialize]):
1977
1978 2007-07-18  Anders Carlsson  <andersca@apple.com>
1979
1980         Reviewed by Geoff.
1981
1982         <rdar://problem/5341133> REGRESSION (Safari 2->Safari 3): DjVu plug-in doesn't load in Safari 3
1983         
1984         The DjVu plug-in uses the size of the passed in NPNetscapeFuncs struct to copy it over to a NPNetscapeFuncs struct
1985         whose size was determined when DjVu was compiled. This means that when we add extra functions to the vtable, 
1986         DjVu will segfault copying it into the (too small) destination struct.
1987         
1988         Fix this by special-casing the DjVu plug-in and setting the NPNetscapeFuncs size to be the same size as what DjVu expects.
1989         
1990         * Plugins/WebNetscapePluginPackage.m:
1991         (-[WebNetscapePluginPackage _applyDjVuWorkaround]):
1992         (-[WebNetscapePluginPackage load]):
1993
1994 2007-07-18  Timothy Hatcher  <timothy@apple.com>
1995
1996         Reviewed by Adam.
1997
1998         <rdar://problem/5343767> Should have a way to disable the Web Inspector
1999
2000         Adds a new DisableWebKitDeveloperExtras default that will force the Web Inspector to be disabled.
2001         This overrides the WebKitDeveloperExtras and IncludeDebugMenu default. It also disables
2002         the Web Inspector in Debug builds.
2003
2004         * WebView/WebView.mm:
2005         (+[WebView _developerExtrasEnabled]): Check for the DisableWebKitDeveloperExtras default.
2006         (-[WebView _commonInitializationWithFrameName:groupName:]): Make a new WebInspectorClient when making the Page.
2007
2008 2007-07-18  Anders Carlsson  <andersca@apple.com>
2009
2010         Build fix.
2011         
2012         * Misc/WebNSAttributedStringExtras.mm:
2013
2014 2007-07-18  Sam Weinig  <sam@webkit.org>
2015
2016         Rubber-stamped by Adam Roben.
2017
2018         Update after renaming MimeTypeRegistry to MIMETypeRegistry.
2019
2020         * Misc/WebNSPasteboardExtras.mm:
2021         (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
2022         * WebCoreSupport/WebFrameBridge.mm:
2023         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
2024         * WebView/WebDataSource.mm:
2025         (-[WebDataSource _documentFragmentWithArchive:]):
2026         * WebView/WebHTMLRepresentation.mm:
2027         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
2028         (+[WebHTMLRepresentation supportedImageMIMETypes]):
2029         * WebView/WebHTMLView.mm:
2030         (-[WebHTMLView _imageExistsAtPaths:]):
2031
2032 2007-07-18  Tristan O'Tierney  <tristan@apple.com>
2033
2034         Reviewed by Maciej Stachowiak.
2035         
2036         <rdar://problem/5341334> Alt-clicking a link in Safari does not register original URL info with gatekeeper
2037         <rdar://problem/5342570> REGRESSION: A hang occurs when attempting to open a attached file from a .Mac web mail message
2038
2039         * WebCoreSupport/WebFrameLoaderClient.h:
2040         Added a new method, setOriginalURLForDownload, for both download() 
2041         and startDownload() to share.
2042         
2043         * WebCoreSupport/WebFrameLoaderClient.mm:
2044         (WebFrameLoaderClient::download):
2045         Moved all the gatekeeper code into setOriginalURLForDownload.
2046         
2047         (WebFrameLoaderClient::setOriginalURLForDownload):
2048         Same code that was in download() but moved into a single place for both
2049         startDownload and download to use.  Also returned the boolean logic
2050         for detecting _wasUserGesture back to it's previous state, since my prior change
2051         was incorrect.  Additionally I found a loop index bug with backListCount and fixed it.
2052         
2053         (WebFrameLoaderClient::startDownload):
2054         Calls out to setOriginalURLForDownload after a download is created.
2055         
2056         * WebView/WebView.mm:
2057         (-[WebView _downloadURL:]):
2058         Changed to return the WebDownload object created inside _downloadURL
2059         
2060         * WebView/WebViewInternal.h:
2061         Changed _downloadURL to return the WebDownload it creates.
2062
2063 2007-07-17  Timothy Hatcher  <timothy@apple.com>
2064
2065         Reviewed by Geoff.
2066
2067         <rdar://problem/5336267> loadData:MIMEType:textEncodingName:baseURL: doesn't like relative URLs
2068
2069         Get the absoluteURL from any user supplied NSURL before we pass it down to WebCore.
2070
2071         * WebView/WebFrame.mm:
2072         (-[WebFrame _loadURL:referrer:intoChild:]):
2073         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
2074         * WebView/WebView.mm:
2075         (-[WebView userAgentForURL:]):
2076
2077 2007-07-17  Adam Roben  <aroben@apple.com>
2078
2079         Fix Bug 14324: Cannot remove/customize the "Inspect Element" contextual menu item
2080         http://bugs.webkit.org/show_bug.cgi?id=14324
2081
2082         Only clients linking against new versions of WebKit will see the item.
2083         I've maintained our behavior for old clients of not including the
2084         Inspect Element item in the menu items passed to the UI delegate.
2085
2086         Reviewed by Tim.
2087
2088         * Misc/WebKitVersionChecks.h: Added a new constant.
2089         * WebCoreSupport/WebContextMenuClient.mm:
2090         (isPreInspectElementTagClient): Added.
2091         (fixMenusToSendToOldClients): Return an array of items that should be
2092         appended to the menu received from the delegate.
2093         (fixMenusReceivedFromOldClients): Append the saved items to the array.
2094         (WebContextMenuClient::getCustomMenuFromDefaultItems): Retain/release
2095         the saved items.
2096
2097 2007-07-17  Adam Roben  <aroben@apple.com>
2098
2099         Remove WebContextMenuClient::shouldIncludeInspectElementItem
2100
2101         Reviewed by Tim.
2102
2103         * WebCoreSupport/WebContextMenuClient.h:
2104         * WebCoreSupport/WebContextMenuClient.mm:
2105
2106 2007-07-17  Adam Roben  <aroben@apple.com>
2107
2108         Initialize Settings::developerExtrasEnabled
2109
2110         Reviewed by Tim.
2111
2112         * WebView/WebView.mm:
2113         (-[WebView _updateWebCoreSettingsFromPreferences:]):
2114
2115 2007-07-17  Geoffrey Garen  <ggaren@apple.com>
2116
2117         Build fix.
2118
2119         * WebView/WebFrame.mm:
2120         (-[WebFrame _loadURL:referrer:intoChild:]):
2121         * WebView/WebFramePrivate.h:
2122
2123 2007-07-17  Tristan O'Tierney  <tristan@apple.com>
2124
2125         Reviewed by Maciej Stachowiak.
2126
2127         <rdar://problem/5294691> Source of file is misrepresented if downloaded by typing in URL in Safari address bar
2128
2129         * WebCoreSupport/WebFrameLoaderClient.h:
2130         * WebCoreSupport/WebFrameLoaderClient.mm:
2131         (WebFrameLoaderClient::download):
2132         Revised code to check the initial request's referrer before assuming it has a history to check.
2133
2134 2007-07-16  Brady Eidson  <beidson@apple.com>
2135
2136         Reviewed by Adam
2137
2138         Begin the arduous task of localizing FTP directory listings while removing a global initializer!
2139
2140         * English.lproj/Localizable.strings:
2141         * WebCoreSupport/WebViewFactory.mm:
2142         (-[WebViewFactory unknownFileSizeText]):
2143
2144 2007-07-16  Adam Roben  <aroben@apple.com>
2145
2146         Move printing from WebFrameBridge to WebChromeClient
2147
2148         Reviewed by Darin.
2149
2150         * WebCoreSupport/WebChromeClient.h: Updated for ChromeClient changes.
2151         * WebCoreSupport/WebChromeClient.mm:
2152         (WebChromeClient::print): Moved code from WebFrameBridge.
2153         * WebCoreSupport/WebFrameBridge.mm: Removed -print.
2154
2155 2007-07-16  Darin Adler  <darin@apple.com>
2156
2157         * StringsNotToBeLocalized.txt: Update for recent changes.
2158
2159 2007-07-16  John Sullivan  <sullivan@apple.com>
2160
2161         Reviewed by Kevin Decker and Darin Adler
2162         
2163         - fixed <rdar://problem/5337529> Holes in Find banner overlay on PDF pages are left in wrong place after changing scale
2164
2165         * WebView/WebPDFView.mm:
2166         (-[WebPDFView _scaleOrDisplayModeChanged:]):
2167         tell UI delegate that the entire PDF view has been redrawn
2168
2169 2007-07-14  Brady Eidson  <beidson@apple.com>
2170
2171         Reviewed by Sam Weinig
2172
2173         Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser
2174
2175         * WebView/WebPreferenceKeysPrivate.h: Added preference keys for the FTP template location, as well as to force 
2176           FTP directory listings, bypassing the policy delegate.  This is necessary to test the new feature until browser
2177           policy delegate support is added.
2178
2179         * WebView/WebPreferences.m:
2180         (-[WebPreferences _setFTPDirectoryTemplatePath:]):
2181         (-[WebPreferences _ftpDirectoryTemplatePath]):
2182         (-[WebPreferences _setForceFTPDirectoryListings:]):
2183         (-[WebPreferences _forceFTPDirectoryListings]):
2184         * WebView/WebPreferencesPrivate.h:
2185         * WebView/WebView.mm:
2186         (-[WebView _updateWebCoreSettingsFromPreferences:]):
2187
2188 2007-07-13  Anders Carlsson  <andersca@apple.com>
2189
2190         Reviewed by Maciej.
2191
2192         <rdar://problem/5290103> Assert failure when loading page with multipart resource
2193         
2194         Don't try to call the delegate method if the resource object doesn't exist in the 
2195         identifier map. When a multipart resource has finished loading one part, it is removed from the
2196         web view identifier map. 
2197         
2198         This is not an ideal fix, a better fix would be to special-case multipart resources and not remove
2199         them when the first part has finished loading. I've filed <rdar://problem/5335034> to track doing that.
2200         
2201         * WebCoreSupport/WebFrameLoaderClient.mm:
2202         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2203         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
2204         (WebFrameLoaderClient::dispatchDidReceiveResponse):
2205         (WebFrameLoaderClient::willCacheResponse):
2206         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
2207         (WebFrameLoaderClient::dispatchDidFinishLoading):
2208         (WebFrameLoaderClient::dispatchDidFailLoading):
2209
2210 2007-07-13  Timothy Hatcher  <timothy@apple.com>
2211
2212         Reviewed by Oliver Hunt.
2213
2214         <rdar://problem/5333766> Can't include WebEditingDelegatePrivate.h
2215
2216         * WebView/WebEditingDelegatePrivate.h: Changed the include to be a framework include,
2217         so other projects can use this header.
2218
2219 2007-07-12  Anders Carlsson  <andersca@apple.com>
2220
2221         Reviewed by Darin and Maciej.
2222
2223         <rdar://problem/5271096> panic after Safari stress test, caused by port leak
2224
2225         Replace uses of -[NSObject performSelector:withObject:afterDelay:] with CFRunLoopTimer. performSelector
2226         causes the target (the WebHTMLView in this case) to be retained until the timer fires. Furthermore, when
2227         running the PLT or iBench, the timers will not fire until the main loop is entered (usually after running all tests).
2228         
2229         This means that the timers and ports will not be released until after the test has finished running.
2230         
2231         * WebView/WebHTMLView.mm:
2232         (-[WebHTMLViewPrivate dealloc]):
2233         (-[WebHTMLView _cancelUpdateMouseoverTimer]):
2234         (-[WebHTMLView _updateMouseoverWithFakeEvent]):
2235         (-[WebHTMLView _updateMouseoverTimerCallback:]):
2236         (-[WebHTMLView _frameOrBoundsChanged]):
2237         (-[WebHTMLView _updateActiveState]):
2238         (-[WebHTMLView _updateActiveStateTimerCallback:]):
2239         (-[WebHTMLView viewWillMoveToWindow:]):
2240         (-[WebHTMLView viewDidMoveToWindow]):
2241         (-[WebHTMLView mouseDown:]):
2242         (-[WebTextCompleteController dealloc]):
2243         * WebView/WebHTMLViewInternal.h:
2244
2245 2007-07-13  Mark Rowe  <mrowe@apple.com>
2246
2247         Reviewed by Mitz.
2248
2249         Build fix.  Stub out WebChromeClient::print.
2250
2251         * WebCoreSupport/WebChromeClient.h:
2252         * WebCoreSupport/WebChromeClient.mm:
2253         (WebChromeClient::print):
2254
2255 2007-07-11  Timothy Hatcher  <timothy@apple.com>
2256
2257         Reviewed by Oliver.
2258
2259         <rdar://problem/5108789> WEBVIEW: Drawing artifacts when dragging in IB
2260
2261         Interface Builder 3 is relying on KVO notifications for frameOrigin and frameSize,
2262         among other standard NSView keys. Change automaticallyNotifiesObserversForKey to 
2263         return NO only for keys WebView manually fires notifications for.
2264
2265         * WebView/WebView.mm:
2266         (+[WebView automaticallyNotifiesObserversForKey:]): Selectivly return NO for keys we manually fire.
2267         (-[WebView _declaredKeys]): Code clean up.
2268
2269 2007-07-10  Antti Koivisto  <antti@apple.com>
2270
2271         Reviewed by John.
2272         
2273         Fix <rdar://problem/4570550>
2274         Hang in layout/layoutBlock/layoutBlockChildren preparing to print certain Mail messages
2275         
2276         When printing from Mail, WebHTMLView is a subview of the view that is actually printed and does not 
2277         receive calls that would set it to printing mode. Method adjustPageHeightNew is called repeatedly (for each page) during
2278         printing and it enables printing mode temporarily for each call. This triggers two full style recalcs and layouts
2279         each time making printing at least O(n^2). 
2280
2281         Instead of enabling printing mode and resetting it back immediatly do the resetting asynchronously, after
2282         all adjustPageHeightNew calls are done. Normal Safari printing is not affected as adjustPageHeightNew is only
2283         called in case WebHTMLView is embedded in the view that is being printed.
2284         
2285         No automatic test possible, requires printing and non-Safari client.
2286         
2287         * WebView/WebHTMLView.mm:
2288         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
2289
2290 2007-07-10  Geoffrey Garen  <ggaren@apple.com>
2291
2292         Reviewed by Maciej Stachowiak.
2293
2294         - Fixed <rdar://problem/5049509> REGRESSION(10.4.9-9A377a): REAP Suite 
2295         installer shows empty modal alert window (hangs) if user cancels during
2296         "installing shared components" phase
2297         
2298         Added Adobe installers to the family of apps that need a data load
2299         loading quirk.
2300         
2301         Added a linked-on-or-after check because this code is no longer 
2302         Tiger-only.
2303         
2304         I tested this code on Tiger and Leopard.
2305
2306         * Misc/WebKitVersionChecks.h:
2307         * WebKit.xcodeproj/project.pbxproj:
2308         * WebView/WebDocumentLoaderMac.mm:
2309         (needsDataLoadWorkaround):
2310         (WebDocumentLoaderMac::setDataSource):
2311
2312 2007-07-10  Darin Adler  <darin@apple.com>
2313
2314         - fix build
2315
2316         * WebView/WebHTMLView.mm: Add include of ContextMenu.h.
2317
2318 2007-07-10  Darin Adler  <darin@apple.com>
2319
2320         Reviewed by John Sullivan.
2321
2322         - <rdar://problem/5321953> remove workaround for fixed AppKit mouse moved bug
2323
2324         * WebView/WebHTMLView.mm: Put the workaround for bug 3429631 inside an
2325         ifdef BUILDING_ON_TIGER.
2326
2327 2007-07-09  Anders Carlsson  <andersca@apple.com>
2328
2329         Reviewed by Oliver.
2330
2331         <rdar://problem/4954319> 
2332         Acrobat 7 / Safari crash: CrashTracer: 99 crashes in Safari at 
2333         com.apple.WebCore: WebCore::NetscapePlugInStreamLoader::isDone const + 0
2334
2335         Add a new initWithFrameLoader: method to WebNetscapePluginStream which is to be used when
2336         the stream is a "fake" stream for full frame plug-ins.
2337         
2338         * Plugins/WebBaseNetscapePluginView.mm:
2339         (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
2340         * Plugins/WebNetscapePluginStream.h:
2341         * Plugins/WebNetscapePluginStream.mm:
2342         (-[WebNetscapePluginStream initWithFrameLoader:]):
2343         (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
2344         (-[WebNetscapePluginStream start]):
2345         (-[WebNetscapePluginStream cancelLoadWithError:]):
2346         (-[WebNetscapePluginStream stop]):
2347         * WebCoreSupport/WebFrameLoaderClient.mm:
2348         (WebFrameLoaderClient::createFrame):
2349
2350 2007-07-09  John Sullivan  <sullivan@apple.com>
2351
2352         Reviewed by Darin
2353         
2354         - fixed <rdar://problem/5320208> WebKit should prevent Time Machine from backing up WebKit clients' icon databases
2355
2356         * Misc/WebIconDatabase.mm:
2357         (-[WebIconDatabase init]):
2358         Re-added the code to exclude the icon database from backups. We now do this at the same time we (try to) import
2359         the old icon database format, which happens only once per icon database's lifetime.
2360         (-[WebIconDatabase _importToWebCoreFormat]):
2361         Assert that we haven't imported yet rather than bailing out. It's now the caller's responsibility to check
2362         whether we've imported yet.
2363
2364 2007-07-08  John Sullivan  <sullivan@apple.com>
2365
2366         * Misc/WebIconDatabase.mm:
2367         (-[WebIconDatabase init]):
2368         Removed the code to exclude the icon database from backups. We still want to do this, but in a way
2369         that only runs once ever, instead of once per launch, due to performance concerns.
2370
2371 2007-07-07  Darin Adler  <darin@apple.com>
2372
2373         Reviewed by Maciej.
2374
2375         - fix <rdar://problem/5124665> WebCore secondary-thread assertion should use linked-on-or-after check instead of building on Tiger check
2376
2377         * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITH_MAIN_THREAD_EXCEPTIONS.
2378
2379         * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]): In first-time initialization block,
2380         check for binaries linked against older versions of WebKit, and set the default thread violation
2381         behavior to LogOnFirstThreadViolation.
2382
2383         * WebView/WebView.mm: (+[WebView initialize]): Improved comments.
2384
2385 2007-07-06  Oliver Hunt  <oliver@apple.com>
2386
2387         Reviewed by Maciej.
2388
2389         <rdar://problem/5318756> Need to refactor IM/Marked text code to share logic with windows.
2390
2391         Moved a number of methods from WebHTMLView into WebCore.
2392         Replaced bridge methods with calls directly into WebCore objects.
2393
2394         * WebKit.xcodeproj/project.pbxproj:
2395         * WebView/WebHTMLView.mm:
2396         (-[WebHTMLView setMarkedText:selectedRange:]):
2397           Now calls WebCore object methods directly, rather than calling 
2398           via the bridge.
2399
2400 2007-07-06  John Sullivan  <sullivan@apple.com>
2401
2402         Reviewed by Brady
2403
2404         - WebKit part of fix for: 
2405           <rdar://problem/5310739> Time Machine shouldn't back up WebKit's icon database files
2406
2407         * Misc/WebIconDatabase.mm:
2408         (-[WebIconDatabase init]):
2409         Use CSBackupSetItemExcluded to tell Time Machine not to back up the icon database file
2410
2411 2007-07-07  Mark Rowe  <mrowe@apple.com>
2412
2413         Build fix.  Update WebDynamicScrollBarsView.h to include methods added and used in r24060.
2414
2415         * WebView/WebDynamicScrollBarsView.h:
2416
2417 2007-07-05  Timothy Hatcher  <timothy@apple.com>
2418
2419         Reviewed by John.
2420
2421         <rdar://problem/5236277> REGRESSION-9A458: SPI for setting scroll bar behavior doesn't work
2422
2423         Calling setHorizontalScrollingMode: calls updateScrollers before returning, this will cause
2424         WebCore to reset the scrolling mode based on the CSS overflow rules. So the setAlwaysShowHorizontalScroller:
2425         and setAlwaysShowVerticalScroller: methods needed a way to lock the scrolling mode before
2426         calling updateScrollers.
2427
2428         * WebView/WebDynamicScrollBarsView.m:
2429         (-[WebDynamicScrollBarsView updateScrollers]):
2430         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
2431         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]):
2432         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
2433         (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]):
2434         (-[WebDynamicScrollBarsView setScrollingMode:]):
2435         (-[WebDynamicScrollBarsView setScrollingMode:andLock:]):
2436         * WebView/WebView.mm:
2437         (-[WebView setAlwaysShowVerticalScroller:]):
2438         (-[WebView setAlwaysShowHorizontalScroller:]):
2439
2440 2007-07-06  Mitz Pettel  <mitz@webkit.org>
2441
2442         Reviewed by Maciej.
2443
2444         - fix http://bugs.webkit.org/show_bug.cgi?id=10267
2445           Can't scroll page downwards with scroll wheel, when pointer is on top of non-scrolling iframe
2446
2447         * WebView/WebDynamicScrollBarsView.m:
2448         (-[WebDynamicScrollBarsView scrollWheel:]): Override the superclass
2449         implementation to forward the wheel event to the next responder if this view
2450         does not allow scrolling in the event's direction.
2451
2452 2007-07-05  John Sullivan  <sullivan@apple.com>
2453
2454         Reviewed by Adam
2455         
2456         - WebKit part of fix for <rdar://problem/5315033>
2457
2458         * WebView/WebDocumentPrivate.h:
2459         new selectionImageForcingBlackText: method. selectionImageForcingWhiteText: is no longer used and was never
2460         in an official release of WebKit, so it could be removed, except that doing so would cause trouble for people
2461         using nightly WebKit with Safari 3.0 beta. So I left it in, but made it just force black text instead of
2462         white text, which will look different for those nightly WebKit/Safari 3.0 beta people but not break anything.
2463         
2464         * Misc/WebSearchableTextView.m:
2465         (-[WebSearchableTextView selectionImageForcingBlackText:]):
2466         new unimplemented protocol method for this obsolete class
2467         
2468         * WebView/WebHTMLView.mm:
2469         (-[WebHTMLView selectionImageForcingBlackText:]):
2470         calls through to WebCore the way selectionImageForcingWhiteText: used to
2471         (-[WebHTMLView selectionImageForcingWhiteText:]):
2472         now just calls selectionImageForcingBlackText:, thus not working as you would expect from the name
2473         
2474         * WebView/WebPDFView.mm:
2475         (-[WebPDFView selectionImageForcingBlackText:]):
2476         guts of old selectionImageForcingWhiteText:, but with black substituted for white
2477         (-[WebPDFView selectionImageForcingWhiteText:]):
2478         now just calls selectionImageForcingBlackText:, thus not working as you would expect from the name
2479
2480 2007-07-05  Timothy Hatcher  <timothy@apple.com>
2481
2482         Reviewed by John.
2483
2484         <rdar://problem/5314993> Shiira 2.1 throws an exception open a new window: -[WebInspector window]: unrecognized selector
2485
2486         Add an empty implementation of this method to prevent Shiira from throwing an exception.
2487         Also log that this method is obsolete and the class will be removed.
2488
2489         * WebInspector/WebInspector.mm:
2490         (-[WebInspector window]):
2491
2492 2007-07-04  Adam Roben  <aroben@apple.com>
2493
2494         Move tooltip logic down into WebCore so that it can be shared cross-platform
2495
2496         Reviewed by Sam.
2497
2498         * WebCoreSupport/WebChromeClient.h:
2499         * WebCoreSupport/WebChromeClient.mm:
2500         (WebChromeClient::setToolTip): Added.
2501         * WebView/WebHTMLView.mm: Removed _resetCachedWebPreferences.
2502         (-[WebHTMLView _updateMouseoverWithEvent:]): Removed tooltip code.
2503         (-[WebHTMLView initWithFrame:]): Removed call to
2504         _resetCachedWebPreferences.
2505         (-[WebHTMLView setDataSource:]): Ditto.
2506         * WebView/WebHTMLViewInternal.h: Removed showsURLsInToolTips ivar.
2507         * WebView/WebHTMLViewPrivate.h: Added declaration for _setTooltip so
2508         that WebChromeClient can call it.
2509
2510 2007-07-04  Adam Roben  <aroben@apple.com>
2511
2512         Initialize Settings::showsURLsInToolTips
2513
2514         Reviewed by Sam.
2515
2516         * WebView/WebView.mm:
2517         (-[WebView _updateWebCoreSettingsFromPreferences:]):
2518
2519 2007-07-04  Adam Roben  <aroben@apple.com>
2520
2521         Removed call to mouseDidMoveOverElement now that WebCore handles it
2522
2523         Reviewed by Sam.
2524
2525         * WebView/WebHTMLView.mm:
2526         (-[WebHTMLView _updateMouseoverWithEvent:]):
2527
2528 2007-07-04  Adam Roben  <aroben@apple.com>
2529
2530         Add WebChromeClient::mouseDidMoveOverElement
2531
2532         This is not called yet.
2533
2534         Reviewed by Sam.
2535
2536         * WebCoreSupport/WebChromeClient.h:
2537         * WebCoreSupport/WebChromeClient.mm:
2538
2539 2007-07-03  Darin Adler  <darin@apple.com>
2540
2541         * StringsNotToBeLocalized.txt: Updated for recent changes.
2542
2543 2007-07-03  Timothy Hatcher  <timothy@apple.com>
2544
2545         Reviewed by Darin.
2546
2547         Remove HIWebView in 64-bit.
2548
2549         Also disable a few calls that are now gone in 64-bit and filed these bugs:
2550
2551         <rdar://problem/5311653> WebKit needs to adopt HIGetMousePosition where we used GetGlobalMouse before
2552         <rdar://problem/5311648> WebKit needs to move off of CopyEvent in WebBaseNetscapePluginView
2553         <rdar://problem/5311640> WebKit needs a new solution for HISearchWindowShow on 64-bit
2554
2555         * Carbon/CarbonUtils.m:
2556         * Carbon/CarbonWindowAdapter.m:
2557         * Carbon/CarbonWindowContentView.m:
2558         * Carbon/CarbonWindowFrame.m:
2559         * Carbon/HIViewAdapter.m:
2560         (SetViewNeedsDisplay):
2561         * Carbon/HIWebView.m:
2562         (Draw):
2563         (SyncFrame):
2564         * Configurations/WebKit.xcconfig:
2565         * Plugins/WebBaseNetscapePluginView.mm:
2566         (+[WebBaseNetscapePluginView getCarbonEvent:]):
2567         (TSMEventHandler):
2568         * WebKit.LP64.exp: Added.
2569         * WebView/WebView.mm:
2570         (-[WebView _searchWithSpotlightFromMenu:]):
2571
2572 2007-07-03  Adam Roben  <aroben@apple.com>
2573
2574         Merge the Windows and Mac localized strings and exceptions files
2575
2576         Reviewed by Darin and Anders.
2577
2578         * English.lproj/Localizable.strings: Added Windows strings.
2579         * StringsNotToBeLocalized.txt: Renamed from WebKit/English.lproj/StringsNotToBeLocalized.txt.
2580
2581 2007-07-03  Adele Peterson  <adele@apple.com>
2582
2583         Removed printf I accidently left in.
2584
2585         * Misc/WebNSURLExtras.m: (mapHostNames):
2586
2587 2007-07-03  Adele Peterson  <adele@apple.com>
2588
2589         Reviewed by Darin.
2590
2591         Fix for: <rdar://problem/5292988> domain names shouldn't contain ignorable characters
2592
2593         * Misc/WebNSURLExtras.m:
2594         (isLookalikeCharacter): Renamed.  Also excludes any non-printable character, 
2595          any character considered as whitespace that isn't already converted to a space by ICU, any ignorable character,
2596          and any character excluded in Mozilla's blacklist: http://kb.mozillazine.org/Network.IDN.blacklist_chars
2597         (allCharactersInIDNScriptWhiteList):
2598
2599 2007-07-03  Darin Adler  <darin@apple.com>
2600
2601         Reviewed by Maciej.
2602
2603         - fix <rdar://problem/5310848> WebDataSource lifetime problem -- may be cause of the leaks seen on the buildbot
2604
2605         * WebView/WebDataSource.mm:
2606         (-[WebDataSourcePrivate dealloc]): Added a call to the new detachDataSource function.
2607         (-[WebDataSourcePrivate finalize]): Ditto.
2608
2609         * WebView/WebDocumentLoaderMac.h: Added detachDataSource function to be used when the
2610         WebDataSource is deallocated. Added retain/releaseDataSource helper functions to be
2611         used to retain and release the data source object. Replaced the m_hasEverBeenDetached
2612         boolean with a more primitive and hence easier to understand m_isDataSourceRetained boolean.
2613
2614         * WebView/WebDocumentLoaderMac.mm:
2615         (WebDocumentLoaderMac::WebDocumentLoaderMac): Initialize m_isDataSourceRetained to false.
2616         (WebDocumentLoaderMac::setDataSource): Call retainDataSource instead of calling HardRetain
2617         on the dataSource parameter. Also updated a comment.
2618         (WebDocumentLoaderMac::attachToFrame): Call retainDataSource unconditionally rather than
2619         trying to use m_hasEverBeenDetached to decide if a retain is needed. Also got rid of an
2620         assertion that m_loadingResources is empty -- not important any more.
2621         (WebDocumentLoaderMac::detachFromFrame): Call releaseDataSource instead of using
2622         HardRelease, but only if m_loadingResources is empty. If it's non-empty, then we'll
2623         do the releaseDataSource later in decreaseLoadCount.
2624         (WebDocumentLoaderMac::increaseLoadCount): Call retainDataSource unconditionally
2625         rather than calling HardRetain only if the old set of resources was empty.
2626         (WebDocumentLoaderMac::decreaseLoadCount): Call releaseDataSource if m_loadingResources
2627         is empty and we're not attached to a frame. If we are attached to a frame, then
2628         we'll do the releaseDataSource later in detachFromFrame.
2629         (WebDocumentLoaderMac::retainDataSource): Added. Calls CFRetain, but only if the data
2630         source is not already retained (according to the boolean).
2631         (WebDocumentLoaderMac::releaseDataSource): Added. Calls CFRelease, but only if the data
2632         source is currently retained (according to the boolean).
2633         (WebDocumentLoaderMac::detachDataSource): Added. Sets m_dataSource to nil. Since this
2634         is only called from WebDataSource's dealloc and finalize methods, it won't ever be called
2635         when the m_isDataSourceRetained boolean is true.
2636
2637 2007-07-03  Darin Adler  <darin@apple.com>
2638
2639         - forgot to check in one file in the fix for <rdar://problem/5307880>
2640           some classes need finalize methods because of non-trivial work done in dealloc methods
2641
2642         * WebView/WebView.mm: (-[WebViewPrivate finalize]): Delete identifierMap so it doesn't leak.
2643
2644 2007-07-03  Anders Carlsson  <andersca@apple.com>
2645
2646         Reviewed by Darin.
2647
2648         * WebView/WebView.mm:
2649         (-[WebView stringByEvaluatingJavaScriptFromString:]):
2650         ASSERT that the value returned isn't nil. It can't be nil when invoked on the main frame.
2651
2652 2007-07-04  Mark Rowe  <mrowe@apple.com>
2653
2654         Unreviewed 64-bit build fixes.
2655
2656         * WebCoreSupport/WebInspectorClient.mm: Let the compiler know that WebFrameView is a subclass of NSView.
2657         * WebView/WebDocumentInternal.h: Remove our preprocessor macro once we're done with it.
2658         * WebView/WebHTMLView.mm:
2659         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Fix argument types.
2660
2661 2007-07-02  Darin Adler  <darin@apple.com>
2662
2663         Reviewed by Kevin Decker and Tim Hatcher.
2664
2665         - fix <rdar://problem/5307880> some classes need finalize methods
2666           because of non-trivial work done in dealloc methods
2667
2668         * DefaultDelegates/WebScriptDebugServer.m:
2669         (-[WebScriptDebugServer dealloc]): Added a comment about how this probably won't
2670         work under GC.
2671         * WebInspector/WebNodeHighlight.m:
2672         (-[WebNodeHighlight dealloc]): Ditto.
2673
2674         * WebView/WebDataSource.mm:
2675         (+[WebDataSourcePrivate initialize]): Added. Makes finalize run on main thread.
2676         (-[WebDataSourcePrivate finalize]): Added. Calls deref on the document loader.
2677         * WebView/WebHTMLView.mm:
2678         (+[WebHTMLViewPrivate initialize]): Added. Makes finalize run on main thread.
2679         (-[WebHTMLViewPrivate finalize]): Added. Calls deref on promisedDragTIFFDataSource.
2680
2681         * WebKit.xcodeproj/project.pbxproj: Let Xcode be Xcode.
2682
2683 2007-07-02  Oliver Hunt  <oliver@apple.com>
2684
2685         Reviewed by Justin.
2686
2687         Fix for 
2688           <rdar://problem/5290113> WebKit does not correctly handle replacement ranges from the IM in -[WebHTMLView insertText:]
2689           http://bugs.webkit.org/show_bug.cgi?id=13664
2690
2691         We replicate the logic of -[WebHTMLView setMarkedText:selectedRange:] to handle the Input Method 
2692         feeding us a replacement string through insertText: so we can handle IMs that use insertText to
2693         replace text.
2694
2695         * WebView/WebHTMLView.mm:
2696         (-[WebHTMLView insertText:]):
2697
2698 2007-07-01  Oliver Hunt  <oliver@apple.com>
2699
2700         Reviewed by Alexey.
2701
2702         Fix for <rdar://problem/5306210> Some events are still passed to WebCore despite being handled by the IM
2703         http://bugs.webkit.org/show_bug.cgi?id=14457
2704
2705         We have to assume that the IM will consume all events, so we remove the dependency
2706         on -[WebHTMLView hasMarkedText].
2707
2708         * WebView/WebHTMLView.mm:
2709         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
2710
2711 2007-06-29  John Sullivan  <sullivan@apple.com>
2712
2713         Reviewed by Oliver Hunt.
2714
2715         - WebKit support for accessing the set of rectangles that encompass the selected text
2716
2717         * WebView/WebDocumentPrivate.h:
2718         added -selectionTextRects to WebDocumentSelection protocol; tweaked comments
2719
2720         * WebView/WebHTMLView.mm:
2721         (-[WebHTMLView _selectionDraggingRect]):
2722         use selectionRect instead of selectionImageRect since they're the same and maybe we can get
2723         rid of selectionImageRect someday
2724         (-[WebHTMLView selectionTextRects]):
2725         added implementation of new protocol method, which calls through to WebCore
2726         
2727         * WebView/WebPDFView.mm:
2728         (-[WebPDFView selectionTextRects]):
2729         added simple implementation of new protocol method, which just returns the single selection rect.
2730         PDFKit doesn't support obtaining multiple rects to describe a multi-line selection.
2731         (-[WebPDFView selectionImageForcingWhiteText:]):
2732         use selectionRect instead of selectionImageRect since they're the same and maybe we can get
2733         rid of selectionImageRect someday
2734         
2735         * Misc/WebSearchableTextView.m:
2736         (-[WebSearchableTextView selectionTextRects]):
2737         added no-op implementation of new protocol method to this obsolete class
2738
2739 2007-06-28  Timothy Hatcher  <timothy@apple.com>
2740
2741         Reviewed by Darin.
2742
2743         <rdar://problem/5287569> WEBVIEW: Creating a webview in IB 3.0 (v2.0) NIB later crashes Interface Builder 2.5.4 on Tiger
2744
2745         Prevent encoding any of the WebView subviews. The subviews are ignored by -[WebView initWithCoder:] and will be recreated.
2746         The Tiger 2.0 code crashed when the WebView released the subviews in initWithCoder:, so now there are no subviews to release.
2747         This never happened before because the Tiger 2.0 code and IB wouldn't encode a WebView that has a WebHTMLView.
2748
2749         * WebView/WebView.mm:
2750         (-[WebView encodeWithCoder:]):
2751
2752 2007-06-26  John Sullivan  <sullivan@apple.com>
2753
2754         Reviewed by Darin
2755         
2756         - WebKit support for displaying multiple text matches in PDF views (<rdar://problem/4601967>)
2757
2758         * WebView/WebPDFView.h:
2759         new ivars textMatches and lastScrollPosition; now conforms to WebMultipleTextMatches protocol
2760         
2761         * WebView/WebPDFView.mm:
2762         (-[WebPDFView dealloc]):
2763         release textMatches
2764         (-[WebPDFView viewDidMoveToWindow]):
2765         start observing bounds changes in the PDF document's enclosing clip view, so we can notice when
2766         scrolling takes place
2767         (-[WebPDFView viewWillMoveToWindow:]):
2768         stop observing bounds changes in the PDF document's enclosing clip view
2769         (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
2770         most of the code here has been moved into the new method _nextMatchFor::::, which this now calls
2771         (-[WebPDFView setMarkedTextMatchesAreHighlighted:]):
2772         implementation of WebMultipleTextMatches protocol method, does nothing useful here because we don't
2773         support inline highlighting of matches in PDF documents
2774         (-[WebPDFView markedTextMatchesAreHighlighted]):
2775         implementation of WebMultipleTextMatches protocol method
2776         (-[WebPDFView markAllMatchesForText:caseSensitive:limit:]):
2777         implementation of WebMultipleTextMatches protocol method; calls _nextMatchFor:::: in a loop until
2778         entire document is searched or limit is hit; records results by saving PDFSelections in textMatches ivar
2779         (-[WebPDFView unmarkAllTextMatches]):
2780         implementation of WebMultipleTextMatches protocol method; clears saved textMatches
2781         (-[WebPDFView rectsForTextMatches]):
2782         implementation of WebMultipleTextMatches protocol method; converts saved PDFSelections into NSValue 
2783         objects that represent NSRects
2784         (-[WebPDFView _clipViewForPDFDocumentView]):
2785         new helper method to find the clip view whose bounds determine the current scroll position
2786         (-[WebPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]):
2787         new helper method, extracted from searchFor:::::
2788         (-[WebPDFView _PDFDocumentViewMightHaveScrolled:]):
2789         new notification callback; tells webView's delegate when document has scrolled
2790         (-[WebPDFView _setTextMatches:]):
2791         new helper method, stores value in ivar
2792
2793 2007-06-26  Oliver Hunt  <oliver@apple.com>
2794
2795         Reviewed by Maciej.
2796
2797         Hopefully fix remainder of the IME issues on Mac.  
2798         We now assume that the IME silently consumes any event given
2799         to it during text composition, and only override this assumption
2800         if the NSTextInput or NSResponder callbacks are made.
2801
2802         This prevents us from treating those events that the IME has 
2803         consumed internally (eg. candidate window navigation) as unhandled
2804         events that should be bubbled.
2805
2806         This fixes:
2807           <rdar://problem/5107538> Major problems handling key press event with non-english Input Methods
2808           <rdar://problem/4196249> REGRESSION: Mail: Inputting space (U+0020) with IM deletes subsequent line breaks on Mail.app
2809           <rdar://problem/5015544> REGRESSION: Reverse conversion keyboard command does not work in Safari.
2810           <rdar://problem/5045121> REGRESSION: Inline is confirmed after press left/right arrow keys, happens in Mail but not in TextEdit.
2811           <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC)
2812           <rdar://problem/5085781> REGRESSION: Active input area lost "selected" highlight
2813           <rdar://problem/5094200> space key pressed to close the associated words candidate window gets inserted as text
2814           <rdar://problem/5228294> Candidate item for character matrix is sometimes skipped
2815
2816         * WebKit.xcodeproj/project.pbxproj:
2817         * WebView/WebHTMLView.mm:
2818         (-[WebHTMLView launchKeyEvent:]):
2819         (-[WebHTMLView keyDown:]):
2820         (-[WebHTMLView keyUp:]):
2821         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
2822         (-[WebHTMLView unmarkText]):
2823         (-[WebHTMLView setMarkedText:selectedRange:]):
2824         (-[WebHTMLView doCommandBySelector:]):
2825         (-[WebHTMLView insertText:]):
2826
2827 2007-06-26  Jim Correia  <jim.correia@pobox.com>
2828
2829         Reviewed by Darin.
2830
2831         Fix http://bugs.webkit.org/show_bug.cgi?id=14411
2832         Bug 14411: WebNetscapePluginPackage overagressively sets CurApRefNum, which affects shipping versions of BBEdit.
2833         <rdar://problem/5297268>
2834
2835         * Plugins/WebNetscapePluginPackage.m:
2836         (+[WebNetscapePluginPackage initialize]): Force the Resource Manager to
2837         lazy initialize, and only set CurApRefNum to the system file if
2838         CurApRefNum is still -1 after that forced lazy initialization.
2839
2840 2007-06-25  Kevin Decker  <kdecker@apple.com>
2841
2842         Reviewed by Darin.
2843
2844         <rdar://problem/5294036> -[WebView customTextEncodingName] API may return empty string instead of nil
2845
2846         * WebView/WebView.mm:
2847         (-[WebView _mainFrameOverrideEncoding]): Addded the nsStringNilIfEmpty() inline to the data being returned because 
2848         our API says "The custom text encoding name or nil if no custom text encoding name has been set." I also verified
2849         the standing Tiger WebKit behavior for this method and it does indeed return nil if a custom encoding wasn't set.
2850
2851 2007-06-25  John Sullivan  <sullivan@apple.com>
2852
2853         Reviewed by Darin
2854         
2855         - WebKit part of <rdar://problem/5293820>, needed to support multiple matches in PDFs
2856
2857         * WebView/WebDocumentInternal.h:
2858         Added WebMultipleTextMatches protocol, containing five methods that were formerly implemented in WebHTMLView
2859         * WebView/WebHTMLViewPrivate.h:
2860         Removed declarations for the methods that are now in WebMultipleTextMatches protocol
2861         
2862         * WebView/WebHTMLView.mm:
2863         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
2864         moved this method into the WebDocumentInternalProtocols portion of the file
2865         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
2866         ditto
2867         (-[WebHTMLView markedTextMatchesAreHighlighted]):
2868         ditto
2869         (-[WebHTMLView unmarkAllTextMatches]):
2870         ditto
2871         (-[WebHTMLView rectsForTextMatches]):
2872         ditto
2873
2874         * WebView/WebView.mm:
2875         (-[WebView canMarkAllTextMatches]):
2876         new method, returns YES only if the documentView of every frame implements WebMultipleTextMatches
2877         (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
2878         check for WebMultipleTextMatches protocol instead of checking for WebHTMLView class
2879         (-[WebView unmarkAllTextMatches]):
2880         ditto
2881         (-[WebView rectsForTextMatches]):
2882         ditto
2883
2884         * WebView/WebViewPrivate.h:
2885         declared new method canMarkAllTextMatches
2886
2887 2007-06-25  John Sullivan  <sullivan@apple.com>
2888
2889         Reviewed by Darin
2890         
2891         Fixed <rdar://problem/5292259> Find on Page doesn't work (throws exception) on page that includes PDF in a subframe
2892
2893         * WebView/WebView.mm:
2894         (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
2895         We were testing whether the view was an HTMLView, but then running code that assumed it was an HTMLView outside of
2896         that test. That's a bad idea.
2897
2898 2007-06-22  Adele Peterson  <adele@apple.com>
2899
2900         Reviewed by Geoff and Darin.
2901
2902         Fix for: <rdar://problem/5239236> Other slash characters should not be permitted as part of a domain name
2903
2904         * Misc/WebNSURLExtras.m:
2905         (isSlashOrPeriodLookalike):
2906         (allCharactersInIDNScriptWhiteList):
2907
2908 2007-06-21  Sam Weinig  <sam@webkit.org>
2909
2910         Reviewed by Antti.
2911
2912         Remove empty directories
2913
2914         * WebInspector/webInspector: directory removed.
2915         * WebInspector/webInspector/Images: directory removed
2916
2917 2007-06-21  Justin Garcia  <justin.garcia@apple.com>
2918
2919         Reviewed by Tim.
2920         
2921         <rdar://problem/5237524> 
2922         REGRESSION: Keyboard commands don't work in a message window until you click inside the message
2923         
2924         When you open a message in its own window, Mail creates an empty 
2925         WebView, makes that WebView firstResponder and then sets off a 
2926         load inside that WebView.
2927         
2928         When we're asked to create the empty WebView, we put an empty 
2929         WebHTMLView inside it (in r21367 we began creating a document 
2930         for empty frames).  When Mail makes the WebView first responder 
2931         we make that empty WebHTMLView firstResponder.  Then when the 
2932         load finishes we create a new WebHTMLView and set it as the 
2933         document view.  
2934         
2935         Inside _setDocumentView, if the old document view or one of its
2936         descendants was the first responder, we'd makeFirstResponder:nil 
2937         so that the window wouldn't be left with a firstResponder that 
2938         was no longer inside of it.  This change fixes the bug by instead 
2939         transferring firstResponder status to the new document view.
2940         
2941         We could also fix this by not allowing the WebHTMLView to become
2942         firstResponder when it's in the provisional state mentioned above.
2943
2944         * WebView/WebFrameView.mm:
2945         (-[WebFrameView _setDocumentView:]):
2946
2947 2007-06-21  John Sullivan  <sullivan@apple.com>
2948
2949         Reviewed by Adele
2950         
2951         - fixed <rdar://problem/5268673> REGRESSION: Context menu missing for PDF in frame when there's no selection
2952         
2953         This was surprisingly interesting. It turns out that at least for Safari, the method [WebDefaultUIDelegate
2954         webView:contextMenuItemsForElement:defaultMenuItems:] is only exercised from WebPDFView these days. It mimics
2955         some of the code that was moved to WebCore as part of the Great Context Menu Refactoring of 2006, but is
2956         independent of that code. And it was partly broken/incomplete, probably as a result of said refactoring.
2957
2958         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
2959         (localizedMenuTitleFromAppKit()):
2960         deleted this function since I removed all callers
2961         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
2962         Handle WebMenuItemTagOpenFrameInNewWindow tag, since code later in this file was relying on it. Added
2963         ASSERT_NOT_REACHED to the default case, since returning nil from this method is bad.
2964         Also, use WebKit versions of menu title strings rather than AppKit versions. We added these strings to WebKit 
2965         a while back so we don't need to sneakily find them in AppKit anymore.
2966         (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
2967         make the WebView be the target of the Open Frame in New Window item; previously it was self, but that was
2968         just silly (probably a leftover from some code shuffling when context menus were reimplemented)
2969
2970         * WebView/WebView.mm:
2971         (-[WebView _openFrameInNewWindowFromMenu:]):
2972         new method, used by Open Frame in New Window menu item.
2973
2974         * WebView/WebViewInternal.h:
2975         Declare new method used by menu item. This isn't necessary for compilation, but could prevent the accidental
2976         deletion of the method implementation.
2977
2978 2007-06-20  Mark Rowe  <mrowe@apple.com>
2979
2980         Reviewed by Adam.
2981
2982         Fix http://bugs.webkit.org/show_bug.cgi?id=14255.
2983         Bug 14255: Reproducible crash opening web inspector from debug menu
2984
2985         Reinstate the WebInspector class so WebKit clients that currently depend on it
2986         will build and run correctly.
2987
2988         * WebInspector/WebInspector.h: Added.
2989         * WebInspector/WebInspector.mm: Added.
2990         (+[WebInspector webInspector]):
2991         (-[WebInspector dealloc]):
2992         (-[WebInspector setWebFrame:]):
2993         (-[WebInspector showWindow:]):
2994         * WebKit.exp:
2995         * WebKit.xcodeproj/project.pbxproj:
2996
2997 2007-06-20  Adam Roben  <aroben@apple.com>
2998
2999         Land the new Inspector.
3000
3001         Co-written with Tim Hatcher.
3002
3003         Reviewed by Anders, Adele, Hyatt, and Sam.
3004
3005         Implement the InspectorClient interface.
3006
3007         * WebCoreSupport/WebInspectorClient.h: Added.
3008         * WebCoreSupport/WebInspectorClient.mm: Added.
3009         (WebInspectorClient::WebInspectorClient):
3010         (WebInspectorClient::inspectorDestroyed):
3011         (WebInspectorClient::createPage):
3012         (WebInspectorClient::showWindow):
3013         (WebInspectorClient::closeWindow):
3014         (WebInspectorClient::attachWindow):
3015         (WebInspectorClient::detachWindow):
3016         (WebInspectorClient::highlight):
3017         (WebInspectorClient::hideHighlight):
3018         (WebInspectorClient::inspectedURLChanged):
3019         (WebInspectorClient::updateWindowTitle):
3020         (-[WebInspectorWindowController init]):
3021         (-[WebInspectorWindowController initWithInspectedWebView:]):
3022         (-[WebInspectorWindowController dealloc]):
3023         (-[WebInspectorWindowController inspectorVisible]):
3024         (-[WebInspectorWindowController webView]):
3025         (-[WebInspectorWindowController window]):
3026         (-[WebInspectorWindowController windowShouldClose:]):
3027         (-[WebInspectorWindowController close]):
3028         (-[WebInspectorWindowController showWindow:]):
3029         (-[WebInspectorWindowController attach]):
3030         (-[WebInspectorWindowController detach]):
3031         (-[WebInspectorWindowController highlightAndScrollToNode:]):
3032         (-[WebInspectorWindowController highlightNode:]):
3033         (-[WebInspectorWindowController hideHighlight]):
3034         (-[WebInspectorWindowController animationDidEnd:]):
3035
3036         Add an easier-to-see highlight.
3037
3038         * Misc/WebNSViewExtras.h:
3039         * Misc/WebNSViewExtras.m:
3040         (-[NSView _web_convertRect:toView:]):
3041         * WebInspector/WebNodeHighlight.h:
3042         * WebInspector/WebNodeHighlight.m:
3043         (-[WebNodeHighlightFadeInAnimation setCurrentProgress:]):
3044         (-[WebNodeHighlight initWithTargetView:]):
3045         (-[WebNodeHighlight setHighlightedNode:]):
3046         (-[WebNodeHighlight highlightedNode]):
3047         (-[WebNodeHighlight dealloc]):
3048         (-[WebNodeHighlight attachHighlight]):
3049         (-[WebNodeHighlight delegate]):
3050         (-[WebNodeHighlight detachHighlight]):
3051         (-[WebNodeHighlight show]):
3052         (-[WebNodeHighlight hide]):
3053         (-[WebNodeHighlight animationDidEnd:]):
3054         (-[WebNodeHighlight ignoresMouseEvents]):
3055         (-[WebNodeHighlight highlightView]):
3056         (-[WebNodeHighlight setDelegate:]):
3057         (-[WebNodeHighlight setHolesNeedUpdateInTargetViewRect:]):
3058         (-[WebNodeHighlight setIgnoresMouseEvents:]):
3059         (-[WebNodeHighlight targetView]):
3060         (-[WebNodeHighlight _computeHighlightWindowFrame]):
3061         (-[WebNodeHighlight _repositionHighlightWindow]):
3062         * WebInspector/WebNodeHighlightView.h:
3063         * WebInspector/WebNodeHighlightView.m:
3064         (-[WebNodeHighlightView initWithWebNodeHighlight:]):
3065         (-[WebNodeHighlightView dealloc]):
3066         (-[WebNodeHighlightView detachFromWebNodeHighlight]):
3067         (-[WebNodeHighlightView drawRect:]):
3068         (-[WebNodeHighlightView webNodeHighlight]):
3069         (-[WebNodeHighlightView fractionFadedIn]):
3070         (-[WebNodeHighlightView setFractionFadedIn:]):
3071         (-[WebNodeHighlightView setHolesNeedUpdateInRect:]):
3072         (-[WebNodeHighlightView _holes]):
3073
3074         WebView changes needed for the new Inspector.
3075
3076         * WebView/WebView.mm: Remove the old _inspectElement method now that
3077         this is handled by WebCore.
3078         (-[WebView _isClosed]): Added.
3079         (-[WebView initWithFrame]): Give each Page an InspectorClient to
3080         enable the Inspector.
3081         * WebView/WebViewPrivate.h:
3082
3083         Updates needed for WebCore changes.
3084
3085         * WebCoreSupport/WebContextMenuClient.h:
3086         * WebCoreSupport/WebContextMenuClient.mm:
3087         * WebCoreSupport/WebViewFactory.mm:
3088         (-[WebViewFactory contextMenuItemTagInspectElement]):
3089         * WebView/WebUIDelegatePrivate.h:
3090
3091         Remove old Inspector code.
3092
3093         * WebCoreSupport/WebFrameLoaderClient.mm:
3094         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
3095         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
3096         (WebFrameLoaderClient::dispatchDidFinishLoading):
3097         * WebInspector/WebInspector.m: Removed.
3098         * WebInspector/WebInspectorPanel.h: Removed.
3099         * WebInspector/WebInspectorPanel.m: Removed.
3100         * WebInspector/webInspector/Images/button.png: Removed.
3101         * WebInspector/webInspector/Images/buttonDivider.png: Removed.
3102         * WebInspector/webInspector/Images/buttonPressed.png: Removed.
3103         * WebInspector/webInspector/Images/close.png: Removed.
3104         * WebInspector/webInspector/Images/closePressed.png: Removed.
3105         * WebInspector/webInspector/Images/downTriangle.png: Removed.
3106         * WebInspector/webInspector/Images/menu.png: Removed.
3107         * WebInspector/webInspector/Images/menuPressed.png: Removed.
3108         * WebInspector/webInspector/Images/popup.png: Removed.
3109         * WebInspector/webInspector/Images/popupPressed.png: Removed.
3110         * WebInspector/webInspector/Images/resize.png: Removed.
3111         * WebInspector/webInspector/Images/rightTriangle.png: Removed.
3112         * WebInspector/webInspector/Images/scrollThumbBottom.png: Removed.
3113         * WebInspector/webInspector/Images/scrollThumbMiddle.png: Removed.
3114         * WebInspector/webInspector/Images/scrollTrackBottom.png: Removed.
3115         * WebInspector/webInspector/Images/upTriangle.png: Removed.
3116         * WebInspector/webInspector/inspector.css: Removed.
3117         * WebInspector/webInspector/inspector.html: Removed.
3118         * WebInspector/webInspector/inspector.js: Removed.
3119         * WebInspector/webInspector/scrollarea.js: Removed.
3120         * WebInspector/webInspector/scrollbar.js: Removed.
3121         * WebInspector/webInspector/utilities.js: Removed.
3122         * WebView/WebFrame.mm:
3123         (-[WebFramePrivate dealloc]):
3124         * WebView/WebFrameInternal.h:
3125         * WebView/WebHTMLView.mm:
3126         (-[WebHTMLView menuForEvent:]):
3127
3128         Build-fu:
3129
3130         * WebKit.exp:
3131         * WebKit.xcodeproj/project.pbxproj:
3132
3133 2007-06-20  Justin Garcia  <justin.garcia@apple.com>
3134
3135         Reviewed by Darin.
3136         
3137         <rdar://problem/5263541> REGRESSION (Safari 3 Beta 1): Pressing Delete doesn't delete an HTML message in Mail
3138         
3139         Mail wasn't receiving the keyDown event because WebFrameView was blocking it.
3140         It blocks the event and moves back/forward on Delete/Shift+Delete if the
3141         back/forward list is enabled.
3142
3143         * WebView/WebFrameView.mm:
3144         (-[WebFrameView keyDown:]): Check to see if the BackForwardList is
3145         enabled.  It always exists.
3146
3147 2007-06-19  Anders Carlsson  <andersca@apple.com>
3148
3149         Reviewed by Kevin Decker.
3150
3151         <rdar://problem/5266289> REGRESSION (Safari 3 Beta 1): Incoming iChat messages are delayed
3152
3153         * WebView/WebDocumentLoaderMac.mm:
3154         (needsAppKitWorkaround):
3155         New function which checks if the frame load delegate belongs to AppKit.
3156         
3157         (WebDocumentLoaderMac::setDataSource):
3158         If the frame load delegate belongs to AppKit, set m_deferMainResourceDataLoad to false.
3159
3160 2007-06-19  John Sullivan  <sullivan@apple.com>
3161
3162         Reviewed by Tim Hatcher
3163
3164         - fixed <rdar://problem/5272011> Hole for find-on-page match in subframe isn't clipped by frame bounds
3165
3166         * WebView/WebView.mm:
3167         (-[WebView rectsForTextMatches]):
3168         intersect the HTMLView's computed rect with the visible rect for that view
3169
3170 2007-06-19  Jim Correia  <jim.correia@pobox.com>
3171
3172         Reviewed by Kevin Decker
3173         
3174         * Carbon/HIWebView.m:
3175         (WindowHandler): HIObjectIsOfClass requires non-NULL input on Tiger. Reworked Kevin Decker's patch to remove the conditional compilation for Tiger, yet still avoid crashing BBEdit.
3176
3177 2007-06-18  Sam Weinig  <sam@webkit.org>
3178
3179         Reviewed by Beth.
3180
3181         Build fix.
3182
3183         * WebCoreSupport/WebChromeClient.mm:
3184
3185 2007-06-18  Kevin Decker <kdecker@apple.com>
3186
3187         * Carbon/HIWebView.m:
3188         (WindowHandler): Fixed the Tiger build; ControlKind wasn't defined.
3189
3190 2007-06-18  Kevin Decker  <kdecker@apple.com>
3191
3192         Reviewed by Tim Hatcher.
3193
3194         Fixed: <rdar://problem/5276135> With Safari 3 Tiger Beta installed, a crash occurs in BBEdit while mousing down and dragging outside of HTML preview window
3195
3196         * Carbon/HIWebView.m:
3197         (WindowHandler): Because the fix for 5051616 causes Tiger to crash in HIToolbox (but not on Leopard), I reverted back to using GetControlKind
3198         on Tiger only, instead of HIObjectIsOfClass.
3199
3200 2007-06-16  David Hyatt  <hyatt@apple.com>
3201
3202         Back out fix for 13972.  Quicktime will no longer clip correctly. :(
3203         Too many regressions in Mail caused by inserting an extra view into the
3204         hierarchy.  Can revisit later.
3205
3206         Reviewed by olliej
3207
3208         * Plugins/WebPluginController.mm:
3209         (-[WebPluginController destroyPlugin:]):
3210         (-[WebPluginController destroyAllPlugins]):
3211         * WebCoreSupport/WebFrameBridge.mm:
3212         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
3213         * WebView/WebHTMLView.mm:
3214         (-[WebHTMLView addSubview:]):
3215         (-[WebHTMLView willRemoveSubview:]):
3216
3217 2007-06-15  Sam Weinig  <sam@webkit.org>
3218
3219         Reviewed by Darin.
3220
3221         Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
3222         Autogenerate JS binding for Rect
3223
3224         - Fix conflicts by using ::Rect instead of Rect.
3225
3226         * Plugins/WebBaseNetscapePluginView.mm:
3227         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3228         (-[WebBaseNetscapePluginView sendEvent:]):
3229         (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
3230         (-[WebBaseNetscapePluginView invalidateRegion:]):
3231         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
3232
3233 2007-06-15  Anders Carlsson  <andersca@apple.com>
3234
3235         Reviewed by Kevin.
3236
3237         A better fix for <rdar://problem/5271774>. Only try to access the element if the
3238         view has an associated window. This also works with GC. (Fix suggested by Kevin.)
3239
3240         * Plugins/WebKitPluginContainerView.mm:
3241         (-[WebKitPluginContainerView dealloc]):
3242         (-[WebKitPluginContainerView visibleRect]):
3243
3244 2007-06-15  Anders Carlsson  <andersca@apple.com>
3245
3246         Reviewed by Kevin.
3247
3248         <rdar://problem/5271774> REGRESSION: A crash occurs when closing a window that contains a QT movie
3249         
3250         In some cases, calling [super dealloc] might end up calling visibleRect, so make sure to
3251         set _element to 0 so we won't send a message to a freed object and crash.
3252         
3253         * Plugins/WebKitPluginContainerView.mm:
3254         (-[WebKitPluginContainerView dealloc]):
3255         (-[WebKitPluginContainerView visibleRect]):
3256
3257 2007-06-14  Anders Carlsson  <andersca@apple.com>
3258
3259         Reviewed by Geoff.
3260
3261         Call cleanupScriptObjectsForPlugin on the frame after destroying the plug-in.
3262         
3263         * Plugins/WebBaseNetscapePluginView.mm:
3264         (-[WebBaseNetscapePluginView _destroyPlugin]):
3265         * Plugins/WebPluginController.mm:
3266         (-[WebPluginController destroyPlugin:]):
3267         (-[WebPluginController destroyAllPlugins]):
3268
3269 2007-06-13  John Sullivan  <sullivan@apple.com>
3270
3271         Reviewed by Adele Peterson
3272         
3273         - fixed <rdar://problem/5267607> Clicking the "Save to Downloads" button in 
3274           PDF overlay too soon results in corrupt file
3275
3276         * WebView/WebPDFView.mm:
3277         (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
3278         Just beep if the document isn't available yet, since trying to save it as a file
3279         really isn't a good idea.
3280
3281 2007-06-12  Oliver Hunt  <oliver@apple.com>
3282
3283         Reviewed by Darin.
3284
3285         Use correct size for BITMAPINFOHEADER -- whoops.
3286
3287         * win/WebIconDatabase.cpp:
3288         (createDIB):
3289         (WebIconDatabase::getOrCreateDefaultIconBitmap):
3290
3291 2007-06-10  David Hyatt  <hyatt@apple.com>
3292
3293         Fix for bug 14037, make sure respondsToSelector does the write thing
3294         when invoked on a WebKit plugin's container view.
3295
3296         Reviewed by Mark Rowe
3297
3298         * Plugins/WebKitPluginContainerView.mm:
3299         (-[WebKitPluginContainerView respondsToSelector:]):
3300
3301 2007-06-08  John Sullivan  <sullivan@apple.com>
3302
3303         * WebView/WebViewPrivate.h:
3304         Added a FIXME
3305
3306 2007-06-07  Justin Garcia  <justin.garcia@apple.com>
3307
3308         Reviewed by Tristan.
3309         
3310         <rdar://problem/5250997> A crash occurs when selecting Undo Typing for a page that has been closed in tab
3311
3312         * WebView/WebView.mm:
3313         (-[WebView _clearUndoRedoOperations]): Added.
3314         * WebView/WebViewPrivate.h:
3315
3316 2007-06-07  Oliver Hunt  <oliver@apple.com>
3317
3318         Reviewed by Sam "The Intern" Weinig.
3319         
3320         Don't be overzealous with the input checks, firstRectForCharacterRange
3321         can be determined even when there is not an active editable region.
3322         
3323         This unbreaks editing/input/range-for-empty-document which was broken
3324         by aforementioned overzealousness. 
3325
3326         * WebView/WebHTMLView.mm:
3327         (-[WebHTMLView firstRectForCharacterRange:]):
3328
3329 2007-06-07  Oliver Hunt  <oliver@apple.com>
3330
3331         Reviewed by Justin.
3332         
3333         Add checks to make sure we don't try to create, use
3334         or return invalid ranges to TSM when it calls us despite
3335         not currently being in an editable region.
3336
3337         * WebView/WebHTMLView.mm:
3338         (isTextInput):
3339         (-[WebHTMLView textStorage]):
3340         (-[WebHTMLView firstRectForCharacterRange:]):
3341         (-[WebHTMLView selectedRange]):
3342         (-[WebHTMLView attributedSubstringFromRange:]):
3343
3344 2007-06-06  David Hyatt  <hyatt@apple.com>
3345
3346         Make sure to hand back a script object for webkit plugins (the container
3347         view forwards to its plugin child).
3348
3349         Reviewed by sullivan
3350
3351         * Plugins/WebKitPluginContainerView.h:
3352         * Plugins/WebKitPluginContainerView.mm:
3353         (-[WebKitPluginContainerView objectForWebScript]):
3354
3355 2007-06-06  David Hyatt  <hyatt@apple.com>
3356
3357         Fix for bug 13972, quicktime doesn't respect CSS clip and overflow properties.
3358         Make sure that calls to [NSView visibleRect] will do the right thing for both
3359         Netscape plugins and WebKit plugins.
3360
3361         Reviewed by olliej
3362
3363         * Plugins/WebBaseNetscapePluginView.mm:
3364         (-[WebBaseNetscapePluginView visibleRect]):
3365         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3366         (-[WebBaseNetscapePluginView isOpaque]):
3367         * Plugins/WebKitPluginContainerView.h: Added.
3368         * Plugins/WebKitPluginContainerView.mm: Added.
3369         (-[WebKitPluginContainerView initWithFrame:DOMElement:]):
3370         (-[WebKitPluginContainerView dealloc]):
3371         (-[WebKitPluginContainerView visibleRect]):
3372         * Plugins/WebPluginController.mm:
3373         (-[WebPluginController destroyAllPlugins]):
3374         * WebCoreSupport/WebFrameBridge.mm:
3375         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
3376         * WebKit.xcodeproj/project.pbxproj:
3377         * WebView/WebHTMLView.mm:
3378         (-[WebHTMLView addSubview:]):
3379         (-[WebHTMLView willRemoveSubview:]):
3380
3381 2007-06-04  Oliver Hunt  <oliver@apple.com>
3382
3383         Reviewed by Geoff and Justin.
3384
3385         Fix for <rdar://problem/5246941> Clicking URL field on 
3386         Safari causes halt for a minute when using input methods.
3387         and <rdar://problem/5245964> Safari hangs for several 
3388         seconds when trying to select text using mouse
3389         
3390         This is a by product of the textStorage hack used to fix 
3391         rdar://problem/5000470 -- TSM calls textStorage repeatedly
3392         when changing focus, on certain mouse events, etc.  If there
3393         is no selection/editable region we repeatedly create an     
3394         NSAttributedString from the full document.  If the document is
3395         sufficiently long this starts consuming an inordinate amount of 
3396         time.
3397         
3398         This check should really have been present in the original 
3399         patch.
3400
3401         * WebKit.xcodeproj/project.pbxproj:
3402         * WebView/WebHTMLView.mm:
3403         (-[WebHTMLView textStorage]):
3404
3405 2007-05-31  David Hyatt  <hyatt@apple.com>
3406
3407         Fix for 11768, Flash plugin does not respect clips set by CSS.
3408
3409         Reviewed by olliej
3410
3411         * Plugins/WebBaseNetscapePluginView.mm:
3412         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3413
3414 2007-05-30  Mark Rowe  <mrowe@apple.com>
3415
3416         Build fixes after r21889.
3417
3418         * ForwardingHeaders/kjs/function.h: Added.
3419
3420 2007-05-29  Mark Rowe  <mrowe@apple.com>
3421
3422         Reviewed by Geoff.
3423
3424         64-bit build fix.  Ensure that use of WebNSUInteger in headers is matched by WebNSUInteger in implementations.
3425
3426         * DefaultDelegates/WebScriptDebugServer.h:
3427         * DefaultDelegates/WebScriptDebugServer.m:
3428         (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
3429         (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
3430         * DefaultDelegates/WebScriptDebugServerPrivate.h:
3431         * History/WebBackForwardList.mm:
3432         (-[WebBackForwardList setPageCacheSize:]):
3433         (-[WebBackForwardList pageCacheSize]):
3434         * WebView/WebView.mm:
3435         (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
3436
3437 2007-05-26  Darin Adler  <darin@apple.com>
3438
3439         Reviewed by Tim Hatcher.
3440
3441         * MigrateHeaders.make: Added dependency on this makefile itself, which is
3442         useful when you change the sed command or other aspect of this file. My build
3443         failed until I made this fix.
3444
3445 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
3446
3447         Reviewed by Darin Adler.
3448
3449         Fixed <rdar://problem/5055182> The page cache has no global cap.
3450         
3451         The main WebKit changes are:
3452             1. Changed -[WebBackForwardList setPageCacheSize] and -[WebBackForwardList 
3453             pageCacheSize] to accomodate the new global page cache model, updating
3454             their documentation. 
3455             
3456             2. Added -[WebPreferences setShouldUsePageCache] and -[WebPreferences 
3457             shouldUsePageCache] as pending public API.
3458             
3459             3. Centralized calculation of object cache and page cache sizes inside
3460             WebPreferences. 
3461             
3462             Cchanged our old behavior of reading a preference and applying a fudge 
3463             factor with a new behavior of just using the preference directly. The 
3464             old behavior was confusing and often inappropriate. (For example, if 
3465             you set a page cache size of 100, a 256MB machine would somewhat 
3466             arbitrarily reduce that number to 98. ???)
3467
3468         * WebView/WebView.mm: Added support for two flags to determine whether
3469         to use the page cache. If either -[WebBackForwardList setPageCacheSize:0]
3470         or -[WebPreferences setShouldUsePageCache:NO] is called, we don't use
3471         the page cache.
3472
3473 2007-05-25  Timothy Hatcher  <timothy@apple.com>
3474
3475         Reviewed by Kevin Decker.
3476
3477         <rdar://problem/5219089> Changes for migration of DictionaryServices
3478
3479         * WebView/WebHTMLView.mm:
3480         (-[WebHTMLView _lookUpInDictionaryFromMenu:]): look for the HIDictionaryWindowShow symbol in HIToolbox
3481
3482 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
3483
3484         Reviewed by Oliver Hunt.
3485         
3486         Fixed global initializer (like you fix a dog).
3487         
3488         I'm not sure how our script missed this. I tested, and it generally doesn't 
3489         seem to work very well.
3490
3491         * WebView/WebHTMLView.mm: Allocate lazily to avoid the performance hit of
3492         a global initializer.
3493         (promisedDataClient):
3494         (-[WebHTMLViewPrivate dealloc]):
3495         (-[WebHTMLViewPrivate clear]):
3496         (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
3497
3498 2007-05-25  Brady Eidson  <beidson@apple.com>
3499
3500         Reviewed by Darin
3501
3502         <rdar://problem/5228371> - REGRESSION - Certain mail message bodies display as empty
3503
3504         This is due to http://trac.webkit.org/projects/webkit/changeset/21480 which unintentionally
3505         made applewebdata urls result in check.call(false) instead of check.call(true)
3506
3507         Best place for a fix is to have the FrameLoaderClient::canHandleRequest() call return true, which
3508         really is rooted in WebView
3509
3510         <rdar://problem/5229587> tracks adding a layout test
3511
3512         * WebView/WebView.mm:
3513         (+[WebView _canHandleRequest:]): Return true for applewebdata URLs
3514
3515 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
3516
3517         Reviewed by Darin Adler, Tim Hatcher.
3518         
3519         "unsigned" => "WebNSUInteger" in public API.
3520
3521         * History/WebBackForwardList.h:
3522         * WebView/WebScriptDebugDelegate.h:
3523         * WebView/WebUIDelegate.h:
3524         * WebView/WebViewPrivate.h:
3525
3526 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
3527
3528         Reviewed by Darin Adler.
3529         
3530         Moved JavaScriptCore-related pending public API to public API.
3531
3532         * MigrateHeaders.make: Hack to prevent <JavaScriptCore/JSBase.h> from 
3533         automatically converting to <WebKit/JSBase.h>
3534         
3535         Moved -windowObject and -globalContext
3536
3537         * WebView/WebFramePrivate.h: from here
3538         * WebView/WebFrame.h: to here
3539         * WebView/WebFrame.mm: and out of its temporary category
3540
3541         Moved -didClearWindowObject:forFrame:
3542
3543         * WebView/WebViewPrivate.h: from here
3544         * WebView/WebFrameLoadDelegate.h: to here
3545
3546 2007-05-25  John Sullivan  <sullivan@apple.com>
3547
3548         Reviewed by Anders and Tim
3549         
3550         - fixed <rdar://problem/5226000> REGRESSION: In Gmail and Mail, a hang occurs when attempting 
3551           to grammar/spellcheck a word in a reply
3552
3553         * WebCoreSupport/WebEditorClient.mm:
3554         (WebEditorClient::checkGrammarOfString):
3555         Fixed recently-introduced false assumption that NSNotFound == -1
3556
3557 2007-05-24  dethbakin  <bdakin@apple.com>
3558
3559         Reviewed by Geoff.
3560
3561         Fix for <rdar://problem/5023545> QuickBooks Pro 2007:hang/crash 
3562         after closing QuickBooks Tutorial Center with Leopard9A377
3563
3564         We can hit a race condition where drawRect will be called after the 
3565         WebView has closed. Quickbooks does not properly close the WebView 
3566         and set the UIDelegate to nil, so the UIDelegate is stale and we 
3567         crash. This is a regression because the code that uses the 
3568         UIDelegate in the drawRect code path was only added recently. The 
3569         method that the UIDelegate calls into is new -- it does not exist 
3570         on Tiger -- so there is no harm in not running this code for 
3571         applications linked against older WebKits. Other applications may 
3572         run into this same bug so I am not doing a bundle 
3573         check...particularly because, as I mentioned, the new UIDelegate 
3574         call would not be implemented by older clients anyway.  
3575
3576         * Misc/WebKitVersionChecks.h:
3577         * WebView/WebHTMLView.mm:
3578         (-[WebHTMLView drawSingleRect:]):
3579
3580 2007-05-24  Darin Adler  <darin@apple.com>
3581
3582         * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
3583
3584 2007-05-24  Oliver Hunt  <oliver@apple.com>
3585
3586         Reviewed by Adam, Darin, and Geoff.
3587
3588         Fix for <rdar://problem/5000470> REGRESSION: The IM reconvert
3589         function returns incorrect symbol due to inconsistent range
3590         domains in TSM
3591
3592         Text Services Management uses ranges provided by the
3593         NSTextInput API to index into the string return by
3594         -[WebHTMLView string]. As a result some input methods
3595         incorrectly get their candidate text from the beginning
3596         of the document instead of from the input element.
3597
3598         TSM prefers to query -textStorage over -string so as a
3599         workaround we provide an implementation of -textStorage that
3600         returns the content of the current text input.  TSM only ever
3601         queries the result of textStorage as an NSAttributedString so
3602         we do not need to implement a fake NSTextStorage class
3603
3604         This should not cause harm to anything else as textStorage is
3605         actually a method on NSTextView, which we clearly are not. TSM
3606         only queries the method because it uses respondsToSelector to
3607         control behaviour.
3608
3609         * WebView/WebHTMLView.mm:
3610         (-[WebHTMLView textStorage]):
3611
3612
3613 2007-05-24  David Harrison  <harrison@apple.com>
3614
3615         Reviewed by Tim Hatcher.
3616
3617         <rdar://problem/5225343> REGRESSION: With View Source window opened, navigating to a different URL in the browser window results in a crash at WebCore::FrameLoader::frameHasLoaded()
3618         
3619         _private->loader->frameLoader() was not being nil checked.
3620         * WebView/WebDataSource.mm:
3621         (-[WebDataSource request]):
3622         Add nil check for _private->loader->frameLoader() 
3623
3624 2007-05-23  Anders Carlsson  <andersca@apple.com>
3625
3626         Reviewed by Geoff.
3627
3628         <rdar://problem/3663808> Resize large images to fit in the browser window
3629         
3630         Add new WebPreferences SPI.
3631         
3632         * WebView/WebPreferenceKeysPrivate.h:
3633         * WebView/WebPreferences.m:
3634         (+[WebPreferences initialize]):
3635         (-[WebPreferences enableAutomaticImageResizing]):
3636         (-[WebPreferences setEnableAutomaticImageResizing:]):
3637         * WebView/WebPreferencesPrivate.h:
3638         * WebView/WebView.mm:
3639         (-[WebView _updateWebCoreSettingsFromPreferences:]):
3640
3641 2007-05-23  Sam Weinig  <sam@webkit.org>
3642
3643         Reviewed by Darin.
3644
3645         Patch for http://bugs.webkit.org/show_bug.cgi?id=13830
3646         Auto-generate JS DOM bindings for HTMLDocument and most of the rest
3647         of HTMLElement
3648
3649         * MigrateHeaders.make: add DOMHTMLDocumentPrivate.h
3650         * WebKit.xcodeproj/project.pbxproj:
3651
3652 2007-05-23  Oliver Hunt  <oliver@apple.com>
3653
3654         Reviewed by Geoff.
3655
3656         Fix for <rdar://problem/5223782> REGRESSION: Can't drag and drop a standalone image
3657
3658         The main resource for a standalone image webarchive has the same mimetype as the
3659         underlying image.
3660
3661         * Misc/WebNSPasteboardExtras.mm:
3662         (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
3663
3664 2007-05-22  Sam Weinig  <sam@webkit.org>
3665
3666         Reviewed by Adam.
3667
3668         Patch for http://bugs.webkit.org/show_bug.cgi?id=13833
3669         Add ObjC DOM binding for HTMLMarqeeElement
3670
3671         - Also adds missing DOMHTMLFramePrivate.
3672
3673         * MigrateHeaders.make:
3674
3675 2007-05-22  Darin Adler  <darin@apple.com>
3676
3677         Reviewed by Geoff.
3678
3679         * WebInspector/webInspector/treeoutline.js: Use ownerDocument instead of non-standard
3680         document property.
3681
3682 2007-05-22  Adele Peterson  <adele@apple.com>
3683
3684         Reviewed by Darin.
3685
3686         Adding some asserts to help detect other cases of <rdar://problem/5171145>
3687
3688         * WebCoreSupport/WebFrameBridge.mm: (-[WebFrameBridge makeFirstResponder:]):
3689
3690 2007-05-22  Brady Eidson  <beidson@apple.com>
3691
3692         Reviewed by Kevin (Sarge)
3693
3694         <rdar://problem/5219885> - Crash after closing a inline popup ad at http://news.yahoo.com/
3695
3696         This regressed in http://trac.webkit.org/projects/webkit/changeset/21618
3697
3698         * WebView/WebFrame.mm:
3699         (-[WebFrame dataSource]): Null check the frameloader
3700
3701 2007-05-21  Adele Peterson  <adele@apple.com>
3702
3703         Fix by Darin, reviewed by me.
3704
3705         Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
3706
3707         * WebView/WebFrameView.mm: (-[WebFrameView _setDocumentView:]): If the old view is the first responder,
3708         then set the window's first responder to nil so we don't leave the window pointing to a view that's no longer in it.
3709
3710 2007-05-21  Brady Eidson  <beidson@apple.com>
3711
3712         Making the importance of my last change more clear
3713
3714         * WebView/WebViewPrivate.h: "Leave for Dashboard, people!"
3715
3716 2007-05-21  Brady Eidson  <beidson@apple.com>
3717
3718         Reviewed by Kevin (Sarge)
3719
3720         <rdar://problem/5217124> - Re-add mistakenly removed SPI
3721
3722         * WebView/WebView.mm:
3723         (-[WebView handleAuthenticationForResource:challenge:fromDataSource:]):
3724         * WebView/WebViewPrivate.h:
3725
3726 2007-05-21  Anders Carlsson  <andersca@apple.com>
3727
3728         Reviewed by Ada.
3729
3730         <rdar://problem/5200816> REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )
3731         
3732         Null check the request.
3733         
3734         * WebView/WebView.mm:
3735         (+[WebView _canHandleRequest:]):
3736
3737 2007-05-19  Maciej Stachowiak  <mjs@apple.com>
3738
3739         Reviewed by Geoff.
3740         
3741         <rdar://problem/5205358> REGRESSION (r21367): All messages appear entirely blank when running Mail off of tip of tree WebKit
3742         
3743         The fix is to return nil from [WebFrame dataSource] when it has not loaded anything but the fake
3744         empty initial document. However, WebKit still needs the real data source internally, so I also
3745         added a [WebFrame _dataSource] method that skips this check, and made WebKit use it throughout.
3746
3747         * Misc/WebNSAttributedStringExtras.mm:
3748         (fileWrapperForElement):
3749         * Plugins/WebBaseNetscapePluginView.mm:
3750         (-[WebBaseNetscapePluginView dataSource]):
3751         * Plugins/WebNullPluginView.mm:
3752         (-[WebNullPluginView viewDidMoveToWindow]):
3753         * Plugins/WebPluginController.mm:
3754         (-[WebPluginController URLPolicyCheckReferrer]):
3755         * WebCoreSupport/WebFrameBridge.mm:
3756         (-[WebFrameBridge dataSource]):
3757         (-[WebFrameBridge redirectDataToPlugin:]):
3758         * WebCoreSupport/WebFrameLoaderClient.mm:
3759         (WebFrameLoaderClient::makeDocumentView):
3760         (WebFrameLoaderClient::forceLayoutForNonHTML):
3761         (WebFrameLoaderClient::prepareForDataSourceReplacement):
3762         (WebFrameLoaderClient::canCachePage):
3763         * WebCoreSupport/WebViewFactory.mm:
3764         (-[WebViewFactory bridgeForView:]):
3765         * WebKit.xcodeproj/project.pbxproj:
3766         * WebView/WebArchiver.mm:
3767         (+[WebArchiver archiveFrame:]):
3768         (+[WebArchiver archiveMainResourceForFrame:]):
3769         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
3770         (+[WebArchiver archiveSelectionInFrame:]):
3771         * WebView/WebFrame.mm:
3772         (-[WebFrame _loadURL:referrer:intoChild:]):
3773         (-[WebFrame _addChild:]):
3774         (-[WebFrame _dataSource]):
3775         (-[WebFrame DOMDocument]):
3776         (-[WebFrame dataSource]):
3777         * WebView/WebFrameInternal.h:
3778         * WebView/WebHTMLView.mm:
3779         (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
3780         * WebView/WebRenderNode.mm:
3781         (-[WebRenderNode initWithWebFrameView:]):
3782         * WebView/WebView.mm:
3783         (-[WebView _mainFrameOverrideEncoding]):
3784         (-[WebView mainFrameURL]):
3785         (-[WebView mainFrameTitle]):
3786         (-[WebView mainFrameIcon]):
3787         (-[WebView validateUserInterfaceItemWithoutDelegate:]):
3788         (-[WebView replaceSelectionWithArchive:]):
3789         (-[WebView _isLoading]):
3790         (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:newScaleFactor:]):
3791         (-[WebView _notifyTextSizeMultiplierChanged]):
3792
3793 2007-05-18  Oliver Hunt  <oliver@apple.com>
3794
3795         Reviewed by Sam.
3796
3797         Fix for http://bugs.webkit.org/show_bug.cgi?id=13782 
3798         REGRESSION (r21528-r21533): Failing editing/selection/drag-in-iframe in pixel mode
3799         
3800         r21533 made used a DOMElement as the source for promise data, this meant it had to 
3801         clear the dragging pasteboard following the drag.  In DRT a drag is non-blocking
3802         so this resulted in us prematurely clearing the pasteboard.  
3803         
3804         This patch avoids this problem by referencing the source CachedImage rather than the
3805         DOMElement, so we don't need to worry about retaining an entire document forever, so
3806         we don't need to clear the dragging pasteboard following the drag.
3807         
3808         * Misc/WebNSPasteboardExtras.mm:
3809         (imageFromElement):
3810           Extract the underlying CachedImage from a DOMElement
3811         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:source:]):
3812           Use a CachedImage instead of a DOMElement
3813           
3814         * WebCoreSupport/WebDragClient.mm:
3815         (WebDragClient::startDrag):
3816         
3817         * WebKit.xcodeproj/project.pbxproj:
3818         
3819         * WebView/WebHTMLView.mm:
3820         (-[WebHTMLViewPrivate dealloc]):
3821         (-[WebHTMLViewPrivate clear]):
3822         (-[WebHTMLView pasteboardChangedOwner:]):
3823         (-[WebHTMLView pasteboard:provideDataForType:]):
3824         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3825         (-[WebHTMLView WebCore::]):
3826         (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
3827           Use CachedImage rather than DOMElement as promised data source
3828           
3829         * WebView/WebHTMLViewInternal.h:
3830         * WebView/WebHTMLViewPrivate.h:
3831
3832 2007-05-18  Tristan O'Tierney  <tristan@apple.com>
3833
3834         Reviewed by Brady E.
3835
3836         * WebCoreSupport/WebFrameLoaderClient.mm:
3837         (WebFrameLoaderClient::download):
3838         asked the webframeloaderclient for its webview's history and 
3839         injected the originated url into the created WebDownload
3840
3841 2007-05-18  John Sullivan  <sullivan@apple.com>
3842
3843         Reviewed by Kevin Decker
3844         
3845         Improvement to WebKit part of fix for 5201499 based on more modern understanding. (That is,
3846         a couple of hours more modern.)
3847
3848         * WebView/WebUIDelegatePrivate.h:
3849         add showPanel: parameter to just-introduced delegate method webView:saveFrameView:
3850
3851         * WebView/WebPDFView.mm:
3852         (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
3853         pass NO for new showPanel: parameter, and update comment
3854
3855 2007-05-18  Maciej Stachowiak  <mjs@apple.com>
3856
3857         Reviewed by John.
3858         
3859         <rdar://problem/5204792> REGRESSION (r21367): System widgets are drawn with vertical/horizontal scroll bars
3860         
3861         No test because the bug requires calling setAllowsScrolling: to reproduce.
3862
3863         * WebView/WebFrameView.mm:
3864         (-[WebFrameView setAllowsScrolling:]): Update the FrameView's scroll state as well as the one
3865         on WebDynamicScrollBarsView, otherwise this setting won't stick if the frame has already loaded
3866         a document.
3867
3868 2007-05-18  Geoffrey Garen  <ggaren@apple.com>
3869
3870         Fixed spelling error.
3871         
3872         * WebView/WebViewPrivate.h:
3873
3874 2007-05-18  John Sullivan  <sullivan@apple.com>
3875
3876         Reviewed by Kevin Decker
3877         
3878         WebKit part of fix for 5201499 (support for PDFKit UI for saving PDFs to disk)
3879         
3880         Also, the PDFKit mechanism for notifying clients about "Open File Externally" was
3881         changed from a notification to a delegate method. The notification was new to 
3882         Leopard, so removing it doesn't affect clients in the field.
3883
3884         * WebView/WebUIDelegatePrivate.h:
3885         Declared new UI delegate method webView:saveFrameView:, analogous to the existing
3886         webView:printFrameView:
3887
3888         * WebView/WebPDFView.mm:
3889         removed declaration of _webkit_PDFKitLaunchNotification
3890         (-[WebPDFView viewDidMoveToWindow]):
3891         don't observe _webkit_PDFKitLaunchNotification
3892         (-[WebPDFView viewWillMoveToWindow:]):
3893         ditto
3894         (-[WebPDFView PDFViewOpenPDFInNativeApplication:]):
3895         new PDFKit delegate method, replaces our use of _webkit_PDFKitLaunchNotification
3896         (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
3897         new PDFKit delegate method, calls through to new WebKit UI delegate method
3898         
3899 2007-05-17  Oliver Hunt  <oliver@apple.com>
3900
3901         Reviewed by Justin.
3902
3903         Fix for <rdar://problem/4244861> Safari fails to create image file
3904         after releasing dragged image that has changed on source page
3905
3906         This patch fixes this bug by manually creating an NSFileWrapper from
3907         the TIFF promise data for a drag if it is available.  This bypasses
3908         the problem of the required resource no longer being held due to page
3909         loads or other constraints.
3910         
3911         We need to leave the old path in place to allow for the case where
3912         the promised data is not available.
3913
3914         * WebCoreSupport/WebDragClient.mm:
3915         (WebDragClient::declareAndWriteDragImage):
3916           Always use the top WebHTMLView as the pasteboard owner, this is
3917           safe as we only use the owner for resolving promised types.
3918         * WebView/WebHTMLView.mm:
3919         (-[WebHTMLView _writeSelectionToPasteboard:]):
3920         (-[WebHTMLView writeSelectionToPasteboard:types:]):
3921           Always use the top WebHTMLView as the pasteboard owner.
3922         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3923           Add path to create NSFileWrapper from promise data.
3924
3925 2007-05-17  Oliver Hunt  <oliver@apple.com>
3926
3927         Reviewed by Adam.
3928         
3929         Fix for <rdar://problem/4343832> Trying to drag a large 6.2MB jpeg image
3930          out of Safari is unexpectedly slow (4 copies of image plus RTF document on pasteboard)
3931          
3932         This patch causes the construction of the RTF and TIFF data to be delayed until requested.
3933         
3934         We delay TIFF construction from a DOMElement as this may require generating TIFF data
3935         from the CachedImage, which is slow.  To allow the TIFF data to be created later the 
3936         it's necessary to add a reference to the source DOMElement to the view.
3937
3938         * Misc/WebNSPasteboardExtras.h:
3939         * Misc/WebNSPasteboardExtras.mm:
3940         (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
3941           Implements the delayed write of RTF data
3942         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:source:]):
3943           Set up the pasteboard to allow the data writing to be delayed
3944         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3945           Now we need to pass the WebHTMLView on to _web_writeImage:element:URL:title:archive:types:source:
3946         * WebCoreSupport/WebDragClient.mm:
3947         (WebDragClient::startDrag):
3948           Clear the dragging pasteboard once the drag has ended to ensure we don't hold references
3949           to anything longer than we need to.
3950         (WebDragClient::declareAndWriteDragImage):
3951           
3952         * WebView/WebHTMLView.mm:
3953         (-[WebHTMLViewPrivate dealloc]):
3954         (-[WebHTMLViewPrivate clear]):
3955         (-[WebHTMLView pasteboardChangedOwner:]):
3956           Make sure we clear out the DOMElement reference once it is no longer needed
3957         (-[WebHTMLView pasteboard:provideDataForType:]):
3958           Provide delayed data
3959         (-[WebHTMLView _writeSelectionToPasteboard:]):
3960           Make sure we set pasteboard ownership correctly
3961         (-[WebHTMLView promisedDragTIFFDataSource]):
3962         (-[WebHTMLView setPromisedDragTIFFDataSource:]):
3963         (-[WebHTMLView writeSelectionToPasteboard:types:]):
3964         * WebView/WebHTMLViewInternal.h:
3965         * WebView/WebHTMLViewPrivate.h:
3966         
3967         * WebView/WebView.mm:
3968         (-[WebView _writeImageForElement:withPasteboardTypes:toPasteboard:]):
3969
3970 2007-05-16  Anders Carlsson  <andersca@apple.com>
3971
3972         Reviewed by Darin.
3973
3974         <rdar://problem/5207156> Hamachi test tool causes assertion in FormCompletionController in Safari
3975
3976         Update for WebCore changes.
3977         
3978         * WebView/WebFrame.mm:
3979         (-[WebFrame _loadURL:referrer:intoChild:]):
3980
3981 2007-05-15  Oliver Hunt  <oliver@apple.com>
3982
3983         Reviewed by Sam and Geoff.
3984         
3985         Removing dead code left behind from drag and drop refactoring.
3986
3987         * WebCoreSupport/WebFrameBridge.mm:
3988         * WebView/WebHTMLView.mm:
3989         * WebView/WebHTMLViewPrivate.h:
3990
3991 2007-05-15  Bruce Q Hammond  <bruceq@apple.com>
3992
3993         Reviewed by Darin.
3994
3995         Correction of previous patch for http://bugs.webkit.org/show_bug.cgi?id=13578
3996         This corrects the sign of the Y-Axis origin adjustment.
3997
3998         * Plugins/WebBaseNetscapePluginView.mm:
3999         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
4000
4001 2007-05-15  Geoffrey Garen  <ggaren@apple.com>
4002
4003         Reviewed by Maciej Stachowiak.
4004         
4005         Patch: fixed <rdar://problem/5198890> .5% performance regression caused 
4006         by r21307
4007         
4008         The only code r21307 added that runs during the PLT is a frame load delegate
4009         -respondsToSelector: call inside windowObjectCleared(), so it seems like 
4010         our message dispatch overhead for the frame load delegate is significant.
4011         
4012         This patch is a straight port of Maciej's fix for the same problem in the
4013         resource load delegate. The solution is simple enough: don't use Objective-C. 
4014         Instead, use a special structure that caches which methods the delegate 
4015         implements, along with pointers to those methods.
4016         
4017         I verified each frame load delegate callback in the debugger, except for
4018         -webView:didFailLoadWithError:forFrame:, which is not implemented by Safari
4019         or DumpRenderTree.
4020
4021         * WebKit/DefaultDelegates/WebDefaultFrameLoadDelegate.h: Removed.
4022         * WebKit/DefaultDelegates/WebDefaultFrameLoadDelegate.m: Removed.
4023
4024         * WebCoreSupport/WebFrameBridge.mm:
4025         (-[WebFrameBridge windowObjectCleared]): I also removed a misleading 
4026         comment here. The JS debugger caches the windowScriptObject, so you do
4027         need to re-create the debugger every time you invalidate the old 
4028         WebScriptObject wrapper for the window object and create a new one, or
4029         the debugger will stop working. We could fix this in a number of ways, 
4030         but <rdar://problem/4608404> is not the key issue.
4031
4032 2007-05-15  Maciej Stachowiak  <mjs@apple.com>
4033
4034         Reviewed by Hyatt and Lars.
4035         
4036         - fixed <rdar://problem/5201758> REGRESSION: Stop button enabled and other problems caused by [WebView currentURL] returning non-nil for empty window
4037         
4038         * WebView/WebDataSource.mm:
4039         (-[WebDataSource request]): Return nil when we are still showing the initial empty doc
4040
4041 2007-05-14  Geoffrey Garen  <ggaren@apple.com>
4042
4043         Reviewed by Darin Adler.
4044         
4045         Updated for WebCore move to PageCache singleton. Also removed some WebCore::
4046         prefixes and replaced them with 'using namespace WebCore'.
4047
4048         * History/WebHistoryItem.mm:
4049         (+[WebHistoryItem _releaseAllPendingPageCaches]):
4050         (-[WebWindowWatcher windowWillClose:]):
4051
4052 2007-05-13  Darin Adler  <darin@apple.com>
4053
4054         - one more retain/release for a tiny bit more robustness
4055
4056         * WebView/WebPDFView.mm:
4057         (-[WebPDFView _updatePreferences:]): [prefs release]
4058         (-[WebPDFView _updatePreferencesSoon]): [prefs retain]
4059
4060 2007-05-13  Darin Adler  <darin@apple.com>
4061
4062         Reviewed by Geoff.
4063
4064         - fix <rdar://problem/5188400> Webkit crashes going back from PDF at perl.org site
4065
4066         * WebView/WebPDFView.h: Replace _updatePreferencesTimer with _willUpdatePreferencesSoon BOOL.
4067         Also remove unneeded @public that gives other classes access to our dataSource member.
4068
4069         * WebView/WebPDFView.mm: Rearrange top of file a bit, remove forward declaration of the
4070         _cancelUpdatePreferencesTimer method.
4071         (-[WebPDFView dealloc]): Removed call to _cancelUpdatePreferencesTimer.
4072         (-[WebPDFView _updatePreferencesNow:]): Added WebPreferences parameter. This sidesteps problems
4073         where the dataSource is no longer present by not looking at the dataSource field at all.
4074         Also removed the call to _cancelUpdatePreferencesTimer, added code to set _willUpdatePreferencesSoon
4075         to NO and added a release to balance a retain I did in _updatePreferencesSoon.
4076         (-[WebPDFView _updatePreferencesSoon]): Changed to use performSelectorAfterDelay instead of
4077         an NSTimer. Pass in the preferences object as a parameter, since we might not be able to get to
4078         the dataSource when the timer fires.
4079
4080 2007-05-10  Geoffrey Garen  <ggaren@apple.com>
4081
4082         Reviewed by Darin Adler.
4083         
4084         "IconDatabase::sharedIconDatabase()" => "iconDatabase()" for terseness.
4085
4086 2007-05-10  Adele Peterson  <adele@apple.com>
4087
4088         Reviewed by Hyatt.
4089
4090         WebKit part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result
4091
4092         Updated to use selectionRect instead of visibleSelectionRect.  selectionRect() now returns the visible rect by default.
4093
4094         * WebView/WebHTMLView.mm:
4095         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
4096         (-[WebHTMLView selectionImageRect]):
4097
4098 2007-05-10  dethbakin  <bdakin@apple.com>
4099
4100         Reviewed by Darin.
4101
4102         Fix for <rdar://problem/5191941> Leopard: Adobe Acrobat 8: 
4103         Distiller 8 needs same check fix as 4992521
4104
4105         * WebView/WebView.mm:
4106         (-[WebView _updateWebCoreSettingsFromPreferences:]): Adobe 
4107         Distiller needs the same quirk.
4108
4109 2007-05-10  Maciej Stachowiak  <mjs@apple.com>
4110
4111         Reviewed by Oliver.
4112
4113         - WebKit part of fix for:
4114         <rdar://problem/5063277> blank screen after login to Citibank Online (accessing document before frame starts loading cancels load)
4115         <rdar://problem/5159541> REGRESSION (r20972): Wall Street Journal pages replaced by advertisements (13465)
4116
4117         The basic approach is to have Frames start out containing an empty document instead of absolutely nothing,
4118         so there is no need to initialize them on demand. Various side effects of that cause both of these bugs.
4119         
4120         However, this caused many regressions so I had to fix the fallout.
4121
4122         * WebCoreSupport/WebChromeClient.mm:
4123         (WebChromeClient::takeFocus): Avoid focus cycle problems (can happen in DumpRenderTree
4124         with initial empty document now).
4125         * WebCoreSupport/WebFrameBridge.mm:
4126         (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]): init the frame.
4127         (-[WebFrameBridge determineObjectFromMIMEType:URL:]): return image type when appropriate
4128         * WebView/WebFrame.mm:
4129         (-[WebFrame stopLoading]): use stopForUserCancel().
4130         * WebView/WebFrameView.mm:
4131         (-[WebFrameView _makeDocumentViewForDataSource:]): assume html when no mime type available.
4132         * WebView/WebView.mm:
4133         (-[WebView becomeFirstResponder]): Track whether we are becoming first responder from
4134         outside the view.
4135         (-[WebView _becomingFirstResponderFromOutside]): Return this value.
4136         * WebView/WebViewInternal.h:
4137
4138 2007-05-09  Oliver Hunt  <oliver@apple.com>
4139
4140         rs=Adele.
4141
4142         The previous patch (r21346) broke editing, rolling out
4143
4144         * WebView/WebHTMLView.mm:
4145         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
4146         (-[WebHTMLView doCommandBySelector:]):
4147
4148 2007-05-09  Adele Peterson  <adele@apple.com>
4149
4150         Reviewed by Oliver.
4151         
4152         Re-applying fix for <rdar://problem/5107538> REGRESSION: Page scroll when selecting characters from inline input candidate window by arrow buttons
4153         http://bugs.webkit.org/show_bug.cgi?id=13263
4154         
4155         We don't need to call interpretKeyEvents for cmd-key events as
4156         they events will be interpreted by performKeyEquivalent.
4157
4158         * WebView/WebHTMLView.mm:
4159         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
4160         (-[WebHTMLView doCommandBySelector:]):
4161
4162 2007-05-09  Mark Rowe  <mrowe@apple.com>
4163
4164         Build fix to keep the buildbot happy.
4165
4166         * Plugins/WebBaseNetscapePluginView.mm:
4167         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
4168
4169 2007-05-08  Bruce Q Hammond  <bruceq@apple.com>
4170
4171         Reviewed by Darin.
4172
4173         http://bugs.webkit.org/show_bug.cgi?id=13578
4174         Bug 13578: When QD plugins draw to an offscreen bitmap the origin is not correct
4175
4176         Now we have correct handling of the origin when QD plugins draw to
4177         offscreen bitmaps.
4178         Also the clipping code for this path was doing unnecessary work which
4179         caused incorrect results; it has been removed.
4180         
4181         This change should not affect Safari and in general will only affect
4182         plugins (e.g. Flash) drawing to a CGBitmapContext.
4183
4184         * Plugins/WebBaseNetscapePluginView.mm:
4185         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
4186
4187 2007-05-08  Steve Falkenburg  <sfalken@apple.com>
4188
4189         Reviewed by Darin.
4190
4191         Implemented spelling/grammar related WebEditorClient methods.
4192
4193         * WebCoreSupport/WebEditorClient.h:
4194         * WebCoreSupport/WebEditorClient.mm:
4195         (WebEditorClient::ignoreWordInSpellDocument): Added. Call through to NSSpellChecker.
4196         (WebEditorClient::learnWord): Added. Call through to NSSpellChecker.
4197         (WebEditorClient::checkSpellingOfString): Added. Call through to NSSpellChecker.
4198         (WebEditorClient::checkGrammarOfString): Added. Call through to NSSpellChecker.
4199         (WebEditorClient::updateSpellingUIWithGrammarString): Added. Call through to NSSpellChecker.
4200         (WebEditorClient::updateSpellingUIWithMisspelledWord): Added. Call through to NSSpellChecker.
4201         (WebEditorClient::showSpellingUI): Added. Call through to NSSpellChecker.
4202         (WebEditorClient::spellingUIIsShowing): Added. Call through to NSSpellChecker.
4203         (WebEditorClient::getGuessesForWord): Added. Call through to NSSpellChecker.
4204
4205 2007-05-08  Steve Falkenburg  <sfalken@apple.com>
4206
4207         Reviewed by Ada.
4208
4209         Slight modification to last editor method fix.
4210
4211         * WebCoreSupport/WebEditorClient.h:
4212         (WebEditorClient::updateSpellingUIWithGrammarString):
4213
4214 2007-05-07  Geoffrey Garen  <ggaren@apple.com>
4215
4216         Reviewed by Maciej Stachowiak.
4217         
4218         Fixed <rdar://problem/5140447> API for fetching JSGlobalContextRef from 
4219         WebView or WebFrame
4220         
4221         Added -[WebFrame windowObject] and -[WebFrame globalContext], along with
4222         a new frame load delegate method, - (void)webView:(WebView *)webView 
4223         didClearWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame.
4224         This is all to support briding between the WebScriptObject and JavaScriptCore
4225         APIs.
4226
4227         Also fixed more of <rdar://problem/4395622> API: WebScriptObject.h incorrectly 
4228         reports that -isSelectorExcludedFromWebScript returns NO by default, and
4229         generally cleaned up the WebScriptObject headerdoc.
4230
4231         * WebCoreSupport/WebFrameBridge.mm:
4232         (-[WebFrameBridge windowObjectCleared]):
4233         * WebView/WebFrame.mm:
4234         (-[WebFrame windowObject]):
4235         (-[WebFrame globalContext]):
4236         * WebView/WebFramePrivate.h:
4237         * WebView/WebViewPrivate.h:
4238
4239 2007-05-07  Timothy Hatcher  <timothy@apple.com>
4240
4241         Reviewed by Darin.
4242
4243         <rdar://problem/5180384> webView:validateUserInterfaceItem:defaultValidation: does not get called on WebUIDelegates
4244
4245         Call the delegate when the one of our views gets a validateUserInterfaceItem: call.
4246
4247         * WebView/WebHTMLView.mm:
4248         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Validate without the delegate.
4249         (-[WebHTMLView validateUserInterfaceItem:]): Call the delegate with the result of validateUserInterfaceItemWithoutDelegate:.
4250         * WebView/WebPDFView.mm:
4251         (-[WebPDFView validateUserInterfaceItemWithoutDelegate:]): Validate without the delegate.
4252         (-[WebPDFView validateUserInterfaceItem:]): Call the delegate with the result of validateUserInterfaceItemWithoutDelegate:.
4253         * WebView/WebView.mm:
4254         (-[WebView _responderValidateUserInterfaceItem:]): Call validateUserInterfaceItemWithoutDelegate: to prevent asking the delegate twice.
4255         (-[WebView validateUserInterfaceItemWithoutDelegate:]): Validate without the delegate.
4256         (-[WebView validateUserInterfaceItem:]): Call the delegate with the result of validateUserInterfaceItemWithoutDelegate:.
4257
4258 2007-05-07  Brady Eidson  <beidson@apple.com>
4259
4260         Actually finish the code move from my last checkin
4261
4262         * History/WebHistoryItem.mm:
4263         (-[WebHistoryItem _transientPropertyForKey:]):
4264         (-[WebHistoryItem _setTransientProperty:forKey:]):
4265
4266 2007-05-07  Brady Eidson  <beidson@apple.com>
4267
4268         Rubberstamped by Kevin (Sarge)
4269
4270         Make _transientPropertyForKey: and _setTransientProperty:forKey: SPI
4271
4272         * History/WebHistoryItemInternal.h:
4273         * History/WebHistoryItemPrivate.h:
4274
4275 2007-05-04  Geoffrey Garen  <ggaren@apple.com>
4276
4277         Reviewed by Tim Hatcher.
4278
4279         First step in fixing <rdar://problem/5055182> The back cache has no global cap
4280
4281         Stop giving SnapBack infinite cache-ability. Instead, make SnapBack rely
4282         on the underlying back cache.
4283         
4284         I left -setAlwaysAttemptToUsePageCache: as an empty stub because we don't 
4285         want to break Safari 2.0, but I removed its header declaration so nobody 
4286         else starts using it.
4287
4288         * History/WebHistoryItem.mm:
4289         (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
4290         * History/WebHistoryItemPrivate.h:
4291
4292 2007-05-04  Geoffrey Garen  <ggaren@apple.com>
4293
4294         Reviewed by Brady Eidson.
4295         
4296         Some cleanup in preparation for fixing <rdar://problem/5055182> The 
4297         back/forward cache has no global cap
4298         
4299         Unified naming of WebKit/WebCore b/f lists -- instead of the potpourri 
4300         of webBackForwardList, backForwardList, list, kitList, coreList, listWrapper, 
4301         and webCoreBackForwardList, we use webBackForwardList for WebKit and 
4302         backForwardList for WebCore, matching their respective class names.
4303         
4304         Removed "private" versions of kit() and core() -- kit() and core() are
4305         canonically used for converting between WebKit API objects and WebCore
4306         API objects. I think it's clearer to have only one way to do this.
4307
4308         Removed COMPUTE_DEFAULT_PAGE_CACHE_SIZE, since it was unused.
4309         
4310         Removed _clearPageCache, since it was unused and it duplicated -setPageCacheSize:0.
4311
4312         Removed _usesPageCache, since it was unused and it duplicated -pageCacheSize.
4313
4314 2007-05-04  Brady Eidson  <beidson@apple.com>
4315
4316         Reviewed by Mark Rowe
4317
4318         Added main thread assertion to WebHTMLView to help make sure 3rd party clients aren't trying
4319         to draw on secondary threads
4320
4321         * WebView/WebHTMLView.mm:
4322         (-[WebHTMLView drawRect:]): Added ASSERT_MAIN_THREAD()
4323
4324 2007-05-04  Anders Carlsson  <andersca@apple.com>
4325
4326         Reviewed by Antti.
4327
4328         <rdar://problem/5179977> Use the correct URLs when dispatching delegate methods for data loads.
4329
4330         * WebView/WebFrame.mm:
4331         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
4332         If the base URL is nil, set it to "about:blank", and set the response URL to a generated applewebdata URL.
4333         
4334         * WebView/WebView.mm:
4335         (+[WebView _canHandleRequest:]):
4336         No need to special-case applewebdata URLs here anymore, they're only used in responses.
4337
4338 2007-05-03  Steve Falkenburg  <sfalken@apple.com>
4339
4340         Reviewed by Oliver.
4341
4342         Add missing user description parameter to spelling-related editor client method.
4343
4344         * WebCoreSupport/WebEditorClient.h:
4345         (WebEditorClient::updateSpellingUIWithGrammarString):
4346
4347 2007-05-03  TImothy Hatcher  <timothy@apple.com>
4348
4349         Reviewed by Kevin.
4350
4351         <rdar://problem/4975212> REGRESSION: With NetNewsWire 2.1.1, the contextual menu shows extra menu items when focus
4352         is placed in input or textarea field
4353
4354         The NetNewsWire UI delegate isn't expecting calls for form controls, so we need to do a linked-on-or-after check.
4355         If the application was linked against Tiger or earlier and the element is a text form control, just return the
4356         default menu items and bypass the delegate call completely.
4357
4358         * WebCoreSupport/WebContextMenuClient.mm:
4359         (isPreVersion3Client): Cache the result of the WebKitLinkedOnOrAfter call
4360         (fixMenusToSendToOldClients): Call the new isPreVersion3Client()
4361         (fixMenusReceivedFromOldClients): Ditto.
4362         (WebContextMenuClient::getCustomMenuFromDefaultItems): Return the default menu items if the element is a text form control.
4363
4364 2007-05-03  Mark Rowe  <mrowe@apple.com>
4365
4366         Reviewed by Geoff and Kevin.
4367
4368         <rdar://problem/5141290> WebAssertions.h is still needed by some internal clients
4369
4370         Second shot at fixing this error.  Stub out the macros rather than forwarding to JavaScriptCore, which would
4371         leave clients using this header trying to resolve JavaScriptCore symbols against WebKit when linking.  This
4372         should only happen in production builds when assertions should be disabled anyway as anyone building a
4373         development configuration should be in a position to move away from using this header.
4374
4375         * Misc/WebAssertions.h: 
4376
4377 2007-05-03  Timothy Hatcher  <timothy@apple.com>
4378
4379         Reviewed by Kevin.
4380
4381         <rdar://problem/5067707> REGRESSION: "Open Link" contextual menu item appears twice in Mail
4382
4383         Remove the check for Mail in fixMenusToSendToOldClients and fixMenusReceivedFromOldClients
4384         when linked on or after Leopard. The isAppleMail() function is still used for Tiger Mail fixups.
4385
4386         * WebCoreSupport/WebContextMenuClient.mm:
4387         (fixMenusToSendToOldClients):
4388         (fixMenusReceivedFromOldClients):
4389
4390 2007-05-02  Anders Carlsson  <andersca@apple.com>
4391
4392         Reviewed by Brady.
4393
4394         <rdar://problem/5151113> Assertion firing in [FrameProgressEntry addChild:forDataSource:] when navigating cnn.com
4395         
4396         The assertion fired because a plug-in was trying to load a subresource when a new load had started but not yet
4397         committed. The check that would have prevented this was removed in order to fix <rdar://problem/5085897>.
4398         
4399         This puts back the check but changes it to allow loads where the target is the same frame as the plugin's parent frame.
4400         
4401         * Plugins/WebBaseNetscapePluginView.mm:
4402         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
4403
4404 2007-04-27  Timothy Hatcher  <timothy@apple.com>
4405
4406         Reviewed by Darin.
4407
4408         There were only a couple calls to ResourceLoadDelegate forwarder left,
4409         this removes the calls and adds a new cached method for didFailLoad.
4410
4411         * WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.h: Removed.
4412         * WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.m: Removed.
4413         * WebKit/Plugins/WebNullPluginView.mm: Call the resource load delegate directly.
4414         * WebKit/WebCoreSupport/WebFrameLoaderClient.mm: Call the cached didFailLoad delegate function.
4415         * WebKit/WebKit.xcodeproj/project.pbxproj: Remove WebDefaultResourceLoadDelegate.
4416         * WebKit/WebView/WebDataSource.mm: Remove the #import for WebDefaultResourceLoadDelegate.h
4417         * WebKit/WebView/WebView.mm: Remove the ResourceLoadDelegate forwarder, and remove a method that isn't used.
4418         * WebKit/WebView/WebViewInternal.h: Ditto.
4419         * WebKit/WebView/WebViewPrivate.h: Remove a method that is no longer used.
4420
4421 2007-04-27  David Harrison  <harrison@apple.com>
4422
4423         Reviewed by Darin.
4424
4425         <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail
4426
4427         * WebKit.xcodeproj/project.pbxproj:
4428         * WebView/WebHTMLView.mm:
4429         (-[WebHTMLView _selectedRange]):
4430         (-[WebHTMLView _shouldDeleteRange:]):
4431         (-[WebHTMLView _canEdit]):
4432         (-[WebHTMLView _canEditRichly]):
4433         (-[WebHTMLView _hasSelection]):
4434         (-[WebHTMLView _hasSelectionOrInsertionPoint]):
4435         (-[WebHTMLView _hasInsertionPoint]):
4436         (-[WebHTMLView _isEditable]):
4437         Condense the check for nil [self frame].
4438         Remove canEditRichly checks and rely on the editor to do the check instead.
4439         
4440         (-[WebHTMLView _insertOrderedList]):
4441         (-[WebHTMLView _insertUnorderedList]):
4442         New.
4443         
4444         (-[WebHTMLView _canIncreaseSelectionListLevel]):
4445         (-[WebHTMLView _canDecreaseSelectionListLevel]):
4446         (-[WebHTMLView _increaseSelectionListLevel]):
4447         (-[WebHTMLView _increaseSelectionListLevelOrdered]):
4448         (-[WebHTMLView _increaseSelectionListLevelUnordered]):
4449         (-[WebHTMLView _decreaseSelectionListLevel]):
4450         Moved from bridge to frame editor.
4451
4452         * WebView/WebHTMLViewPrivate.h:
4453         Add _insertOrderedList and _insertUnorderedList to WebHTMLView(WebPrivate)
4454
4455 2007-04-27  Brady Eidson  <beidson@apple.com>
4456
4457         Rubberstamped by Mark
4458
4459         Remove default implementation of UIDelegate method that was removed
4460
4461         I have also been instructed to give Tim a hard time about this one - apparently
4462         it was his job to clean it out and he failed...  failed miserably.
4463
4464         :)
4465
4466         * DefaultDelegates/WebDefaultUIDelegate.m: Removed webViewPrint:
4467
4468 2007-04-27  Maciej Stachowiak  <mjs@apple.com>
4469
4470         Reviewed by Mark.
4471         
4472         <rdar://problem/5154113> Repro ASSERT (would be crash) in KJS::GCLock::GCLock (13462)
4473         http://bugs.webkit.org/show_bug.cgi?id=13462
4474
4475         * WebInspector/WebInspector.m:
4476         (-[WebInspectorPrivate dealloc]): Delay release of WebView to avoid GC re-entrancy.
4477
4478 2007-04-27  Anders Carlsson  <andersca@apple.com>
4479
4480         Reviewed by Mitz.
4481
4482         <rdar://problem/5165755>
4483         View Source is broken; empty window is shown
4484         
4485         Return YES for applewebdata URLs.
4486         
4487         * WebView/WebView.mm:
4488         (+[WebView _canHandleRequest:]):
4489
4490 2007-04-26  Oliver Hunt  <oliver@apple.com>
4491
4492         Reviewed by Adam.
4493
4494         Fix <rdar://problem/5061252> REGRESSION: In Gmail, image fails 
4495         to be inserted into message field after dragging
4496
4497         Don't try to create <img> tags for local image files as it results
4498         in the potential to submit forms that look like they have an image,
4499         when in reality they don't.
4500
4501         * WebView/WebHTMLView.mm:
4502         (-[WebHTMLView _documentFragmentWithPaths:]):
4503
4504 2007-04-26  Anders Carlsson  <andersca@apple.com>
4505
4506         Reviewed by Maciej.
4507
4508         <rdar://problem/5049099> documents no longer have a default base URL
4509         
4510         If the base URL is nil, then create a unique applewebdata URL to match what Tiger WebKit does.
4511         
4512         * WebView/WebFrame.mm:
4513         (createUniqueWebDataURL):
4514         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
4515
4516 2007-04-25  Oliver Hunt  <oliver@apple.com>
4517
4518         Rubber stamped by Adele.
4519
4520         Roll out WebKit changes from from r21052 to fix regression noted in
4521         <rdar://problem/5159556> REGRESSION: In Mail, pressing option-command- ' doesn't decrease block quote in selection
4522
4523         * WebView/WebHTMLView.mm:
4524         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
4525         (-[WebHTMLView doCommandBySelector:]):
4526
4527 2007-04-25  Steve Falkenburg  <sfalken@apple.com>
4528
4529         Reviewed by Adam.
4530
4531         Mac callbacks for new spelling methods in WebEditorClient.
4532         Not used yet.
4533
4534         * WebCoreSupport/WebEditorClient.h:
4535         (WebEditorClient::ignoreWordInSpellDocument):
4536         (WebEditorClient::learnWord):
4537         (WebEditorClient::checkSpellingOfString):
4538         (WebEditorClient::checkGrammarOfString):
4539         (WebEditorClient::updateSpellingUIWithGrammarString):
4540         (WebEditorClient::updateSpellingUIWithMisspelledWord):
4541         (WebEditorClient::showSpellingUI):
4542         (WebEditorClient::spellingUIIsShowing):
4543         (WebEditorClient::getGuessesForWord):
4544
4545 2007-04-24  Geoffrey Garen  <ggaren@apple.com>
4546
4547         Reviewed by Darin Adler, Tim Hatcher.
4548
4549         Fixed a few NSAutoreleasePool issues I noticed while reviewing Brady's patch.
4550
4551         * Carbon/CarbonUtils.m:
4552         (PoolCleaner): Call -drain instead of -release, since -release is a 
4553         no-op in a GC world.
4554
4555         * Misc/WebKitErrors.m:
4556         (registerErrors): Condensed onto one line.
4557
4558         * Plugins/WebPluginDatabase.m:
4559         (-[WebPluginDatabase refresh]): Call -drain instead of -release, since
4560         -release is a no-op in a GC world.
4561
4562         * WebCoreSupport/WebChromeClient.mm:
4563         (WebChromeClient::setStatusbarText):
4564
4565         * WebInspector/WebNodeHighlightView.m:
4566         (-[WebNodeHighlightView initWithHighlight:andRects:forView:]): Don't drain
4567         and then release because drain deallocates the receiver, so the release
4568         is an over-release.
4569
4570         * WebView/WebView.mm:
4571         (-[WebView rectsForTextMatches]): Re-allocate the pool after draining it,
4572         because drain deallocates the receiver, so the drain would leave you without
4573         any autorelease pool, causing a leak and then an over-release at the bottom
4574         of the loop.
4575
4576 2007-04-24  Brady Eidson  <beidson@apple.com>
4577
4578         Reviewed by Beth, Hyatt, Ada, and Darin
4579
4580         <rdar://problem/5011477> and <rdar://problem/5011514>
4581         Provide support for the icon.db to be moved to a different directory from the old WebKit-style
4582         icons, and remove the old directory if that is the case
4583
4584         * Misc/WebIconDatabase.mm:
4585         (-[WebIconDatabase init]):
4586         (-[WebIconDatabase _importToWebCoreFormat]): Check "imported()" to determine if a conversion is needed
4587           - Look for WebIconDatabaseImportDirectoryDefaultsKey for the source location for the conversion
4588           - Set "imported" to true in the Icons.db
4589           - If the new Icons.db isn't in the same patch as the old icons, delete the entire directory when finished
4590           - Move old icon.db to Icons.db to reflect rename
4591         * Misc/WebIconDatabasePrivate.h: Add WebIconDatabaseImportDirectoryDefaultsKey so a WebKit client can tell WebKit
4592           where to look for the old icons if their location is different from the icon.db
4593         * WebKit.exp:
4594
4595 2007-04-24  Mitz Pettel  <mitz@webkit.org>
4596
4597         Reviewed by Oliver Hunt.
4598
4599         Changed an apostrophe (') into a right single quotation mark (U+2019).
4600
4601         * WebInspector/webInspector/inspector.js:
4602
4603 2007-04-24  Mitz Pettel  <mitz@webkit.org>
4604
4605         Reviewed by Timothy Hatcher.
4606
4607         - fix http://bugs.webkit.org/show_bug.cgi?id=13459
4608           The "mapped style" link next to an attribute doesn't work
4609
4610         * WebInspector/webInspector/inspector.js: Added a check that the rule is
4611         mapped from an attribute.
4612
4613 2007-04-23  Adele Peterson  <adele@apple.com>
4614
4615         Fixed and reviewed by Darin, Adele, and Oliver.
4616
4617         WebKit part of fix for <rdar://problem/5107538> REGRESSION: Page scroll when selecting characters from inline input candidate window by arrow buttons
4618         http://bugs.webkit.org/show_bug.cgi?id=13263
4619
4620         * WebView/WebHTMLView.mm:
4621         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):  If we have no command after calling interpretKeyEvents, we assume the input method handled the key.
4622         (-[WebHTMLView doCommandBySelector:]): Add noop: to the command vector, but then when actually performing actions, ignore it.
4623
4624 2007-04-23  Timothy Hatcher  <timothy@apple.com>
4625
4626         Reviewed by Darin.
4627
4628         <rdar://problem/5124364> IB3 crashes when loading a nib containing a WebView that has a WebHTMLView encoded inside
4629
4630         Since WebView's initWithCoder throws away all the decoded subviews, the WebHTMLView gets dealoced while it has a nil _private pointer.
4631         Checking for a nil _private in WehHTMLView's close fixes this crash. No need to implement a full initWithCoder for WebHTMLView since
4632         it will be thrown away by the WebView anyway.
4633
4634         * WebView/WebHTMLView.mm:
4635         (-[WebHTMLView close]): Return earily if _priviate is nil.
4636         (-[WebHTMLView initWithFrame:]): Unrelated change that removes an AppKit version check that predates Tiger.
4637
4638 2007-04-23  Timothy Hatcher  <timothy@apple.com>
4639
4640         Reviewed by Mark Rowe.
4641
4642         Remove the "No Selection" message after leaving search mode.
4643         This was a regression caused by the inspector refresh.
4644
4645         * WebInspector/webInspector/inspector.js:
4646
4647 2007-04-23  Timothy Hatcher  <timothy@apple.com>
4648
4649         Reviewed by Darin.
4650
4651         Bug 6658: World leak when closing inspected window
4652         http://bugs.webkit.org/show_bug.cgi?id=6658 and <rdar://problem/4411863>
4653
4654         Removes over-retains of the inspector WebView, WebInspector and WebInspectorPanel.
4655
4656         * WebInspector/WebInspector.m:
4657         (+[WebInspector sharedWebInspector]): Return the global sharedWebInspector variable.
4658         (-[WebInspector window]): Release the window after calling setWindow:.
4659         (-[WebInspector windowWillClose:]): Set the JavaScript Inspector variable to null and expire the current highlight.
4660           Also clear the global sharedWebInspector variable and release it if self equals sharedWebInspector.
4661         (-[WebInspector showWindow:]): Set the JavaScript Inspector variable back to self.
4662         * WebInspector/WebInspectorInternal.h: Remove the isSharedInspector member variable.
4663         * WebView/WebView.mm:
4664         (-[WebView windowScriptObject]): Return nil if core([self mainFrame]) is NULL.
4665
4666 2007-04-23  Darin Adler  <darin@apple.com>
4667
4668         Reviewed by Hyatt.
4669
4670         - rename box-sizing to -webkit-box-sizing
4671
4672         * WebInspector/webInspector/inspector.css: Here.
4673         * WebInspector/webInspector/inspector.js: And here, in the expected default CSS values list.
4674
4675 2007-04-22  Timothy Hatcher  <timothy@apple.com>
4676
4677         Reviewed by Darin.
4678
4679         The fix for <rdar://problem/4976681> ASSERTION failure on quit @ talkcrunch.com in _NPN_ReleaseObject
4680         was #ifdefed out in Production builds.
4681
4682         * WebView/WebView.mm:
4683         (+[WebView initialize]): Move the #ifdef REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM inside initialize around the specific code
4684         (+[WebView _applicationWillTerminate]): Moved outside the #ifdef REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM block
4685
4686 2007-04-22  Timothy Hatcher  <timothy@apple.com>
4687
4688         Reviewed by Mitz.
4689
4690         Bug 13436: Make Option-clicking a disclosure triangle expand the entire subtree
4691         http://bugs.webkit.org/show_bug.cgi?id=13436
4692
4693         Makes option-click recursively expand and collapse the sub-tree. Pressing option-left
4694         and -right also recursively expands and collapses the sub-tree.
4695
4696         * WebInspector/webInspector/treeoutline.js:
4697
4698 2007-04-22  Timothy Hatcher  <timothy@apple.com>
4699
4700         Reviewed by Mitz.
4701
4702         Bug 13437: Inspector does not update when navigating to a different page
4703         http://bugs.webkit.org/show_bug.cgi?id=13437
4704
4705         * WebInspector/webInspector/inspector.js: Correctly update to a new root node
4706           if the new focus node and the old focus node don't have a common ancestor.
4707
4708 2007-04-22  Darin Adler  <darin@apple.com>
4709
4710         Reviewed by Adele.
4711
4712         - fix for <rdar://problem/5100240> REGRESSION: Control-O broken
4713
4714         * WebView/WebHTMLView.mm:
4715         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Update to handle a vector of
4716         command names instead of a single command.
4717         (-[WebHTMLView doCommandBySelector:]): Change logic so that we add the command to a vector
4718         and also so that the interpretKeyEvents parameters are still intact for a second call to
4719         doCommandBySelector:, since the key bindings mechanism can do more than one.
4720         (-[WebHTMLView insertText:]): Added comment.
4721
4722 2007-04-21  Darin Adler  <darin@apple.com>
4723
4724         Reviewed by Oliver.
4725
4726         - fix some problems I ran into using the inspector
4727
4728         * WebInspector/webInspector/inspector.js: Add some null checks.
4729
4730 2007-04-20  Timothy Hatcher  <timothy@apple.com>
4731
4732         Reviewed by Darin.
4733
4734         Merge over the WebInspectorRefresh branch. This change removes the NSOutlineView and
4735         is replaced with a HTML/JavaScript tree. Most of the inspector logic is now in the JavaScript.
4736
4737         A few bugs are fixed by these changes:
4738
4739         Bug 6615: Parent node drop-down list is upside-down
4740         http://bugs.webkit.org/show_bug.cgi?id=6615
4741
4742         Bug 6643: REGRESSION: Tree view repaints lines without erasing them first
4743         http://bugs.webkit.org/show_bug.cgi?id=6643
4744
4745         Bug 6650: Web Inspector HTML Hierarchy can't be scrolled with scrollwheel
4746         http://bugs.webkit.org/show_bug.cgi?id=6650
4747
4748         Bug 6677: Can't drag inspector when tree view has focus
4749         http://bugs.webkit.org/show_bug.cgi?id=6677
4750
4751         Bug 7326: Web Inspector tree scrollbar always shows up when resizing the top pane down
4752         http://bugs.webkit.org/show_bug.cgi?id=7326
4753
4754         * WebInspector/WebInspector.h: Removed the searchQuery methods.
4755         * WebInspector/WebInspector.m: Removed the DOMNode category and code for the old outline view.
4756         * WebInspector/WebInspectorOutlineView.h: Removed.
4757         * WebInspector/WebInspectorOutlineView.m: Removed.
4758         * WebInspector/WebInspectorInternal.h: Remove some methods and instance variables.
4759         * WebInspector/webInspector/Images/resize.png: Added.
4760         * WebInspector/webInspector/inspector.css: 
4761         * WebInspector/webInspector/inspector.html: Include the new classes and remove the plugin.
4762         * WebInspector/webInspector/inspector.js: Changes to use the new tree outline and other fixes.
4763         * WebInspector/webInspector/scrollarea.js: Copied from the Dashboard widget resources.
4764         * WebInspector/webInspector/scrollbar.js: Ditto.
4765         * WebInspector/webInspector/treeoutline.js: New tree outline class.
4766         * WebInspector/webInspector/utilities.js: DOM and String prototype additions.
4767         * WebKit.xcodeproj/project.pbxproj: Remove WebInspectorOutlineView.
4768
4769 2007-04-20  Brady Eidson  <beidson@apple.com>
4770
4771         Reviewed by Oliver (Black Sheep)
4772
4773         <rdar://problem/3559794>
4774         [WebView setMaintainsBackForwardList:] doesn't actually flush out the current page caches
4775
4776         * WebView/WebView.mm: Remove _private->useBackForwardList
4777         (-[WebView _setInitiatedDrag:]): Use _private->page instead of [self page]
4778         (-[WebView initWithCoder:]): Manipulate the flag that is now in WebCore::BackForwardList
4779         (-[WebView encodeWithCoder:]): Ditto
4780         (-[WebView backForwardList]): Use _private->page instead of [self page]
4781         (-[WebView setMaintainsBackForwardList:]): Manipulate the flag that is now in WebCore::BackForwardList
4782
4783 2007-04-20  Anders Carlsson  <andersca@apple.com>
4784
4785         Reviewed by Maciej.
4786
4787         <rdar://problem/5085897> REGRESSION: Some Flash links at www.jumpskyhigh.com just reload the page
4788         
4789         Get rid of the check that would prevent plugin requests from being loaded if a new page load was underway.
4790         www.jumpskyhigh.com had a flash movie that was embedded inside an <a> tag and clicking on the plug-in would cause the
4791         URL pointed to by the <a> tag to start loading and thus preventing the plug-in from loading the real URL.
4792         
4793         This check was added by Maciej and we should be able to remove it with the loader changes that have happened now,
4794         (mainly the fact that resource loaders are handled by the document loader instead of the frame loader).
4795         
4796         * Plugins/WebBaseNetscapePluginView.mm:
4797         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
4798
4799 2007-04-19  Oliver Hunt  <oliver@apple.com>
4800
4801         Reviewed by Adam.
4802
4803         Fix for <rdar://problem/4960912> -- REGRESSION: Content-Disposition:
4804         filename is ignored for drag-and-drop.
4805
4806         * WebView/WebResource.mm:
4807         (-[WebResource _fileWrapperRepresentation]):
4808           When creating the NSFileWrapper check the response for a preferred 
4809           filename, rather than just blindly hoping for the best.
4810
4811 2007-04-19  Anders Carlsson  <andersca@apple.com>
4812
4813         Reviewed by John.
4814
4815         <rdar://problem/5137002>
4816         REGRESSION (r20812): [WebFrame DOMDocument] is returning non-nil value in bookmarks view, causing trouble in Safari
4817
4818         Put back the MIME type check as a workaround.
4819         * WebView/WebFrame.mm:
4820         (-[WebFrame DOMDocument]):
4821
4822 2007-04-19  Mark Rowe  <mrowe@apple.com>
4823
4824         Reviewed by Oliver and Adam.
4825
4826         <rdar://problem/5141290> WebAssertions.h is still needed by some internal clients.
4827
4828         * Misc/WebAssertions.h: Added.
4829         * WebKit.xcodeproj/project.pbxproj:
4830
4831 2007-04-17  Brady Eidson  <beidson@apple.com>
4832
4833         Reviewed by Tim
4834
4835         <rdar://problem/5008925>
4836         Expose the NSURLConnection delegate willCacheResponse API to WebResourceLoadDelegate
4837
4838         * WebCoreSupport/WebFrameLoaderClient.h:
4839         * WebCoreSupport/WebFrameLoaderClient.mm:
4840         (WebFrameLoaderClient::willCacheResponse): Call 
4841           [WebResourceLoadDelegate webView:resource:willCacheResponse:fromDataSource:];
4842
4843         * WebView/WebView.mm:
4844         (-[WebView _cacheResourceLoadDelegateImplementations]): Pull out the willCacheResponse impl
4845
4846         * WebView/WebViewPrivate.h: Add WebResourceLoadDelegatePrivate category for this new SPI
4847
4848 2007-04-18  John Sullivan  <sullivan@apple.com>
4849
4850         Reviewed by Adam
4851
4852         - fixed <rdar://problem/5103009> REGRESSION: Activity window shows blank name for untitled pages
4853
4854         * WebView/WebHTMLRepresentation.mm:
4855         (-[WebHTMLRepresentation title]):
4856         return nil for empty string, to match old behavior
4857
4858 2007-04-17  John Sullivan  <sullivan@apple.com>
4859
4860         Reviewed by Tim Hatcher
4861
4862         - fixed <rdar://problem/5138492> Safari doesn't remember some changes to the PDF scale and display mode 
4863
4864         Some of the user interactions that could change the PDF scale and display mode were not going through
4865         the proxy mechanism in WebPDFView that updates preferences. Now we also listen to PDFKit notifications
4866         in order to catch the other cases.
4867
4868         * WebView/WebPDFView.h:
4869         new _ignoreScaleAndDisplayModeNotifications and _updatePreferencesTimer ivars
4870
4871         * WebView/WebPDFView.mm:
4872         (-[WebPDFView setPDFDocument:]):
4873         ignore scale and display mode notifications while we're setting up a fresh document
4874         (-[WebPDFView dealloc]):
4875         cancel the new timer (which releases it)
4876         (-[WebPDFView viewDidMoveToWindow]):
4877         listen for two PDFKit notifications
4878         (-[WebPDFView viewWillMoveToWindow:]):
4879         stop listening to the two PDFKit notifications
4880         (-[WebPDFView _applyPDFDefaults]):
4881         white space change
4882         (-[WebPDFView _cancelUpdatePreferencesTimer]):
4883         invalidate, release, and nil out the timer
4884         (-[WebPDFView _scaleOrDisplayModeChanged:]):
4885         update preferences soon, unless deliberately ignoring these notifications
4886         (-[WebPDFView _updatePreferencesNow]):
4887         cancel timer, then save data to preferences (code for saving the data was extracted from
4888         -[PDFPrefUpdatingProxy forwardInvocation:])
4889         (-[WebPDFView _updatePreferencesSoon]):
4890         use timer to consolidate multiple calls into one action; formerly we were setting preferences
4891         multiple times for some atomic user actions
4892         (-[PDFPrefUpdatingProxy forwardInvocation:]):
4893         call _updatePreferencesSoon where we used to immediately set preferences
4894
4895 2007-04-17  John Sullivan  <sullivan@apple.com>
4896
4897         Reviewed by Kevin Decker
4898
4899         - fixed <rdar://problem/4184640> "Look Up in Dictionary" item is always disabled for PDF pages
4900
4901         * WebView/WebPDFView.mm:
4902         (-[WebPDFView validateUserInterfaceItem:]):
4903         enable "Look Up in Dictionary" only if we're using a version of PDFKit that knows how to do so
4904         (-[WebPDFView _canLookUpInDictionary]):
4905         use respondsToSelector to test whether the current version of PDFKit supports this non-API feature
4906         (-[WebPDFView _lookUpInDictionaryFromMenu:]):
4907         implement this method, which WebKit includes in the context menu when there's selected text
4908         (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
4909         updated comment for this change
4910
4911 2007-04-16  Darin Adler  <darin@apple.com>
4912
4913         Rubber stamped by Tim Hatcher.
4914
4915         * WebKit.xcodeproj/project.pbxproj: Added Radar bug number to the error message
4916         for the "version number ending in 4" check so folks from Apple can find the
4917         original bug that motivated for this. To summarize what's in that bug, it says that
4918         <http://my.fedex.com> was failing, that it was because of the OpenCube DHTML Menu,
4919         and that some other affected sites were not using OpenCube (so the error is presumably
4920         more widespread).
4921
4922 2007-04-16  Darin Adler  <darin@apple.com>
4923
4924         Reviewed by John Sullivan.
4925
4926         - fix http://bugs.webkit.org/show_bug.cgi?id=13303
4927           <rdar://problem/5126341> REGRESSION: controls in a background Safari window
4928           maintain active appearance if the address bar has focus (13303)
4929
4930         * WebView/WebHTMLView.mm: (-[WebHTMLView _windowChangedKeyState]):
4931         Added. Calls FrameView::updateControlTints.
4932
4933 2007-04-13  Oliver Hunt  <oliver@apple.com>
4934
4935         Reviewed by Adam.
4936
4937         Due to rdar://problem/5133910 -- WebArchives should not be constructed 
4938         using resource from the cache -- We may try to create a potentially 
4939         incorrect WebArchive when dragging an image multiple times.
4940
4941         This patch retains the assertion for invalid behaviour, but adds a
4942         branch to make sure we don't try to do anything with the WebArchive
4943         in release builds.
4944
4945         * Misc/WebNSPasteboardExtras.mm:
4946         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
4947
4948 2007-04-13  Timothy Hatcher  <timothy@apple.com>
4949
4950         Reviewed by Dave Harrison.
4951
4952         <rdar://problem/5132727> Soho Mail build fails because of renamed SPI
4953
4954         * WebView/WebUIDelegatePrivate.h: define WebMenuItemTagSearchInGoogle as OldWebMenuItemTagSearchWeb
4955
4956 2007-04-13  Mark Rowe  <mrowe@apple.com>
4957
4958         Reviewed by Oliver.
4959
4960         <rdar://problem/5130686> Using WebPreferencesPrivate.h requires modifying framework search path
4961
4962         * WebView/WebPreferencesPrivate.h: Remove unneeded #ifdef.
4963
4964 2007-04-12  Deneb Meketa  <dmeketa@adobe.com>
4965
4966         Reviewed by Darin Adler.
4967
4968         http://bugs.webkit.org/show_bug.cgi?id=13029
4969         rdar://problem/4994849
4970         Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
4971
4972         * Plugins/WebBaseNetscapePluginStream.h: declarations.
4973         * Plugins/WebBaseNetscapePluginStream.mm: main implementation.
4974         (-[WebBaseNetscapePluginStream dealloc]): cleanup.
4975         (-[WebBaseNetscapePluginStream finalize]): cleanup.
4976         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
4977         Pass headers along.
4978         (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
4979         Main work is here.  Extract headers from NSHTTPURLResponse object into a byte sequence.
4980         See comments here about how it would be nice to have low-level access to the HTTP response.
4981         (-[WebBaseNetscapePluginStream _destroyStream]): cleanup.
4982         * Plugins/WebBaseNetscapePluginView.mm:
4983         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
4984         Conform to new startStream params.  Not applicable here, pass nil.
4985
4986 2007-04-12  Brady Eidson  <beidson@apple.com>
4987
4988         Build fix for case sensitive file systems
4989
4990         * Misc/WebNSPasteboardExtras.mm:
4991         * WebCoreSupport/WebPasteboardHelper.mm:
4992
4993 2007-04-11  John Sullivan  <sullivan@apple.com>
4994
4995         Reviewed by Anders
4996
4997         - WebKit part of fix for:
4998         <rdar://problem/5128697> REGRESSION: At least one PDF context menu item isn't appearing on Leopard
4999
5000         * Misc/WebNSArrayExtras.h: Added.
5001         * Misc/WebNSArrayExtras.m: Added.
5002         (-[NSMutableArray _webkit_removeUselessMenuItemSeparators]):
5003         New file, includes this method to strip leading, trailing, and duplicate separators from arrays
5004         of NSMenuItems (copied from Safari)
5005
5006         * WebView/WebUIDelegatePrivate.h:
5007         new MenuItemTag enum values for new PDFKit context menu items
5008
5009         * WebKit.xcodeproj/project.pbxproj:
5010         updated for new files
5011
5012         * WebView/WebPDFView.mm:
5013         (-[WebPDFView _anyPDFTagsFoundInMenu:]):
5014         check for new PDFKit context menu items
5015         (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
5016         associate new PDFKit context menu item selectors with the new tags; skip certain selectors that
5017         correspond to menu items that WebKit already includes; remove useless menu item separators when
5018         we're done, since we might have removed arbitrarily-placed menu items
5019
5020 2007-04-11  Oliver Hunt  <oliver@apple.com>
5021
5022         Reviewed by Maciej.
5023
5024         Adding RetainPtr to the many global obj-c pointers we use in
5025         C/C++ methods.  This is necessary to prevent GC from collecting
5026         globals we want to keep around.
5027
5028         We use RetainPtr in obj-c++ and c++ files, and CFRetain/Release in pure
5029         obj-c.
5030
5031         This fixes <rdar://problem/5058731> -- Crash in 
5032         WebCore::DragData::containsCompatibleContent due to early release 
5033         of types array
5034
5035         * Misc/WebLocalizableStrings.m:
5036         (WebLocalizedString):
5037         * Misc/WebNSPasteboardExtras.mm:
5038         (+[NSPasteboard _web_writableTypesForURL]):
5039         (_writableTypesForImageWithoutArchive):
5040         (_writableTypesForImageWithArchive):
5041         * Misc/WebNSURLExtras.m:
5042         (applyHostNameFunctionToMailToURLString):
5043         (applyHostNameFunctionToURLString):
5044         * Misc/WebStringTruncator.m:
5045         (defaultMenuFont):
5046         (fontFromNSFont):
5047         * WebCoreSupport/WebPasteboardHelper.mm:
5048         (WebPasteboardHelper::insertablePasteboardTypes):
5049
5050 2007-04-11  MorganL  <morganl.webkit@yahoo.com>
5051
5052         Reviewed by Maciej.
5053
5054         Add a Frame pointer to ChromeClient methods:
5055         http://bugs.webkit.org/show_bug.cgi?id=13127
5056
5057         * COM/ChromeClientWin.cpp:
5058         (ChromeClientWin::createWindow):
5059         (ChromeClientWin::createModalDialog):
5060         * COM/ChromeClientWin.h:
5061         * WebCoreSupport/WebChromeClient.h:
5062         * WebCoreSupport/WebChromeClient.mm:
5063         (WebChromeClient::createWindow):
5064         (WebChromeClient::createModalDialog):
5065
5066 2007-04-10  Brady Eidson  <beidson@apple.com>
5067
5068         Reviewed by Darin
5069
5070         <rdar://problem/4887095> - PageCache and PageState should be combined
5071
5072         WebKit side of the change to reflect the new object name of CachedPage and new Client method names
5073
5074         * History/WebHistoryItem.mm:
5075         (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
5076         (+[WebHistoryItem _releaseAllPendingPageCaches]):
5077         (-[WebWindowWatcher windowWillClose:]):
5078
5079         * WebCoreSupport/WebFrameLoaderClient.h:
5080         * WebCoreSupport/WebFrameLoaderClient.mm:
5081         (WebFrameLoaderClient::setDocumentViewFromCachedPage):
5082         (WebFrameLoaderClient::loadedFromCachedPage):
5083         (WebFrameLoaderClient::saveDocumentViewToCachedPage):
5084
5085 2007-04-09  Geoffrey Garen  <ggaren@apple.com>
5086
5087         Reviewed by Maciej Stachowiak.
5088         
5089         Support for fixing fast/forms/textarea-paste-newline.html.
5090         
5091         Added SPI for specifying whether a WebView should allow pasting through the 
5092         DOM API.
5093
5094         * ChangeLog:
5095         * WebKit.xcodeproj/project.pbxproj:
5096         * WebView/WebPreferenceKeysPrivate.h:
5097         * WebView/WebPreferences.m:
5098         (+[WebPreferences standardPreferences]):
5099         (-[WebPreferences isDOMPasteAllowed]):
5100         (-[WebPreferences setDOMPasteAllowed:]):
5101         * WebView/WebPreferencesPrivate.h:
5102         * WebView/WebView.mm:
5103         (-[WebView _updateWebCoreSettingsFromPreferences:]):
5104
5105 2007-04-09  Anders Carlsson  <andersca@apple.com>
5106
5107         Reviewed by John.
5108
5109         <rdar://problem/5081860>
5110         REGRESSION: Select All for standalone image has no visible effect but does change state
5111         
5112         <rdar://problem/5081840>
5113         REGRESSION: context menu in white space beyond standalone image is different after Select All
5114         
5115         Have validateUserInterface emulate the old behavior for full-frame images and plugins, which is:
5116         
5117         - For full-frame plugins, always return false.
5118         - For images, only return true if the selector is copy: and the image has finished loading.
5119         
5120         * WebView/WebHTMLView.mm:
5121         (-[WebHTMLView validateUserInterfaceItem:]):
5122
5123 2007-04-09  Anders Carlsson  <andersca@apple.com>
5124
5125         Reviewed by Darin.
5126
5127         <rdar://problem/5026893>
5128         REGRESSION: "Mail Contents of this Page" for standalone image in Safari results in a broken image in Mail
5129         
5130         * WebView/WebFrame.mm:
5131         (-[WebFrame DOMDocument]):
5132         We can't check for _isHTMLDocument here since image and plugin documents inherit from HTMLDocument. Instead,
5133         check for those two document types explicitly.
5134         
5135 2007-04-09  Anders Carlsson  <andersca@apple.com>
5136
5137         Reviewed by Geoff, Ada and John.
5138
5139         <rdar://problem/4600978> Would like a way to test whether a WebView is displaying a standalone image
5140
5141         * WebView/WebFrame.mm:
5142         (-[WebFrame _isDisplayingStandaloneImage]):
5143         * WebView/WebFramePrivate.h:
5144         Add _isDisplayingStandaloneImage SPI.
5145
5146 2007-04-06  Timothy Hatcher  <timothy@apple.com>
5147
5148         Reviewed by Mark Rowe.
5149
5150         Adds a build phase script that ensures WebKit's version dosen't end in a 4.
5151         If our version ends in 4, some sites might think we are Netscape 4 in their
5152         user agent checks.
5153
5154         * Configurations/Version.xcconfig:
5155         * WebKit.xcodeproj/project.pbxproj:
5156
5157 2007-04-05  Anders Carlsson  <andersca@apple.com>
5158
5159         Reviewed by Adam.
5160
5161         <rdar://problem/5083023>
5162         REGRESSION: In Real Player (10.1.0), video continues to play after closing window
5163         
5164         This broke in revision 18422 because now the plugin isn't stopped when the window is closed. Since the window is retained
5165         by the plugin view for as long as it is running (so that removeTrackingRect works even though the window has been closed),
5166         we would end up with a reference cycle (NSWindow -> WebView -> PluginView -> NSWindow) and stopping the plug-in when the window
5167         was closed would break that cycle.
5168         
5169         Applications that call -[WebView close] when closing aren't affected, but RealPlayer doesn't do this.
5170         
5171         The bug that 18422 was supposed to fix was fixed by 19275, which is why it's safe to add back the check.
5172         
5173         * Plugins/WebBaseNetscapePluginView.mm:
5174         (-[WebBaseNetscapePluginView addWindowObservers]):
5175         (-[WebBaseNetscapePluginView removeWindowObservers]):
5176         (-[WebBaseNetscapePluginView windowWillClose:]):
5177
5178 2007-04-05  Kevin McCullough  <kmccullough@apple.com>
5179
5180         Reviewed by Darin.
5181
5182         - Moved registerURLSchemeAsLocal to the public API.
5183
5184         * WebView/WebView.h:
5185         * WebView/WebView.mm:
5186         (+[WebView registerURLSchemeAsLocal:]):
5187         * WebView/WebViewPrivate.h:
5188
5189 === Safari-5522.6 ===
5190
5191 2007-04-04  Anders Carlsson  <andersca@apple.com>
5192
5193         Reviewed by John.
5194
5195         <rdar://problem/5107536> 
5196         http://bugs.webkit.org/show_bug.cgi?id=13264
5197         REGRESSION: Crash when canceling about:blank in Activity viewer
5198         
5199         * WebView/WebFrame.mm:
5200         (-[WebFrame stopLoading]):
5201         Add a null check for the frame loader - it can be null when the frame has been disconnected
5202         from the web page.
5203
5204 2007-04-03  Anders Carlsson  <andersca@apple.com>
5205
5206         Reviewed by Darin.
5207
5208         <rdar://problem/5028178>
5209         Crash occurs at WebCore::FrameLoader::activeDocumentLoader() after loading Froggster widget
5210         
5211         * Plugins/WebNetscapePluginStream.mm:
5212         (-[WebNetscapePluginStream start]):
5213         If load returns no the plugin loader has already been removed by the didFail callback.
5214
5215 2007-04-02  Anders Carlsson  <andersca@apple.com>
5216
5217         Reviewed by Geoff.
5218
5219         Fix crash when running plugins/destroy-stream-twice.html under GuardMalloc
5220
5221         * Plugins/WebBaseNetscapePluginStream.h:
5222         * Plugins/WebBaseNetscapePluginStream.mm:
5223         (+[WebBaseNetscapePluginStream ownerForStream:]):
5224         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
5225         (-[WebBaseNetscapePluginStream dealloc]):
5226         (-[WebBaseNetscapePluginStream finalize]):
5227         Change the streams hash map to contain an NPStream*, and change ownerForStream to take an NPStream*.
5228         
5229         * Plugins/WebBaseNetscapePluginView.mm:
5230         (-[WebBaseNetscapePluginView destroyStream:reason:]):
5231         Check that the NPStream pointer is valid before accessing stream->ndata.
5232
5233 2007-04-02  Darin Adler  <darin@apple.com>
5234
5235         Reviewed by Geoff.
5236
5237         - fix http://bugs.webkit.org/show_bug.cgi?id=13026
5238           <rdar://problem/5061026> incomplete render of menu
5239           (assertion failing in -[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:])
5240
5241         - fix http://bugs.webkit.org/show_bug.cgi?id=13120
5242           <rdar://problem/5080339> Plug-ins that draw through the QuickDraw interface may crash
5243           by hanging onto old GWorlds.
5244
5245         - set clip path for CoreGraphics plug-ins in the same way we do for QuickDraw plug-ins
5246           this is a better fix for <rdar://problem/4939511> WebKit should set the the CG clip
5247           path for plug-ins that draw using Core Graphics
5248
5249         Incorporates changes from a patch by Mark Ambachtsheer.
5250
5251         Here are the changes:
5252
5253             1) Don't try to use the offscreen code path if GGBitmapContextGetData returns 0.
5254             2) Handle kCGBitmapByteOrderDefault when computing the QD pixel format, even though
5255                we don't have any evidence that this happens in practice.
5256             3) Keep the GWorld around until we create a new one or the plug-in is destroyed.
5257             4) Use the GWorld pointer itself as a flag to indicate whether we are using an
5258                offscreen GWorld.
5259             5) Set up clipping for CoreGraphics in the same way we do for QuickDraw; remove an
5260                earlier attempt that handled CoreGraphics differently.
5261
5262         * Plugins/WebBaseNetscapePluginView.h: Added a field named offscreenGWorld to hold
5263         the GWorld until it's needed.
5264         * Plugins/WebBaseNetscapePluginView.mm:
5265         (getQDPixelFormatForBitmapContext): Replaced QDPixelFormatFromCGBitmapInfo. Used the
5266         "get" prefix so we don't intrude on the QD namespace. Added code to handle the
5267         kCGBitmapByteOrderDefault case, although I'm not sure it will really come up in
5268         practice -- it wasn't really coming up in the buggy case.
5269         (getNPRect): Added helper functions. Used to make the code below clearer.
5270         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Use getNPRect to
5271         streamline code. Use GetGWorld to save the port since we use SetGWorld to restore
5272         it later. Store the GWorld we create in the offscreenGWorld field and dispose the
5273         existing one. Don't treat the CGBitmapContext as an offscreen bitmap if it
5274         has a data pointer of 0. Set up the clip based on the result of
5275         -[NSView getRectsBeingDrawn:count] when setting up the port for CoreGraphics
5276         (after saving the port state).
5277         (-[WebBaseNetscapePluginView restorePortState:]): Remove now-unneeded code to
5278         destroy the offscreen GWorld, and simplified the code that restores the port so we
5279         don't need a separate case for offscreen.
5280         (-[WebBaseNetscapePluginView fini]): Renamed from freeAttributeKeysAndValues, since
5281         this method now does more than just the attributes. This is the shared method that
5282         does things needed in both dealloc and finalize. Added a call to DisposeGWorld here.
5283         (-[WebBaseNetscapePluginView dealloc]): Updated for name change.
5284         (-[WebBaseNetscapePluginView finalize]): Ditto.
5285         (-[WebBaseNetscapePluginView drawRect:]): Removed code to set clip. This is done in
5286         the saveAndSetNewPortStateForUpdate: method instead.
5287
5288 2007-03-30  Adele Peterson  <adele@apple.com>
5289
5290         Reviewed by Darin.
5291
5292         Call execCommand for deleteWordForward and deleteWordBackward instead of calling
5293         deleteWithDirection directly.
5294
5295         * WebView/WebHTMLView.mm:
5296         (-[WebHTMLView deleteWordForward:]):
5297         (-[WebHTMLView deleteWordBackward:]):
5298
5299 2007-03-30  Anders Carlsson  <andersca@apple.com>
5300
5301         Reviewed by Geoff.
5302
5303         * Plugins/WebNetscapePluginPackage.m:
5304         (-[WebNetscapePluginPackage load]):
5305         Initialize pushpopupsenabledstate, poppopupsenabledstate and enumerate.
5306         
5307         * Plugins/npapi.m:
5308         (NPN_PushPopupsEnabledState):
5309         (NPN_PopPopupsEnabledState):
5310         Add stubs for these functions.
5311         
5312         * Plugins/npfunctions.h:
5313         Add new methods to NPNetscapeFuncs.
5314
5315 2007-03-29  Geoffrey Garen  <ggaren@apple.com>
5316
5317         Reviewed by Beth Dakin, reviewed by Maciej Stachowiak.
5318         
5319         Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in 
5320         -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
5321         navigating away from page with DivX movie plug-in (13203)
5322         
5323         Changed LOG_ERROR to LOG so the layout test doesn't produce console spew
5324         every time you run it.
5325
5326         * Plugins/WebBaseNetscapePluginView.mm:
5327         (-[WebBaseNetscapePluginView destroyStream:reason:]):
5328
5329 2007-03-29  Beth Dakin  <bdakin@apple.com>
5330
5331         Reviewed by Brady.
5332
5333         Fix for <rdar://problem/4674537> REGRESSION: Adobe Acrobat 8 - Text 
5334         blinks when mouse is moved, and is invisible otherwise
5335
5336         -and-
5337
5338         <rdar://problem/4992521> Please adjust WebKit's Acrobat-workaround 
5339         methodology
5340
5341         The fix for the first bug is to compare against the bundle 
5342         identifiers for Adobe Reader and the non-Pro Adobe Acrobat in 
5343         addition to Adobe Acrobat Pro. The fix for the second bug is to 
5344         check the version number of Acrobat/Reader through 
5345         WebKitSystemInterface instead of checking which version of WebKit 
5346         it has been linked against.
5347
5348         * English.lproj/StringsNotToBeLocalized.txt: Two new bundle 
5349         identifiers.
5350         * Misc/WebKitVersionChecks.h: Remove Acrobat quirk constant.
5351         * WebView/WebView.mm:
5352         (-[WebView _updateWebCoreSettingsFromPreferences:]):
5353
5354 2007-03-29  Geoffrey Garen  <ggaren@apple.com>
5355
5356         Rubber stamped by Beth Dakin.
5357         
5358         WebBaseNetscapePluginStream.m => WebBaseNetscapePluginStream.mm, since
5359         it's ObjC++ now.
5360
5361         * Plugins/WebBaseNetscapePluginStream.m: Removed.
5362         * WebKit.xcodeproj/project.pbxproj:
5363
5364 2007-03-27  Geoffrey Garen  <ggaren@apple.com>
5365
5366         Reluctantly tolerated by Darin Adler.
5367         
5368         Fixed <rdar://problem/5091330> REGRESSION: Repro crash in 
5369         -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
5370         navigating away from page with DivX movie plug-in (13203)
5371         
5372         The problem was that the DivX plug-in would ask us to destroy an NPStream
5373         that had already been destroyed, causing us to wander off into freed
5374         memory. (I believe the reason this was a regression was that we never used 
5375         to destroy plug-in streams, period.)
5376         
5377         The solution here is to track the NPStreams belonging to a plug-in, and 
5378         guard against plug-ins making calls with NPStreams that don't belong to 
5379         them. (It turns out that NPN_DestroyStream is the only stream-based 
5380         plug-in call we support.)
5381
5382         (CarbonPathFromPOSIXPath): Fixed up a cast to be C++ compatible.
5383         * Plugins/WebBaseNetscapePluginView.mm:
5384         (-[WebBaseNetscapePluginView destroyStream:reason:]): The actual fix.
5385         Use helper method to guard against a plug-in using an NPStream that doesn't
5386         belong to it.
5387         * WebKit.xcodeproj/project.pbxproj: Made WebBaseNetscapePluginView ObjC++
5388         so I could use HashMap.
5389
5390 2007-03-28  Adele Peterson  <adele@apple.com>
5391
5392         Reviewed by Brady.
5393
5394         Update to last fix.
5395
5396         * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK.
5397         * WebView/WebView.mm: (-[WebView stringByEvaluatingJavaScriptFromString:]):
5398         Added check to only use the VitalSource workaround if the app is not linked on or after
5399         the defined WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK version number.
5400
5401 2007-03-28  Adele Peterson  <adele@apple.com>
5402
5403         Reviewed by Kevin M.
5404
5405         WebKit part of fix for <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
5406
5407         Added an app specific workaround for VitalSource Bookshelf that strips "return" from the beginning of their script strings.  We used to allow this
5408         but now we throw a JavaScript exception for return statements that aren't in functions.
5409
5410         Filed this evangelism bug so we can notify VitalSource of the problem:
5411         <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
5412
5413         * WebView/WebView.mm: (-[WebView stringByEvaluatingJavaScriptFromString:]):
5414
5415 2007-03-27  John Sullivan  <sullivan@apple.com>
5416
5417         Reviewed by Tim
5418         
5419         - fixed <rdar://problem/5092556> Default UA spoofing is always off until explicitly toggled
5420
5421         * WebView/WebView.mm:
5422         (-[WebView _commonInitializationWithFrameName:groupName:]):
5423         initialize the cached value of _private->useSiteSpecificSpoofing here; formerly it would not
5424         be initialized correctly in the common case of WebViews that use [WebPreferences standardPreferences]
5425
5426 2007-03-27  Mark Rowe  <mrowe@apple.com>
5427
5428         Reviewed by Dave Harrison.
5429
5430         * Configurations/WebKit.xcconfig: Include UMBRELLA_FRAMEWORKS_DIR in framework search path.
5431
5432 2007-03-26  Antti Koivisto  <antti@apple.com>
5433
5434         Reviewed by Darin.
5435         
5436         On Mac, support fine grained wheel events generated by trackpad and Mighty Mouse.
5437         http://bugs.webkit.org/show_bug.cgi?id=13134
5438         <rdar://problem/5076249>
5439
5440         * WebCoreSupport/WebSystemInterface.m:
5441         (InitWebCoreSystemInterface): Expose GetWheelEventDeltas()
5442
5443 2007-03-26  John Sullivan  <sullivan@apple.com>
5444
5445         Reviewed by Dave Harrison
5446         
5447         - fixed <rdar://problem/4769772> Problem with Find on certain PDF page
5448
5449         * WebView/WebPDFView.mm:
5450         (-[WebPDFView _scaledAttributedString:]):
5451         We were hitting an exception trying to set the font attribute to nil, which was happening because
5452         the result of -[PDFSelection attributedString] had no attributes. That PDFSelection bug is now
5453         filed separately, but this works around the exception.
5454
5455 2007-03-24  David Hyatt  <hyatt@apple.com>
5456
5457         Amend the statistics reporting for the WebCore cache to include XSL and to report live/decoded sizes.
5458
5459         * Misc/WebCache.mm:
5460         (+[WebCache statistics]):
5461
5462 2007-03-24  Brady Eidson  <beidson@apple.com>
5463
5464         Reviewed by Adam
5465
5466         RetainPtr is no longer in the WebCore namespace
5467
5468         * History/WebBackForwardList.mm:
5469         * WebCoreSupport/WebEditorClient.h:
5470         * WebCoreSupport/WebFrameLoaderClient.h:
5471         * WebView/WebDocumentLoaderMac.h:
5472
5473 2007-03-24  Brady Eidson  <beidson@apple.com>
5474
5475         Reviewed by Adam
5476
5477         <rdar://problem/5086210> - Move RetainPtr to WTF
5478         
5479         * ForwardingHeaders/wtf/RetainPtr.h: Added.
5480         * History/WebBackForwardList.mm: Changed #import to <wtf/RetainPtr.h>
5481         * WebCoreSupport/WebEditorClient.h: Ditto
5482         * WebCoreSupport/WebFrameLoaderClient.h: Ditto
5483         * WebView/WebDocumentLoaderMac.h: Ditto
5484
5485 2007-03-24  John Sullivan  <sullivan@apple.com>
5486
5487         Reviewed by Adele
5488
5489         - fixed <rdar://problem/5084872> Need to add flickr to spoof list in WebKit
5490         - only do site-specific spoofing if a preference is set
5491
5492         * WebView/WebPreferenceKeysPrivate.h:
5493         added WebKitUseSiteSpecificSpoofingPreferenceKey 
5494         
5495         * WebView/WebPreferences.m:
5496         (+[WebPreferences initialize]):
5497         initialize WebKitUseSiteSpecificSpoofingPreferenceKey to false
5498         (-[WebPreferences _useSiteSpecificSpoofing]):
5499         get value of WebKitUseSiteSpecificSpoofingPreferenceKey
5500         (-[WebPreferences _setUseSiteSpecificSpoofing:]):
5501         set value of WebKitUseSiteSpecificSpoofingPreferenceKey
5502         
5503         * WebView/WebPreferencesPrivate.h:
5504         declare _useSiteSpecificSpoofing and _setUseSiteSpecificSpoofing
5505         
5506         * WebView/WebView.mm:
5507         cache the value of WebKitUseSiteSpecificSpoofingPreferenceKey in a bool in _private
5508         (-[WebView _preferencesChangedNotification:]):
5509         update the cached value
5510         (-[WebView setPreferences:]):
5511         ditto
5512         (-[WebView WebCore::_userAgentForURL:WebCore::]):
5513         Only spoof here if the new site-specific spoofing preference is enabled. If it is, pass
5514         Safari 2.0.4's user agent string for flickr.com. We can remove this case when 5081617 is addressed.
5515
5516 2007-03-24  Mark Rowe  <mrowe@apple.com>
5517
5518         Rubber-stamped by Darin.
5519
5520         * Configurations/WebKit.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS.
5521
5522 2007-03-23  Mark Rowe  <mrowe@apple.com>
5523
5524         Build fix for when BUILDING_ON_TIGER is not defined.
5525
5526         * Misc/WebTypesInternal.h:
5527         * WebView/WebHTMLView.mm:
5528
5529 2007-03-22  David Kilzer  <ddkilzer@apple.com>
5530
5531         Reviewed by Darin.
5532
5533         Use BUILDING_ON_TIGER from WebKitPrefix.h instead of local
5534         MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 tests.
5535
5536         * Misc/WebTypesInternal.h:
5537         * WebView/WebHTMLView.mm:
5538
5539 2007-03-22  Darin Adler  <darin@apple.com>
5540
5541         Reviewed by Adele.
5542
5543         - fix <rdar://problem/5074630> detachChildren call should move from WebKit to WebCore
5544
5545         * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::prepareForDataSourceReplacement):
5546         Remove call to detachChildren. This should be a WebCore responsibility.
5547
5548 2007-03-19  Anders Carlsson  <acarlsson@apple.com>
5549
5550         Reviewed by Dave Hyatt.
5551
5552         <rdar://problem/5067983>
5553         iSale: Crash occurs at WebFrameLoaderClient::dispatchDecidePolicyForMIMEType() when attempting to load a HTML template
5554         
5555         Restore old behavior (broke in r14533) where the resource load and download delegates are retained for as long as the 
5556         data source is loading.
5557         
5558         * WebCoreSupport/WebFrameLoaderClient.mm:
5559         (WebFrameLoaderClient::createDocumentLoader):
5560         * WebView/WebDocumentLoaderMac.h:
5561         * WebView/WebDocumentLoaderMac.mm:
5562         (WebDocumentLoaderMac::setDataSource):
5563         (WebDocumentLoaderMac::decreaseLoadCount):
5564
5565 2007-03-19  Geoffrey Garen  <ggaren@apple.com>
5566
5567         Speculative fix for why ASSERT_MAIN_THREAD didn't work for me. (The
5568         documentation says "non-zero," not "1."
5569
5570         * Misc/WebKitLogging.m:
5571         (WebKitRunningOnMainThread):
5572
5573 2007-03-19  Andrew Wellington  <proton@wiretapped.net>
5574
5575         Reviewed by Maciej.
5576
5577         Really set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
5578
5579         * WebKit.xcodeproj/project.pbxproj:
5580
5581 2007-03-19  Darin Adler  <darin@apple.com>
5582
5583         * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
5584
5585 2007-03-19  John Sullivan  <sullivan@apple.com>
5586
5587         Reviewed by Justin
5588         
5589         - fixed <rdar://problem/5071238> REGRESSION: opt-cmd-B to show Bookmarks view does 
5590         nothing when form field has focus
5591
5592         * WebView/WebHTMLView.mm:
5593         (-[WebHTMLView _handleStyleKeyEquivalent:]):
5594         we were counting any set of modifiers plus 'b' as the standard key equivalent for
5595         toggling Bold; now we only accept command+'b'
5596
5597 2007-03-19  Adam Roben  <aroben@apple.com>
5598
5599         Reviewed by Hyatt and Maciej.
5600
5601         Updated WebCoreStatistics for the conversion of WebCoreJavaScript to
5602         C++.
5603
5604         * Misc/WebCoreStatistics.mm:
5605         (+[WebCoreStatistics javaScriptObjectsCount]):
5606         (+[WebCoreStatistics javaScriptInterpretersCount]):
5607         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
5608         (+[WebCoreStatistics javaScriptRootObjectTypeCounts]): Moved
5609         conversion to NSCountedSet here from WebCore.
5610         (+[WebCoreStatistics garbageCollectJavaScriptObjects]):
5611         (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThread:]):
5612         (+[WebCoreStatistics shouldPrintExceptions]):
5613         (+[WebCoreStatistics setShouldPrintExceptions:]):
5614         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
5615         (+[WebCoreStatistics javaScriptRootObjectClasses]):
5616
5617 2007-03-18  Andrew Wellington  <proton@wiretapped.net>
5618
5619         Reviewed by Mark Rowe
5620         
5621         Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
5622
5623         * WebKit.xcodeproj/project.pbxproj:
5624
5625 2007-03-19  Mark Rowe  <mrowe@apple.com>
5626
5627         Rubber-stamped by Brady.
5628
5629         Update references to bugzilla.opendarwin.org with bugs.webkit.org.
5630
5631         * WebInspector/webInspector/inspector.css:
5632         * WebView/WebHTMLView.mm:
5633         (-[WebHTMLView firstRectForCharacterRange:]):
5634         * WebView/WebView.mm:
5635         (-[WebView initWithFrame:frameName:groupName:]):
5636
5637 2007-03-18  David Hyatt  <hyatt@apple.com>
5638
5639         Move frame borders out of WebKit and into WebCore.
5640
5641         Reviewed by aroben, olliej
5642
5643         * WebCoreSupport/WebFrameBridge.mm:
5644         * WebKit.xcodeproj/project.pbxproj:
5645         * WebView/WebFrameView.mm:
5646         (-[WebFrameView drawRect:]):
5647         (-[WebFrameView setFrameSize:]):
5648         * WebView/WebFrameViewInternal.h:
5649
5650 2007-03-17  John Sullivan  <sullivan@apple.com>
5651
5652         Reviewed by Tim Hatcher
5653         
5654         Discovered while working on <rdar://problem/5070334> that many WebView calls will crash if called
5655         after -[WebView close] has executed because _private->page is deferenced after it's been set to 0. 
5656         It might be silly/wrong to call these methods after -close, but obviously it shouldn't crash. Made
5657         each use of _private->page robust against nil-dereferencing.
5658
5659         * WebView/WebView.mm:
5660         (-[WebView _loadBackForwardListFromOtherView:]):
5661         (-[WebView _updateWebCoreSettingsFromPreferences:]):
5662         (-[WebView _setDashboardBehavior:to:]):
5663         (-[WebView _dashboardBehavior:]):
5664         (-[WebView goBack]):
5665         (-[WebView goForward]):
5666         (-[WebView goToBackForwardItem:]):
5667         (-[WebView canGoBack]):
5668         (-[WebView canGoForward]):
5669         (-[WebView setTabKeyCyclesThroughElements:]):
5670         (-[WebView tabKeyCyclesThroughElements]):
5671         (-[WebView setEditable:]):
5672
5673 2007-03-17  Timothy Hatcher  <timothy@apple.com>
5674
5675         Reviewed by Mark Rowe.
5676
5677         Made Version.xcconfig smarter when building for different configurations.
5678         Now uses the 522+ OpenSource version for Debug and Release, while using the
5679         full 522.4 version for Production builds. The system prefix is also computed
5680         based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard.
5681
5682         * Configurations/Version.xcconfig:
5683         * Configurations/WebKit.xcconfig:
5684
5685 2007-03-16  Oliver Hunt  <oliver@apple.com>
5686
5687         Reviewed by Hyatt.
5688
5689         The old canSaveAsWebArchive call was necessary as stand alone
5690         images used to be rendered by ImageDocument.
5691
5692         Fixes rdar://problem/5061252
5693
5694         * WebCoreSupport/WebDragClient.h:
5695         * WebCoreSupport/WebDragClient.mm:
5696         (WebDragClient::declareAndWriteDragImage):
5697         * WebKit.xcodeproj/project.pbxproj:
5698
5699 2007-03-15  Brady Eidson  <beidson@apple.com>
5700
5701         Reviewed by Maciej
5702
5703         <rdar://problem/4429701>
5704         Implements a port blocking black list that matches Firefox's
5705
5706         * English.lproj/Localizable.strings: Added localizable string for port blocked error code
5707
5708         * Misc/WebKitErrors.h:
5709         * Misc/WebKitErrors.m:
5710         (registerErrors): Add new port blocked error code to WebKitErrorDomain
5711
5712         * WebCoreSupport/WebFrameLoaderClient.h:
5713         * WebCoreSupport/WebFrameLoaderClient.mm:
5714         (WebFrameLoaderClient::cancelledError): Fixed coding style
5715         (WebFrameLoaderClient::blockedError): Return a ResourceError with the new custom error code
5716
5717 2007-03-15  Timothy Hatcher  <timothy@apple.com>
5718
5719         Reviewed by John.
5720
5721         * Fixes: <rdar://problem/4927747> WebKit's Current Library Version number should match the Info.plist Version
5722         * Factored out most of our common build settings into .xcconfig files. Anything that was common in
5723           each build configuration was factored out into the shared .xcconfig file.
5724         * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
5725         * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
5726         * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).
5727         * Make WebKit use the same warning flags as the other projects. This required two casts to be added to fix new warnings.
5728
5729         * Configurations/Base.xcconfig: Added.
5730         * Configurations/DebugRelease.xcconfig: Added.
5731         * Configurations/Version.xcconfig: Added.
5732         * Configurations/WebKit.xcconfig: Added.
5733         * Info.plist:
5734         * Misc/WebKitVersionChecks.h:
5735         * Plugins/WebBaseNetscapePluginStream.m:
5736         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
5737         * WebKit.xcodeproj/project.pbxproj:
5738
5739 2007-03-15  Kevin Decker  <kdecker@apple.com>
5740
5741         Reviewed by Anders.
5742
5743         Fixed: <rdar://problem/5001428> stationery background images do not display
5744        
5745         Change 19244 fixed the method -[WebResource _shouldIgnoreWhenUnarchiving], but also broke Mail stationery.
5746         
5747         The problem was that with archivedResourceForURL now fixed, the engine will try to decode the images.  These images wouldn't decode because
5748         Mail re-encodes and directly manipulates the image data in such a way that prevented WebKit from decoding the image.  Because Mail was giving
5749         us bad data, the images wouldn't render.  This was never an issue before because archivedResourceForURL (broken) always returned nil, thus the
5750         engine would never attempt to decode the resource, therefore the responsibility was delegated to Mail's protocol handler, which would do the 
5751         right thing and load the image.
5752         
5753         Since Mail is relying on the fact it can store arbitrary data in WebArchives, I've introduced SPI that acts as a hint for us to ignore certain 
5754         subresources while unarchiving. This SPI is -[WebResource _shouldIgnoreWhenUnarchiving].
5755         
5756         * WebView/WebResource.mm: Addd private ivar shouldIgnoreWhenUnarchiving.
5757         (-[WebResource _ignoreWhenUnarchiving]): Added.
5758         (-[WebResource _shouldIgnoreWhenUnarchiving]): Added.
5759         * WebView/WebResourcePrivate.h: Added two methods to private header.
5760         * WebView/WebUnarchivingState.m:
5761         (-[WebUnarchivingState archivedResourceForURL:]): Check if we should ignore the resource.
5762
5763 2007-03-15  Mark Rowe  <mrowe@apple.com>
5764
5765         Reviewed by Antti.
5766
5767         Fix for <rdar://problem/5065060> ASSERTION FAILURE: newUsername && newPassword
5768         when submitting an authentication form without password.
5769
5770         * WebCoreSupport/WebFrameLoaderClient.mm:
5771         (WebFrameLoaderClient::dispatchWillSubmitForm): Don't omit form fields with empty values from the dictionary
5772         passed to the delegate.
5773
5774 2007-03-14  Anders Carlsson  <acarlsson@apple.com>
5775
5776         Reviewed by Dave Hyatt.
5777
5778         Don't add the data twice, it's also done by didReceiveData.
5779         
5780         * WebCoreSupport/WebFrameLoaderClient.mm:
5781         (WebFrameLoaderClient::deliverArchivedResources):
5782
5783 2007-03-14  Anders Carlsson  <acarlsson@apple.com>
5784
5785         Fix segmentation fault when running layout tests.
5786
5787         Remove bogus check that that I added on purpose to see how good Geoff is at spotting mistakes when reviewing code.
5788         (Turns out he's not that good!)
5789         
5790         * WebView/WebDocumentLoaderMac.mm:
5791         (WebDocumentLoaderMac::increaseLoadCount):
5792
5793 2007-03-14  Anders Carlsson  <acarlsson@apple.com>
5794
5795         Reviewed by Geoff.
5796
5797         http://bugs.webkit.org/show_bug.cgi?id=13076
5798         REGRESSION: Multiple loading tabs cause assertion in WebDocumentLoaderMac::decreaseLoadCount(unsigned long)
5799
5800         Store the identifier set in the document loader since identifiers are per-webview and not global.
5801         
5802         * WebView/WebDocumentLoaderMac.h:
5803         * WebView/WebDocumentLoaderMac.mm:
5804         (WebDocumentLoaderMac::WebDocumentLoaderMac):
5805         (WebDocumentLoaderMac::attachToFrame):
5806         (WebDocumentLoaderMac::increaseLoadCount):
5807         (WebDocumentLoaderMac::decreaseLoadCount):
5808
5809 2007-03-14  David Harrison  <harrison@apple.com>
5810
5811         Reviewed by Maciej.
5812
5813         <rdar://problem/5009625> REGRESSION: Aperture 1.5: Can't select entire line of text after correcting a misspelled word
5814
5815         * WebCoreSupport/WebEditorClient.mm:
5816         (WebEditorClient::respondToChangedSelection):
5817         * WebCoreSupport/WebFrameBridge.mm:
5818         Provide compatibility by not sending WebViewDidChangeSelectionNotification if
5819         the app is Aperture and is linked against WebKit 2.0.
5820
5821 === Safari-5522.4 ===
5822
5823 2007-03-14  Anders Carlsson  <acarlsson@apple.com>
5824
5825         Reviewed by Geoff.
5826
5827         <rdar://problem/5058714>
5828         http://bugs.webkit.org/show_bug.cgi?id=13050
5829         
5830         World leaks seen on Leopard after opening then closing tab (13050)
5831
5832         Add a hash set to prevent the load count to be increased twice for the same resource.
5833         
5834         * WebCoreSupport/WebFrameLoaderClient.mm:
5835         (WebFrameLoaderClient::dispatchWillSendRequest):
5836         (WebFrameLoaderClient::dispatchDidFinishLoading):
5837         (WebFrameLoaderClient::dispatchDidFailLoading):
5838         * WebView/WebDocumentLoaderMac.h:
5839         * WebView/WebDocumentLoaderMac.mm:
5840         (loadingResources):
5841         (WebDocumentLoaderMac::increaseLoadCount):
5842         (WebDocumentLoaderMac::decreaseLoadCount):
5843
5844 2007-03-14 Adele Peterson  <adele@apple.com>
5845
5846         Reviewed by Darin.
5847
5848         Removed _insertTextWithEvent, _insertNewlineWithEvent, and _insertTextWithEvent.
5849         Instead, use execCommand and insertText methods on the Editor.
5850
5851         * WebView/WebHTMLView.mm:
5852         (-[WebHTMLView insertTab:]):
5853         (-[WebHTMLView insertBacktab:]):
5854         (-[WebHTMLView insertNewline:]):
5855         (-[WebHTMLView insertLineBreak:]):
5856         (-[WebHTMLView insertParagraphSeparator:]):
5857         (-[WebHTMLView insertNewlineIgnoringFieldEditor:]):
5858         (-[WebHTMLView insertTabIgnoringFieldEditor:]):
5859         (-[WebHTMLView yank:]):
5860         (-[WebHTMLView yankAndSelect:]):
5861         (-[WebHTMLView doCommandBySelector:]):
5862         (-[WebHTMLView insertText:]):
5863
5864 2007-03-14  David Hyatt  <hyatt@apple.com>
5865
5866         Fixes to ensure that the resource loader's shared buffer can always be used.
5867
5868         Reviewed by olliej, mjs
5869
5870         * Misc/WebIconDatabase.mm:
5871         (-[WebIconDatabase _convertToWebCoreFormat]):
5872         * WebCoreSupport/WebFrameLoaderClient.mm:
5873         (WebFrameLoaderClient::deliverArchivedResources):
5874
5875 2007-03-13  Oliver Hunt  <oliver@apple.com>
5876
5877         Reviewed by Brady.
5878
5879         Modify subresourceForURL to take NSString argument 
5880         so we can avoid [NSURL absoluteString]
5881
5882         * WebView/WebDataSource.mm:
5883         (-[WebDataSource subresourceForURL:]):
5884
5885 2007-03-13  Brady Eidson  <beidson@apple.com>
5886
5887         Rubberstamped by Alice
5888
5889         Meant to be part of my previous checkin... pruning unused code from WebKit
5890
5891         * WebView/WebFrame.mm: Removed _canCachePage
5892         * WebView/WebFrameInternal.h: Ditto
5893
5894 2007-03-13  Beth Dakin  <bdakin@apple.com>
5895
5896         Reviewed by Maciej.
5897
5898         Fix for <rdar://problem/4277074> 8F32: Help Viewer crashed on 
5899         clicking link - KHTMLView::viewportMouseReleaseEvent (12647)
5900
5901         Re-set the DocumentLoader's frame when loading it from the page 
5902         cache before setting the document view.
5903
5904         * WebCoreSupport/WebFrameLoaderClient.mm:
5905         (WebFrameLoaderClient::setDocumentViewFromPageCache):
5906
5907 2007-03-13  Timothy Hatcher  <timothy@apple.com>
5908
5909         Reviewed by Geoff.
5910
5911         <rdar://problem/5057117> Spoof user agent on Yahoo.com with Safari and WebKit as version 4xx
5912
5913         * Plugins/WebBaseNetscapePluginView.mm:
5914         (-[WebBaseNetscapePluginView userAgent]): Stop using the deprecated lossyCString method.
5915         * WebCoreSupport/WebFrameBridge.mm: Removed dead code, userAgentForURL: wasn't used.
5916         * WebCoreSupport/WebFrameLoaderClient.mm:
5917         (WebFrameLoaderClient::userAgent): Call WebView's _userAgentForURL:.
5918         * WebView/WebView.mm:
5919         (-[WebView _cachedResponseForURL:]): Call userAgentForURL: instead of _userAgent.
5920         (-[WebView userAgentForURL:]): Call _userAgentForURL:.
5921         (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): New method to construct a UA.
5922         (-[WebView _computeUserAgent]): Ractored out into _userAgentWithApplicationName:andWebKitVersion:
5923         (-[WebView _userAgentForURL:]): Tail compare for Yahoo.com, and return a UA with an older WebKit version.
5924         * WebView/WebViewInternal.h: Declare _userAgentForURL:.
5925
5926 2007-03-12  David Harrison  <harrison@apple.com>
5927
5928         Reviewed by Darin.
5929
5930         <rdar://problem/4743256> ctrl-y key binding (yank) should do nothing when kill ring is empty
5931
5932         Test updated:
5933         * editing/pasteboard/emacs-cntl-y-001.html:
5934         
5935         * WebView/WebHTMLView.mm:
5936         (-[WebHTMLView yank:]):
5937         (-[WebHTMLView yankAndSelect:]):
5938         Do nothing if the killring is empty.
5939
5940 2007-03-12  Darin Adler  <darin@apple.com>
5941
5942         Reviewed by Tim Hatcher.
5943
5944         - update for the new naming scheme for the Objective-C wrapper-creation
5945           functions: _wrapElement: instead of _elementWith:, etc.
5946
5947         * WebCoreSupport/WebEditorClient.mm:
5948         (WebEditorClient::textFieldDidBeginEditing):
5949         (WebEditorClient::textFieldDidEndEditing):
5950         (WebEditorClient::textDidChangeInTextField):
5951         (WebEditorClient::doTextFieldCommandFromEvent):
5952         (WebEditorClient::textWillBeDeletedInTextField):
5953         (WebEditorClient::textDidChangeInTextArea):
5954         * WebCoreSupport/WebFrameLoaderClient.mm:
5955         (WebFrameLoaderClient::createPlugin):
5956         (WebFrameLoaderClient::createJavaAppletWidget):
5957         * WebView/WebFrame.mm: (kit):
5958         Use the _wrapElement-style functions.
5959
5960 2007-03-12  Anders Carlsson  <acarlsson@apple.com>
5961
5962         Reviewed by Maciej.
5963
5964         <rdar://problem/5057575> 
5965         REGRESSION: Repro Crash in FrameLoader::frame loading about:blank in PLT
5966         
5967         Always get the web view from the current web frame, since the document loader's frame can have been zeroed out
5968         (for example when detaching the document loader).
5969         
5970         * WebCoreSupport/WebFrameLoaderClient.mm:
5971         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
5972         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
5973         (WebFrameLoaderClient::dispatchWillSendRequest):
5974         (WebFrameLoaderClient::dispatchDidReceiveResponse):
5975         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
5976         (WebFrameLoaderClient::dispatchDidFinishLoading):
5977
5978 2007-03-11  Oliver Hunt  <oliver@apple.com>
5979
5980         Reviewed by Adele.
5981         
5982         Moved respondToChangedSelection from FrameBridge to EditorClient
5983         
5984         * WebCoreSupport/WebEditorClient.h:
5985         * WebCoreSupport/WebEditorClient.mm:
5986         (WebEditorClient::respondToChangedSelection):
5987         * WebCoreSupport/WebFrameBridge.mm:
5988           Removed respondToChangedSelection from bridge
5989
5990 2007-03-11  Darin Adler  <darin@apple.com>
5991
5992         Reviewed by Adele.
5993
5994         - fix http://bugs.webkit.org/show_bug.cgi?id=12964
5995           <rdar://problem/5045717> REGRESSION: crash in -[WebBaseNetscapePluginStream _deliverData]
5996           at simpsonsmovie.com (12964)
5997
5998         * Plugins/WebBaseNetscapePluginStream.m:
5999         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
6000         At every place we call the plug-in, since it could destroy the stream, get pluginView into a local
6001         variable; it will be set to nil if the stream is destroyed.
6002         (-[WebBaseNetscapePluginStream _destroyStream]): Added calls to retain/release to handle the case where
6003         one of the calls to the plug-in destroys the stream. Added a call to cancelPreviousPerformRequestsWithTarget
6004         in case _deliverData has been scheduled but not yet delivered. Also get pluginView into a local variable
6005         as mentioned above, and check at strategic points and exit if the stream was already destroyed to avoid
6006         multiple calls to NPP_DestroyStream or NPP_URLNotify.
6007         (-[WebBaseNetscapePluginStream _deliverData]): Ditto.
6008
6009 2007-03-10  Geoffrey Garen  <ggaren@apple.com>
6010
6011         Reviewed by Darin Adler.
6012
6013         Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and 
6014         JSCore causes a hang @ www.panoramas.dk
6015         
6016         See JavaScriptCore ChangeLog for details.
6017
6018         Drop the JSLock before making calls through the plug-in API from functions
6019         that may have been called by JavaScript.
6020         
6021         * Plugins/WebBaseNetscapePluginView.mm:
6022         (-[WebBaseNetscapePluginView sendEvent:]):
6023         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
6024         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
6025         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
6026         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
6027         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
6028         (-[WebBaseNetscapePluginView loadPluginRequest:]):
6029         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
6030         * Plugins/WebPluginController.mm:
6031         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
6032         (-[WebPluginController startAllPlugins]):
6033         (-[WebPluginController stopAllPlugins]):
6034         (-[WebPluginController addPlugin:]):
6035         (-[WebPluginController destroyPlugin:]):
6036         (-[WebPluginController destroyAllPlugins]):
6037
6038 2007-03-10  David Kilzer  <ddkilzer@webkit.org>
6039
6040         Reviewed by Darin.
6041
6042         - fix http://bugs.webkit.org/show_bug.cgi?id=9609
6043           REGRESSION: Missing image icon needs to be moved back to WebKit
6044
6045         * WebView/WebHTMLView.mm:
6046         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
6047         Use WebCore::Image::loadPlatformResource(const char*) to load the missingImage image.
6048
6049 2007-03-10  Mark Rowe  <mrowe@apple.com>
6050
6051         Reviewed by John.
6052
6053         <rdar://problem/5051827> HIWebView handling of kEventControlGetData is broken in 64-bit
6054
6055         On Leopard the kEventParamControlDataBufferSize event parameter is of type typeByteCount.
6056         The 32-bit implementation of GetEventParameter will coerce between integer types and
6057         typeByteCount while the 64-bit version will return a failure. As typeByteCount is new
6058         in Leopard we must continue using typeSInt32 when building for Tiger.
6059
6060         * Carbon/HIWebView.m:
6061         (HIWebViewEventHandler):
6062
6063 2007-03-09  Timothy Hatcher  <timothy@apple.com>
6064
6065         Reviewed by Darin.
6066
6067         <rdar://problem/4976254> Please get off _NSSoftLinkingGetFrameworkFuncPtr
6068
6069         Use dlopen and dlsym to access the DCSShowDictionaryServiceWindow function.
6070
6071         * WebView/WebHTMLView.mm:
6072         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
6073
6074 2007-03-09  Darin Adler  <darin@apple.com>
6075
6076         Reviewed by Justin.
6077
6078         - fix http://bugs.webkit.org/show_bug.cgi?id=8928
6079           <rdar://problem/5045708> REPRODUCIBLE ASSERT: Cannot paste HTML into a
6080           contenteditable region in an XHTML document (8928)
6081
6082         * WebView/WebHTMLView.mm:
6083         (-[WebHTMLView _hasHTMLDocument]): Added.
6084         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
6085         Don't call AppKit's conversion from the DOM to an attributed string if the document
6086         is not an HTML document, to work around an AppKit limitation (Radar 5052390).
6087
6088 2007-03-09  Darin Adler  <darin@apple.com>
6089
6090         * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
6091
6092 2007-03-08  Mark Rowe  <mrowe@apple.com>
6093
6094         Reviewed by Tim Hatcher.
6095
6096         <rdar://problem/5051616> Mouse clicks and movement are ignored in HIWebView on 64-bit
6097
6098         Mouse events are not being handled correctly as GetControlKind is returning an error
6099         on 64-bit.  The more modern HIObjectIsOfClass behaves correctly for this use.
6100
6101         * Carbon/HIWebView.m:
6102         (HIWebViewDestructor):
6103         (WindowHandler): Use HIObjectIsOfClass in place of GetControlKind.
6104         (HIWebViewEventHandler): Don't leak the NSEvent.
6105
6106 2007-03-08  Bruce Q Hammond  <bruceq@apple.com>
6107
6108         Reviewed by Darin.
6109
6110         Fix for http://bugs.webkit.org/show_bug.cgi?id=13009
6111         Console spews "CGContextGetType: invalid context" non-stop on web site
6112
6113         * Plugins/WebBaseNetscapePluginView.mm:
6114         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
6115         (-[WebBaseNetscapePluginView restorePortState:]):
6116
6117 2007-03-08  Mark Rowe  <mrowe@apple.com>
6118
6119         Reviewed by Tim Hatcher.
6120
6121         <rdar://problem/4561772> HIWebView does not exist for 64-bit
6122
6123         Update HIWebView and friends to work without QuickDraw.
6124
6125         Changes are gleaned from the 64-bit support inside HICocoaView.  The main
6126         fact of interest are that all Carbon windows must have compositing enabled
6127         so the code paths that aren't accessible are #ifdef'd out.  Conveniently
6128         these are the exact code paths that make use of QuickDraw.
6129
6130         There are currently minor event-handling and invalidation issues running as
6131         64-bit that are not present in 32-bit.
6132
6133         * Carbon/CarbonUtils.m:
6134         * Carbon/CarbonWindowAdapter.m:
6135         * Carbon/CarbonWindowFrame.m:
6136         * Carbon/HIViewAdapter.m:
6137         (SetViewNeedsDisplay):
6138         * Carbon/HIWebView.m:
6139         (Draw):
6140         (Click):
6141         (SyncFrame):
6142         (StartUpdateObserver):
6143         (StopUpdateObserver):
6144         (UpdateObserver):
6145         * WebKit.LP64.exp: Removed.
6146         * WebKit.xcodeproj/project.pbxproj: Always use WebKit.exp.
6147
6148 2007-03-08  Timothy Hatcher  <timothy@apple.com>
6149
6150         Reviewed by John.
6151
6152         <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context
6153
6154         Added new methods to the WebHTMLHighlighter protocol that include the DOMNode being painted.
6155
6156         * WebCoreSupport/WebFrameBridge.mm:
6157         (-[WebFrameBridge customHighlightRect:forLine:representedNode:WebCore::]):
6158         (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:entireLine:representedNode:WebCore::]):
6159         * WebKit.xcodeproj/project.pbxproj:
6160         * WebView/WebHTMLViewPrivate.h:
6161
6162 2007-03-08  Anders Carlsson  <acarlsson@apple.com>
6163
6164         Try fixing the buildbot build.
6165         
6166         * Plugins/WebBaseNetscapePluginView.mm:
6167         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
6168
6169 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
6170
6171         Leopard build fix.
6172         
6173         * Plugins/WebBaseNetscapePluginView.mm:
6174
6175 2007-03-07  Bruce Q Hammond  <bruceq@apple.com>
6176
6177         Reviewed by Darin.
6178
6179         - fix http://bugs.webkit.org/show_bug.cgi?id=12515
6180           Plug-ins that draw through the Quickdraw interface fail in a CGBitmapContex.
6181           <rdar://problem/4975122>
6182
6183         This fixes a problem with Netscape-style Plug-ins which draw through the Quickdraw APIs
6184         being unable to render into offscreen bitmap contexts.
6185
6186         This patches both saveAndSetNewPortStateForUpdate: and restorePortState:
6187         These methods now check the current context and see if appropriate setup/cleanup needs to be done
6188         for offscreen rendering.
6189
6190         * Plugins/WebBaseNetscapePluginView.mm:
6191         (QDPixelFormatFromCGBitmapInfo):
6192         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
6193         (-[WebBaseNetscapePluginView restorePortState:]):
6194
6195 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
6196
6197         Reviewed by Darin.
6198
6199         Use HardRetain/HardRelease.
6200         
6201         * WebView/WebDocumentLoaderMac.mm:
6202         (WebDocumentLoaderMac::setDataSource):
6203         (WebDocumentLoaderMac::attachToFrame):
6204         (WebDocumentLoaderMac::detachFromFrame):
6205         (WebDocumentLoaderMac::increaseLoadCount):
6206         (WebDocumentLoaderMac::decreaseLoadCount):
6207
6208 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
6209
6210         Reviewed by Maciej.
6211
6212         <rdar://problem/4961259> 
6213         REGRESSION: Bumper Car 2.1.1 - Crash at WebCore::FrameLoader::receivedMainResourceError when encountering a invalid URL address
6214         
6215         (The crash was already fixed, this actually makes Bumper Car load the error page correctly.)
6216         
6217         This adds a "load counter" to the document loader and keeps the data source retained for as long as something is loading. 
6218         
6219         * WebCoreSupport/WebFrameLoaderClient.mm:
6220         (WebFrameLoaderClient::dispatchWillSendRequest):
6221         Increase the load counter.
6222         
6223         (WebFrameLoaderClient::dispatchDidFinishLoading):
6224         (WebFrameLoaderClient::dispatchDidFailLoading):
6225         Decrease the load counter,
6226         
6227         * WebView/WebDocumentLoaderMac.h:
6228         * WebView/WebDocumentLoaderMac.mm:
6229         (WebDocumentLoaderMac::WebDocumentLoaderMac):
6230         
6231         (WebDocumentLoaderMac::attachToFrame):
6232         If the document loader has been detached, make sure to retain its data source here.
6233         
6234         (WebDocumentLoaderMac::detachFromFrame):
6235         Release the data source.
6236         
6237         (WebDocumentLoaderMac::increaseLoadCount):
6238         Retain the data source if load count was 0.
6239         
6240         (WebDocumentLoaderMac::decreaseLoadCount):
6241         Release the data source if load count becomes 0
6242
6243 2007-03-07  Adele Peterson  <adele@apple.com>
6244
6245         Reviewed by Darin.
6246
6247         WebKit part of fix for:
6248         http://bugs.webkit.org/show_bug.cgi?id=10871
6249         http://bugs.webkit.org/show_bug.cgi?id=12677
6250         <rdar://problem/4823129> REGRESSION: IME key events different in nightly
6251         <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm a clause in kotoeri
6252
6253         * WebView/WebHTMLView.mm:
6254         (-[WebHTMLView _interceptEditingKeyEvent: shouldSaveCommand:]): Added shouldSaveCommand field to WebHTMLViewInterpretKeyEventsParameters.
6255           When shouldSaveCommand is true, we call interpretKeyEvents and in doCommandBySelector and insertText, we just save the information without performing any action.
6256           When shouldSaveCommand is false, we used the saved information and call doCommandBySelector and insertText directly.
6257           If there's no saved command data in the KeyboardEvent, call interpretKeyEvents, and honor the shouldSaveCommand argument.  This allows repeating keypress events
6258           to function normally.
6259         (-[WebHTMLView doCommandBySelector:]): If the WebHTMLViewInterpretKeyEventsParameters shouldSaveCommand field is set, then
6260           just save the selector information in the KeyboardEvent, and don't perform the action.
6261         (-[WebHTMLView insertText:]): ditto. 
6262           insertText can be called from an input method or from normal key event processing
6263           If its from an input method, then we should go ahead and insert the text now.  
6264           The only way we know if its from an input method is to check hasMarkedText.  There might be a better way to do this.
6265
6266         * WebView/WebHTMLViewInternal.h: Added shouldSaveCommand argument.
6267         * WebView/WebViewInternal.h: ditto.
6268
6269         * WebCoreSupport/WebEditorClient.h:
6270         * WebCoreSupport/WebEditorClient.mm:
6271         (WebEditorClient::handleKeypress): Changed handleKeyPress to handleKeypress.  Call _interceptEditingKeyEvent with shouldSaveCommand:NO.
6272         (WebEditorClient::handleInputMethodKeypress):  Call _interceptEditingKeyEvent with shouldSaveCommand:YES.
6273
6274 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
6275
6276         Reviewed by Brady.
6277
6278         Update to match WebCore.
6279         
6280         * Plugins/WebNetscapePluginStream.mm:
6281         (-[WebNetscapePluginStream start]):
6282
6283 2007-03-07  Jim Correia  <jim.correia@pobox.com>
6284
6285         Reviewed by Darin.
6286
6287         - WebCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
6288           WebArchiver - attempt to insert nil exception when archive empty iframe
6289
6290         When dealing with an iframe element with no src attribute, the element contains
6291         a src attribute in the DOM with a URL of "about:blank" and some HTML to implement
6292         the blank page.  In the original page source, however, the iframe element does
6293         not include a src attribute, which caused a nil archive to be returned for the
6294         childFrameArchive and thus caused the bug.  The fix is a simple nil check.
6295
6296         Test: webarchive/archive-empty-frame-source.html
6297
6298         * WebView/WebArchiver.mm:
6299         (+ (NSArray *)_subframeArchivesForFrame:(WebFrame *)frame): Don't add childFrameArchive 
6300         to the subframeArchives array if it is nil.
6301
6302 2007-03-06  John Sullivan  <sullivan@apple.com>
6303
6304         Reviewed by Darin
6305         
6306         Made WebAuthenticationHandler.h SPI so Safari can call it directly.
6307
6308         * WebKit.exp:
6309         added .objc_class_name_WebPanelAuthenticationHandler
6310         * WebKit.xcodeproj/project.pbxproj:
6311         changed status of WebAuthenticationHandler.h from "project" to "private"
6312
6313 2007-03-06  Kevin McCullough  <kmccullough@apple.com>
6314
6315         Reviewed by Darin.
6316
6317         - Rename a function to clarify its purpose.
6318
6319         * WebView/WebView.mm:
6320         (+[WebView registerURLSchemeAsLocal:]):
6321         * WebView/WebViewPrivate.h:
6322
6323 2007-03-06  Anders Carlsson  <acarlsson@apple.com>
6324
6325         Reviewed by Adam.
6326
6327         Update for WebCore changes.
6328         
6329         * WebCoreSupport/WebFrameLoaderClient.h:
6330         * WebCoreSupport/WebFrameLoaderClient.mm:
6331         (WebFrameLoaderClient::userAgent):
6332
6333 2007-03-05  Anders Carlsson  <acarlsson@apple.com>
6334
6335         Reviewed by Adam, Darin.
6336  
6337         <rdar://problem/5025212>
6338         In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
6339
6340         * Plugins/WebBaseNetscapePluginView.mm:
6341         (-[WebBaseNetscapePluginView loadPluginRequest:]):
6342         Handle the case where the web view returned from the delegate method is null. Also, send out an error notification
6343         in that case so we can catch it.
6344
6345 2007-03-05  John Sullivan  <sullivan@apple.com>
6346
6347         Reviewed by Darin and Kevin D
6348
6349         - fixed <rdar://problem/5038087> Header and footer on printed page are too large after certain steps
6350
6351         * WebView/WebView.mm:
6352         (-[WebView _adjustPrintingMarginsForHeaderAndFooter]):
6353         This method was modifying the margins in the NSPrintInfo object without any sort of check whether
6354         this had already been done. In some cases this can be called multiple times with the same 
6355         NSPrintInfo, so now we stash information in the NSPrintInfo's dictionary such that we always
6356         start with a fresh copy of the original margins.
6357
6358 2007-03-02  Kevin McCullough  <kmccullough@apple.com>
6359
6360         Reviewed by Geoff.
6361
6362         - rdar://problem/4922454
6363         - This fixes a security issue by making remote referrers not able to access local
6364         resources, unless they register their schemes to be treated as local. The result is
6365         that those schemes can access local resources and cannot be accessed by remote
6366         referrers.
6367         Because this behavior is new a link-on-or-after check is made to determine if the
6368         app should use the older, less safe, behavior.
6369
6370         * Misc/WebKitVersionChecks.h: added linked-on-or-after check
6371         * Misc/WebNSAttributedStringExtras.mm: Moved functionalit into the base class.
6372         (fileWrapperForElement):
6373         * Plugins/WebNetscapePluginStream.mm: uses new canLoad functions
6374         * Plugins/WebPluginContainerCheck.mm: uses new canLoad functions
6375         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
6376         * WebView/WebView.mm: make linked-on-or-after check and cache value, exposes SPI
6377         for registering a scheme as local. 
6378         (-[WebView _commonInitializationWithFrameName:groupName:]):
6379         (+[WebView registerSchemeAsLocal:]):
6380         * WebView/WebViewPrivate.h: exposes SPI for registering a scheme as local.
6381
6382 2007-03-01  Justin Garcia  <justin.garcia@apple.com>
6383
6384         Reviewed by harrison
6385         
6386         <rdar://problem/4838199>
6387         Integrate Mail and WebKit paste operations
6388         
6389         Provide subresources used to create the fragment as a
6390         convenience.
6391
6392         * WebView/WebHTMLView.mm:
6393         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
6394         Update the calls to the changed method.
6395         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
6396         Give the caller the subresources in the WebArchive and RTF cases.
6397         * WebView/WebHTMLViewPrivate.h:
6398
6399 2007-02-28  Oliver Hunt  <oliver@apple.com>
6400
6401         Reviewed by Maciej.
6402
6403         Fixes <rdar://problem/5012009>
6404         
6405         When looking for a requested resource we should also check
6406         the set of manually added subresources if WebCore can't find it. 
6407
6408         * WebView/WebDataSource.mm:
6409         (-[WebDataSource subresourceForURL:]):
6410
6411 2007-02-28  Brady Eidson  <beidson@apple.com>
6412
6413         Reviewed by Beth
6414
6415         Start using the Thread Safety Check implemented in WebCore for the DOM bindings in the rest of
6416         the WebKit API instead of the ASSERT_MAIN_THREAD() hack
6417
6418         * History/WebBackForwardList.mm:
6419         (-[WebBackForwardList initWithWebCoreBackForwardList:]):
6420         (-[WebBackForwardList init]):
6421         (-[WebBackForwardList dealloc]):
6422         (-[WebBackForwardList finalize]):
6423         * History/WebHistoryItem.mm:
6424         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
6425         (-[WebHistoryItem dealloc]):
6426         (-[WebHistoryItem finalize]):
6427         (-[WebHistoryItem copyWithZone:]):
6428         (-[WebHistoryItem initWithWebCoreHistoryItem:]):
6429         * Misc/WebIconDatabase.mm:
6430         (-[WebIconDatabase init]):
6431
6432 2007-02-28  Adele Peterson  <adele@apple.com>
6433
6434         Reviewed by Beth.
6435
6436         Fix for <rdar://problem/4887423> REGRESSION: search results popup menu strings are not localized
6437         and <rdar://problem/3517227> accessibility-related strings in WebCore are not localized
6438
6439         * WebCoreSupport/WebViewFactory.mm:
6440         (-[WebViewFactory searchMenuNoRecentSearchesText]):
6441         (-[WebViewFactory searchMenuRecentSearchesText]):
6442         (-[WebViewFactory searchMenuClearRecentSearchesText]):
6443         (-[WebViewFactory AXWebAreaText]):
6444         (-[WebViewFactory AXLinkText]):
6445         (-[WebViewFactory AXListMarkerText]):
6446         (-[WebViewFactory AXImageMapText]):
6447         (-[WebViewFactory AXHeadingText]):
6448
6449 2007-02-28  Mark Rowe  <mrowe@apple.com>
6450
6451         Reviewed by Maciej.
6452
6453         <rdar://problem/5028473> WebKit allocates a huge number of NSCalendarDates while loading history file
6454
6455         * History/WebHistory.mm:
6456         (-[WebHistoryPrivate insertItem:atDateIndex:]): Use lastVisitedTimeInterval rather than _lastVisitedDate to avoid allocating NSCalendarDates.
6457
6458 2007-02-28  Mark Rowe  <mrowe@apple.com>
6459
6460         Reviewed by Tim Hatcher.
6461
6462         <rdar://problem/4985524> Problem with Blot and ToT WebKit (decoding WebCoreScrollView)
6463
6464         References to WebCoreScrollView as a subview of a WebHTMLView may be present in some NIB
6465         files, so NSUnarchiver must be still able to look up the WebCoreScrollView class.
6466
6467         * WebKit.exp: Export WebCoreScrollView symbol.
6468         * WebView/WebHTMLView.mm: Add empty WebCoreScrollView class.
6469
6470 2007-02-27  Adam Roben  <aroben@apple.com>
6471
6472         Reviewed by Beth.
6473
6474         Fix <rdar://problem/5011905> REGRESSION: "Open Link" contextual menu
6475         item appears twice
6476
6477         * WebCoreSupport/WebContextMenuClient.mm:
6478         (fixMenusToSendToOldClients): Remove the "Open Link" item from the
6479         default menu items array before sending it off to Tiger Mail.
6480         (WebContextMenuClient::getCustomMenuFromDefaultItems): Set the
6481         representedObject on every NSMenuItem to match our old (correct) API
6482         behavior.
6483
6484 2007-02-27  Mitz Pettel  <mitz@webkit.org>
6485
6486         Reviewed by Darin.
6487
6488         - http://bugs.webkit.org/show_bug.cgi?id=12906
6489           REGRESSION: Canvas is pixelated when the page is opened in a background tab
6490
6491         * WebCoreSupport/WebChromeClient.mm:
6492         (WebChromeClient::scaleFactor): If the view is not in a window, use the main
6493         screen's scale factor as a best guess.
6494
6495 2007-02-26  John Sullivan  <sullivan@apple.com>
6496
6497         Reviewed by Darin and Geoff
6498
6499         * WebView/WebHTMLView.mm:
6500         (coreGraphicsScreenPointForAppKitScreenPoint):
6501         This method was copied from WebBrowser, and it was wrong. Fixed it. This only
6502         affects the Dictionary pop-up panel.
6503
6504 2007-02-26  David Hyatt  <hyatt@apple.com>
6505
6506         Update web inspector to account for border-fit.
6507
6508         Reviewed by darin
6509
6510         * WebInspector/webInspector/inspector.js:
6511
6512 2007-02-26  Geoffrey Garen  <ggaren@apple.com>
6513
6514         Reviewed by Darin Adler.
6515         
6516         Re-arranged things to put deprecated methods at the bottom.
6517
6518         * Misc/WebCoreStatistics.h:
6519         * Misc/WebCoreStatistics.mm:
6520         (+[WebCoreStatistics javaScriptNoGCAllowedObjectsCount]):
6521         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
6522         (+[WebCoreStatistics javaScriptRootObjectClasses]):
6523         * WebKit.xcodeproj/project.pbxproj:
6524
6525 2007-02-26  Maciej Stachowiak  <mjs@apple.com>
6526
6527         Rubber stamped by Mitz.
6528         
6529         - fix layout tests by fixing discrepancy in feature macros.
6530
6531         * WebInspector/WebInspector.m:
6532         (-[WebInspector _highlightNode:]):
6533         * WebKit.xcodeproj/project.pbxproj:
6534
6535 2007-02-23  Mitz Pettel  <mitz@webkit.org>
6536
6537         Reviewed by Maciej.
6538
6539         - fix http://bugs.webkit.org/show_bug.cgi?id=11573
6540           REGRESSION: pressing option-left arrow while in suggestion popup moves the insertion point to the left
6541
6542         * WebView/WebHTMLView.mm:
6543         (-[WebTextCompleteController endRevertingChange:moveLeft:]):
6544
6545 2007-02-23  Timothy Hatcher  <timothy@apple.com>
6546
6547         Reviewed by Brady.
6548
6549         <rdar://problem/5016395> _recursive_pauseNullEventsForAllNetscapePlugins still gone
6550
6551         * WebView/WebFrameInternal.h: Remove _recursive_pauseNullEventsForAllNetscapePlugins
6552         * WebView/WebFramePrivate.h: Add _recursive_pauseNullEventsForAllNetscapePlugins
6553         * WebView/WebFrame.mm: More _recursive_pauseNullEventsForAllNetscapePlugins
6554
6555 2007-02-22  Adele Peterson  <adele@apple.com>
6556
6557         Reviewed by John.
6558
6559         Updating this image to match the one in WebCore.
6560
6561         * WebKit.vcproj/textAreaResizeCorner.png:
6562
6563 2007-02-22  Beth Dakin  <bdakin@apple.com>
6564
6565         Reviewed by Adam.
6566
6567         Fix for http://bugs.webkit.org/show_bug.cgi?id=12399 REGRESSION: 
6568         Unable to prevent default context menu from appearing. <rdar://
6569         problem/5017416>
6570
6571         * WebView/WebHTMLView.mm:
6572         (-[WebHTMLView menuForEvent:]): Clear the controller's context menu 
6573         before propagating a new context menu event through the DOM.
6574
6575 2007-02-22  John Sullivan  <sullivan@apple.com>
6576
6577         Reviewed by Darin
6578         
6579         Removed some unused keyView-related code that I happened to run across.
6580         Replacement code is now in WebChromeClient.
6581
6582         * WebCoreSupport/WebFrameBridge.h:
6583         * WebCoreSupport/WebFrameBridge.mm:
6584         removed unused stuff
6585
6586 2007-02-22  Mitz Pettel  <mitz@webkit.org>
6587
6588         Reviewed by Maciej.
6589
6590         - fix http://bugs.webkit.org/show_bug.cgi?id=12804
6591           REGRESSION (r19043-r19063): suggestion popup doesn't work after pressing Option+Esc
6592
6593         This patch also fixes a bug where using the arrow keys while
6594         the suggestion popup is open moves the caret instead of changing the
6595         selection in the popup (for up/down) or accepting the selection and
6596         closing the popup (for left/right).
6597
6598         * WebView/WebHTMLView.mm:
6599         (-[WebHTMLView keyDown:]): Changed to close the popup only if it was open
6600         before the current event, so that the Option-Esc that opens the popup will
6601         not close it immediately.
6602         (-[WebHTMLView _interceptEditingKeyEvent:]): Give the completion popup a
6603         chance to intercept keydown events.
6604         (-[WebTextCompleteController popupWindowIsOpen]): Added. Returns whether the
6605         suggestion popup is open.
6606
6607 2007-02-22  Mitz Pettel  <mitz@webkit.org>
6608
6609         Reviewed by Mark (age 21).
6610
6611         - fix http://bugs.webkit.org/show_bug.cgi?id=12805
6612           REGRESSION: suggestion popup has a disabled scroll bar
6613
6614         * WebView/WebHTMLView.mm:
6615         (-[WebTextCompleteController _buildUI]): Uncommented the call to the NSWindow
6616         SPI that forces the scroll bar to look active. Also replaced a call to
6617         the deprecated NSTableView method setAutoresizesAllColumnsToFit: with
6618         the new method setColumnAutoresizingStyle: to eliminate console spew.
6619
6620 2007-02-20  Beth Dakin  <bdakin@apple.com>
6621
6622         Reviewed by Maciej.
6623
6624         WebKit changes needed to implement writeImage() in WebCore's 
6625         Pasteboard class.
6626
6627         * Misc/WebKitNSStringExtras.m: Call into WebCore for these 
6628         implementations.
6629         (-[NSString _webkit_hasCaseInsensitiveSuffix:]):
6630         (-[NSString _webkit_hasCaseInsensitiveSubstring:]):
6631         (-[NSString _webkit_filenameByFixingIllegalCharacters]):
6632         * Misc/WebNSURLExtras.m: Same.
6633         (-[NSURL _webkit_suggestedFilenameWithMIMEType:]):
6634         * WebCoreSupport/WebContextMenuClient.h: Remove 
6635         copyImageToClipboard()
6636         * WebCoreSupport/WebContextMenuClient.mm:
6637         * WebCoreSupport/WebSystemInterface.m: Expose 
6638         GetExtensionsForMIMEType and GetPreferredExtensionForMIMEType to 
6639         WebCore.
6640         (InitWebCoreSystemInterface):
6641         * WebCoreSupport/WebViewFactory.mm: New localized string for 
6642         WebCore. 
6643         (-[WebViewFactory copyImageUnknownFileLabel]):
6644
6645 2007-02-20  Adam Roben  <aroben@apple.com>
6646
6647         Reviewed by Darin and Anders.
6648
6649         Update WebKit for WebCore fix for <rdar://problem/4736215> Make
6650         WebCoreStringTruncator use WebCore types.
6651
6652         * Misc/WebStringTruncator.m:
6653         (defaultMenuFont): Moved from WebCoreStringTruncator.mm.
6654         (core): Added.
6655         (+[WebStringTruncator centerTruncateString:toWidth:]):
6656         (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
6657         (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
6658         (+[WebStringTruncator widthOfString:font:]):
6659         * WebKit.xcodeproj/project.pbxproj: Changed WebStringTruncator to ObjC++.
6660
6661 2007-02-20  Timothy Hatcher  <timothy@apple.com>
6662
6663         Reviewed by John.
6664
6665         Fixes the version number returned when using a CFBundleVersion of "420+".
6666
6667         * WebView/WebView.mm:
6668         (-[WebView _userVisibleBundleVersionFromFullVersion:]): Check the length up to the first
6669         non-decimal digit, so this works with versions that have "." and "+".
6670
6671 2007-02-20  John Sullivan  <sullivan@apple.com>
6672
6673         Reviewed by Kevin Decker
6674         
6675         - fixed <rdar://problem/4989344> REGRESSION: After clicking on page, Find
6676         won't find anything if all hits are before the clicked point
6677         
6678         This was caused by a mismatch between WebCore's search code's notion of "selection" and
6679         WebView's search code's notion of "selection". WebCore's search code was starting 
6680         just before or just after the "selection", which included collapsed, zero-length
6681         selections. WebKit's search code was only considering non-zero-length selections,
6682         and would not search all of the content when there was a zero-length selection.
6683         The fix was to make WebKit ignore the selection. This has a side effect of increasing 
6684         the amount of redundantly-searched content in the case where no matches are found. To
6685         compensate for that, I special-cased the most common case of WebViews with a single frame, 
6686         to avoid ever searching redundantly in those.
6687
6688         * WebView/WebView.mm:
6689         (-[WebView searchFor:direction:caseSensitive:wrap:startInSelection:]):
6690         remove startHasSelection ivar; special-case WebViews with only one frame; clarify the
6691         code that leads to redundant searching with comments.
6692
6693 2007-02-20  Timothy Hatcher  <timothy@apple.com>
6694
6695         Reviewed by Darin.
6696
6697         <rdar://problem/4900579> WebKit -finalize methods are not thread-safe; design change needed
6698
6699         Call WebCoreObjCFinalizeOnMainThread from the initialize method of all the classes
6700         that have a finalizer that needs called on the main thread. Assert in finalize that we
6701         are on the main thread.
6702
6703         * Carbon/CarbonWindowAdapter.m:
6704         (+[CarbonWindowAdapter initialize]):
6705         (-[CarbonWindowAdapter finalize]):
6706         * History/WebBackForwardList.mm:
6707         (+[WebBackForwardList initialize]):
6708         (-[WebBackForwardList finalize]):
6709         * History/WebHistoryItem.mm:
6710         (+[WebHistoryItem initialize]):
6711         * Misc/WebElementDictionary.mm:
6712         (+[WebElementDictionary initialize]):
6713         (-[WebElementDictionary finalize]):
6714         * Plugins/WebBaseNetscapePluginStream.m:
6715         (+[WebBaseNetscapePluginStream initialize]):
6716         (-[WebBaseNetscapePluginStream finalize]):
6717         * Plugins/WebBaseNetscapePluginView.mm:
6718         (+[WebBaseNetscapePluginView initialize]):
6719         (-[WebBaseNetscapePluginView finalize]):
6720         * Plugins/WebBasePluginPackage.m:
6721         (+[WebBasePluginPackage initialize]):
6722         (-[WebBasePluginPackage finalize]):
6723         * Plugins/WebNetscapePluginStream.mm:
6724         (-[WebNetscapePluginStream finalize]):
6725         * WebCoreSupport/WebEditorClient.mm:
6726         (+[WebEditCommand initialize]):
6727         (-[WebEditCommand finalize]):
6728         * WebCoreSupport/WebFrameBridge.mm:
6729         (+[WebFrameBridge initialize]):
6730         (-[WebFrameBridge finalize]):
6731         * WebCoreSupport/WebFrameLoaderClient.mm:
6732         (+[WebFramePolicyListener initialize]):
6733         (-[WebFramePolicyListener finalize]):
6734         * WebView/WebHTMLView.mm:
6735         (+[WebHTMLView initialize]):
6736         (-[WebHTMLView finalize]):
6737         * WebView/WebView.mm:
6738         (+[WebViewPrivate initialize]):
6739         (-[WebViewPrivate finalize]):
6740
6741 2007-02-20  Justin Garcia  <justin.garcia@apple.com>
6742
6743         Reviewed by darin
6744         
6745         <rdar://problem/4838199>
6746         Integrate Mail and WebKit paste operations
6747         
6748         Mail overrides paste: because it has different
6749         preferred pasteboard types, but it should use our
6750         fragment creation code.
6751
6752         * WebView/WebHTMLView.mm:
6753         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
6754         Moved fragment creation code into a new method.
6755         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:]):
6756         Moved fragment creation code here.
6757         * WebView/WebHTMLViewPrivate.h: Exposed 
6758         _documentFragmentFromPasteboard:forType:inContext: as SPI.
6759
6760 2007-02-20  John Sullivan  <sullivan@apple.com>
6761
6762         Reviewed by Tim Hatcher
6763
6764         * Misc/WebKitNSStringExtras.h:
6765         * Misc/WebKitNSStringExtras.m:
6766         removed _webkit_userVisibleBundleVersionFromFullVersion; we decided to do this without
6767         adding SPI for it.
6768
6769         * WebView/WebView.mm:
6770         (-[WebView _userVisibleBundleVersionFromFullVersion:]):
6771         new method, moved here from WebKitNSStringExtras, and is now a WebView method rather than
6772         an NSString method
6773         (-[WebView _computeUserAgent]):
6774         updated for method signature change
6775
6776 2007-02-20  Timothy Hatcher  <timothy@apple.com>
6777
6778         Reviewed by John.
6779
6780         * Misc/WebKitNSStringExtras.h: Added _webkit_userVisibleBundleVersionFromFullVersion.
6781         * Misc/WebKitNSStringExtras.m:
6782         (-[NSString _webkit_userVisibleBundleVersionFromFullVersion]): If the version is 4 digits long or longer,
6783         then the first digit represents the version of the OS. Our user agent string should not
6784         include this first digit, so strip it off and report the rest as the version.
6785         * WebView/WebView.mm:
6786         (-[WebView _computeUserAgent]): Call _webkit_userVisibleBundleVersionFromFullVersion on the CFBundleVersion.
6787
6788 2007-02-20  Darin Adler  <darin@apple.com>
6789
6790         Reviewed by Anders.
6791
6792         * Plugins/WebPluginController.mm: (-[WebPluginController pluginView:receivedResponse:]):
6793         Call cancelMainResourceLoad on the document loader instead of the frame loader.
6794
6795 2007-02-20  Anders Carlsson  <acarlsson@apple.com>
6796
6797         Reviewed by Mitz.
6798
6799         <rdar://problem/5009627> REGRESSION: Repro overrelease of WebView in failed load, seen in DumpRenderTree
6800         
6801         * WebView/WebView.mm:
6802         (-[WebView _removeObjectForIdentifier:]):
6803         Return early if the identifier can't be found in the map.
6804
6805 2007-02-19  Timothy Hatcher  <timothy@apple.com>
6806
6807         Reviewed by Darin Adler.
6808
6809         <rdar://problem/4841078> Remove the Mail.app editable link clicking behavior workaround when it is no longer needed
6810
6811         * WebKit.xcodeproj/project.pbxproj:
6812         * WebView/WebView.mm:
6813         (-[WebView setPreferences:]):
6814
6815 2007-02-19  Anders Carlsson  <acarlsson@apple.com>
6816
6817         Reviewed by Adam.
6818
6819         <rdar://problem/4868242>
6820         http://bugs.webkit.org/show_bug.cgi?id=12670
6821         REGRESSION: Many 3rd Party Apps crash in WebCore::DocumentLoader::frameLoader() (12670)
6822         
6823         Bring back the semantic we had that a web view should be retained for as long as something is loading. Use the identifier
6824         to object hash map for this.
6825
6826         * WebView/WebView.mm:
6827         (-[WebView _addObject:forIdentifier:]):
6828         (-[WebView _removeObjectForIdentifier:]):
6829
6830 2007-02-18  Brady Eidson  <beidson@apple.com>
6831
6832         Reviewed by Oliver
6833
6834         <rdar://problem/4985321> - Can't edit templates for Web Gallery/Web Page Export in Aperture
6835
6836         * Misc/WebKitVersionChecks.h: Add a #define for this APERTURE quirk
6837         * WebView/WebView.mm:
6838         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
6839          If the current app is Aperture and it was linked against Tiger WebKit, always allow selection change
6840
6841 2007-02-17  Lars Knoll <lars@trolltech.com>
6842
6843         Reviewed by Maciej.
6844
6845         Additional coding by Maciej, additional review by Oliver.
6846
6847         Added implementations for the new callbacks in EditorClient
6848         and ChromeClient (basically moved from WebFrameBridge).
6849         Cleaned up some code paths that are not called anymore
6850         and done fully inside WebCore now.
6851
6852         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
6853         * Misc/WebElementDictionary.mm:
6854         * Misc/WebNSAttributedStringExtras.mm:
6855         * Plugins/WebBaseNetscapePluginView.mm:
6856         (-[WebBaseNetscapePluginView getVariable:value:]):
6857         * Plugins/WebNetscapePluginEmbeddedView.mm:
6858         * Plugins/WebNetscapePluginStream.mm:
6859         * Plugins/WebPluginContainerCheck.mm:
6860         * WebCoreSupport/WebChromeClient.h:
6861         * WebCoreSupport/WebChromeClient.mm:
6862         (WebChromeClient::shouldInterruptJavaScript):
6863         * WebCoreSupport/WebEditorClient.h:
6864         * WebCoreSupport/WebEditorClient.mm:
6865         (WebEditorClient::shouldChangeSelectedRange):
6866         * WebCoreSupport/WebFrameBridge.mm:
6867         (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]):
6868         (-[WebFrameBridge fini]):
6869         * WebCoreSupport/WebFrameLoaderClient.mm:
6870         * WebView/WebArchiver.mm:
6871         * WebView/WebFrame.mm:
6872         (core):
6873         (kit):
6874         (-[WebFrame _updateBackground]):
6875         * WebView/WebFrameInternal.h:
6876         * WebView/WebFrameView.mm:
6877         * WebView/WebHTMLRepresentation.mm:
6878         * WebView/WebHTMLView.mm:
6879         (-[WebHTMLView _updateMouseoverWithEvent:]):
6880         (-[WebHTMLView _isEditable]):
6881         (-[WebHTMLView validateUserInterfaceItem:]):
6882         (-[WebHTMLView maintainsInactiveSelection]):
6883         (-[WebHTMLView scrollWheel:]):
6884         (-[WebHTMLView acceptsFirstMouse:]):
6885         (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):
6886         (-[WebHTMLView cut:]):
6887         (-[WebHTMLView paste:]):
6888         (-[WebHTMLView selectedAttributedString]):
6889         * WebView/WebScriptDebugDelegate.mm:
6890         * WebView/WebView.mm:
6891         (-[WebView _dashboardRegions]):
6892         (-[WebView setProhibitsMainFrameScrolling:]):
6893         (-[WebView _setInViewSourceMode:]):
6894         (-[WebView _inViewSourceMode]):
6895         (-[WebView shouldClose]):
6896         (-[WebView setEditable:]):
6897
6898 2007-02-18  Oliver Hunt  <oliver@apple.com>
6899
6900         Reviewed by Adam.
6901
6902         Moving the drag initiation logic to WebCore.
6903         The redundant code in webkit will be moved out in a later patch.
6904
6905         * WebCoreSupport/WebDragClient.h:
6906         * WebCoreSupport/WebDragClient.mm:
6907         (getTopHTMLView):
6908           Helper function
6909         (WebDragClient::willPerformDragSourceAction):
6910         (WebDragClient::startDrag):
6911         (WebDragClient::createDragImageForLink):
6912           Implemented new DragClient methods
6913         (WebDragClient::declareAndWriteDragImage):
6914           Helper function for the Mac to allow new drag and drop
6915           code to match behaviour
6916           
6917         * WebView/WebHTMLView.mm:
6918         (-[WebHTMLView _dragImageForURL:withLabel:]):
6919         (-[WebHTMLView _dragImageForLinkElement:]):
6920           Refactoring old _dragImageForLinkElement function so that 
6921           the link drag image can be created with just a URL and label, 
6922           rather than requiring the original element
6923         (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
6924           Removed logic that is no longer necessary                 
6925         (-[WebHTMLView _mouseDownEvent]):
6926           The WebDragClient may need the original mouseDownEvent of a drag when initiating
6927           a drag
6928         * WebView/WebHTMLViewInternal.h:
6929           Declaring _mouseDownEvent
6930
6931         * WebView/WebHTMLViewPrivate.h:
6932           Declaring _dragImageForURL
6933
6934 2007-02-16  John Sullivan  <sullivan@apple.com>
6935
6936         Reviewed by Tim Hatcher
6937
6938         - fixed <rdar://problem/4811446> "Check Grammar" checkbox in Spelling+Grammar window doesn't 
6939         live update with menu change in WebKit
6940
6941         * WebView/WebView.mm:
6942         (-[WebView setGrammarCheckingEnabled:]):
6943         Use sekrit AppKit knowledge to tell NSSpellChecker about the change, since there's no API
6944         for this yet. Also restructured a little to avoid extra work when the value hasn't changed.
6945
6946 2007-02-15  Brady Eidson  <beidson@apple.com>
6947
6948         Reviewed by Adam
6949
6950         Save scroll state for back/forward navigation in FrameLoader, not the client
6951
6952         * WebCoreSupport/WebFrameLoaderClient.h: Renamed the save/restore methods
6953         * WebCoreSupport/WebFrameLoaderClient.mm:
6954         (WebFrameLoaderClient::saveViewStateToItem): Save viewstate only
6955         (WebFrameLoaderClient::restoreViewState): Restore viewstate only
6956
6957 2007-02-14  Alexey Proskuryakov  <ap@webkit.org>
6958
6959         Reviewed by Darin.
6960
6961         http://bugs.webkit.org/show_bug.cgi?id=12643
6962         NPN_Status is using latin-1 encoding for the message instead of UTF-8
6963
6964         * Plugins/WebBaseNetscapePluginView.mm:
6965         (-[WebBaseNetscapePluginView status:]): Check for possible conversion failure.
6966
6967 2007-02-13  Oliver Hunt  <oliver@apple.com>
6968
6969         Reviewed by John.
6970
6971         Modify entry point ASSERTs for dragging functions to allow for the case
6972         where a load has occurred mid-drag.  The load may detach the HTMLView 
6973         from the WebView so it is no longer possible to check _isTopHTMLView.
6974
6975         The assertion changes match that of revision 14897 which fixed the 
6976         more common case ([WebHTMLView draggedImage:endedAt:operation:])
6977
6978         It's also necessary to check for a null Page now prior to accessing 
6979         the DragController, which is necessary in all of these methods.
6980
6981         See rdar://problem/4994870
6982                                              
6983         * WebView/WebHTMLView.mm:
6984         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
6985         (-[WebHTMLView draggedImage:movedTo:]):
6986         (-[WebHTMLView draggedImage:endedAt:operation:]):
6987         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
6988
6989 2007-02-13  Alexey Proskuryakov  <ap@webkit.org>
6990
6991         Reviewed by Maciej.
6992
6993         http://bugs.webkit.org/show_bug.cgi?id=12643
6994         NPN_Status is using latin-1 encoding for the message instead of UTF-8
6995
6996         * Plugins/WebBaseNetscapePluginView.mm:
6997         (-[WebBaseNetscapePluginView status:]): Use kCFStringEncodingUTF8.
6998
6999 2007-02-13  Mark Rowe  <mrowe@apple.com>
7000
7001         Reviewed by Timothy Hatcher.
7002
7003         Fix http://bugs.webkit.org/show_bug.cgi?id=12745
7004         Bug 12745: REGRESSION: Webkit will not load a plugin that Safari can load (symbol missing _objc_msgSend_fpret)
7005
7006         Treat libobjc as a sub-library of WebKit in Debug/Release so that plugins and applications linked against an
7007         umbrella framework version of WebKit that expect to find libobjc symbols in WebKit can do so.
7008
7009         * WebKit.xcodeproj/project.pbxproj:
7010
7011 2007-02-12  Kevin McCullough  <kmccullough@apple.com>
7012
7013         Reviewed by .
7014
7015         - reverting change to not cause regressions and performance problems.
7016
7017         * Misc/WebNSAttributedStringExtras.mm:
7018         (fileWrapperForElement):
7019
7020 2007-02-12  Darin Adler  <darin@apple.com>
7021
7022         Reviewed by Oliver.
7023
7024         - fix http://bugs.webkit.org/show_bug.cgi?id=12677
7025           <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm
7026           a clause in kotoeri (12677)
7027
7028         - fix http://bugs.webkit.org/show_bug.cgi?id=12596
7029           <rdar://problem/4794346> REGRESSION: Tab key shifts form field focus instead of
7030           navigating prediction window (12596)
7031
7032         - fix http://bugs.webkit.org/show_bug.cgi?id=10010
7033           <rdar://problem/4822935> REGRESSION: Pressing Return with unconfirmed text in
7034           Hangul inserts carriage return (10010)
7035
7036         - fix http://bugs.webkit.org/show_bug.cgi?id=12531
7037           <rdar://problem/4975126> REGRESSION: Inline text input types repeated keys in
7038           latest nightly (r19336) (12531)
7039
7040         - fix http://bugs.webkit.org/show_bug.cgi?id=12539
7041           <rdar://problem/4975130> REGRESSION: Pressing Backspace while in inline input
7042           area moves to the previous page in history (12539)
7043
7044         * WebCoreSupport/WebEditorClient.h:
7045         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::markedTextAbandoned):
7046         Added.
7047
7048         * WebView/WebHTMLView.mm:
7049         (-[WebHTMLView menuForEvent:]): Added explicit constructor needed now that the
7050         function takes a const&.
7051         (-[WebHTMLView becomeFirstResponder]): Removed fake event code, no longer needed
7052         since advanceFocus now works fine with 0 for a DOM event.
7053         (-[WebHTMLView _expandSelectionToGranularity:]): Changed to use the normal
7054         selection controller function instead of selectRange.
7055         (-[WebHTMLView insertTab:]): Changed to call bottleneck that receives the DOM
7056         event.
7057         (-[WebHTMLView insertBacktab:]): Ditto.
7058         (-[WebHTMLView insertNewline:]): Ditto.
7059         (-[WebHTMLView insertLineBreak:]): Ditto.
7060         (-[WebHTMLView insertParagraphSeparator:]): Ditto.
7061         (-[WebHTMLView insertNewlineIgnoringFieldEditor:]): Ditto.
7062         (-[WebHTMLView insertTabIgnoringFieldEditor:]): Ditto.
7063         (-[WebHTMLView yank:]): Updated to call Editor directly since the insertText
7064         code now works via a text input event which is not what we want for paste-like
7065         things such as yank.
7066         (-[WebHTMLView yankAndSelect:]): Ditto.
7067         (-[WebHTMLView selectToMark:]): Changed to use the normal selection controller
7068         function instead of selectRange, which also allows us to remove the ObjC exception
7069         handling code.
7070         (-[WebHTMLView swapWithMark:]): Ditto.
7071         (-[WebHTMLView transpose:]): Ditto.
7072         (-[WebHTMLView unmarkText]): Since this is one of the calls back from the input
7073         manager, added code to set the "event was handled" flag. Moved the actual work
7074         into the Editor class in WebCore and just call that from here.
7075         (-[WebHTMLView _selectRangeInMarkedText:]): Changed to use the normal selection
7076         controller function instead of selectRange.
7077         (-[WebHTMLView setMarkedText:selectedRange:]): Since this is one of the calls
7078         back from the input manager, added code to set the "event was handled" flag.
7079         Also changed the ignoreMarkedTextSelectionChange to use the flag over on the
7080         WebCore side, since we moved it there and to call selectMarkedText over on
7081         the WebCore side too.
7082         (-[WebHTMLView doCommandBySelector:]): Added special cases for newline and tab
7083         selectors so that the event is passed along. These selectors are special because
7084         they are ones that turn into text input events.
7085         (-[WebHTMLView _discardMarkedText]): Moved the body of this function into the
7086         Editor class in WebCore and just call that from here.
7087         (-[WebHTMLView insertText:]): Added code to send a text input event instead of
7088         calling the editor to do text insertion. The insertion is then done in the
7089         default handler for the text input event.
7090         (-[WebHTMLView _insertNewlineWithEvent:isLineBreak:]): Added. Sends a text
7091         input event.
7092         (-[WebHTMLView _insertTabWithEvent:isBackTab:]): Ditto.
7093         (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the
7094         ignoreMarkedTextSelectionChange flag in Editor now that the one here is gone.
7095
7096         * WebView/WebHTMLViewInternal.h: Remove ignoreMarkedTextSelectionChange field.
7097
7098         * WebView/WebView.mm: (-[WebView setSelectedDOMRange:affinity:]): Changed to
7099         use the normal selection controller function instead of selectRange.
7100
7101 2007-02-11  Sam Weinig  <sam@webkit.org>
7102
7103         Reviewed by Mark.
7104
7105         Switch the initial value of box-sizing property from "border-box" to "content-box".
7106
7107         * WebInspector/webInspector/inspector.js:
7108
7109 2007-02-10  Mitz Pettel  <mitz@webkit.org>
7110
7111         Reviewed by Maciej.
7112
7113         - fix http://bugs.webkit.org/show_bug.cgi?id=11847
7114           REGRESSION (SearchField): Dragging to select in the Web Inspector's search fields drags the inspector window
7115
7116         * WebInspector/webInspector/inspector.css: Added the search field to the
7117         undraggable dashboard-region.
7118
7119 2007-02-09  Kevin Decker <kdecker@apple.com>
7120
7121         Reviewed by Darin & Maciej.
7122
7123         Fixed: <rdar://problem/4930688> REGRESSION: missing images when reloading webarchives (11962)
7124         
7125         * WebCoreSupport/WebFrameLoaderClient.mm:
7126         (WebFrameLoaderClient::canUseArchivedResource): The bug here is that because a reload sets a cache
7127         policy of NSURLRequestReloadIgnoringCacheData (rightfully so), this method was refusing to load
7128         subresources in WebArchives. It's OK to use archive subresources for the NSURLRequestReloadIgnoringCacheData
7129         cache policy because we're not worried about the actual contents of a WebArchive changing on disk. 
7130
7131 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
7132
7133         Reviewed by darin
7134         
7135         <rdar://problem/4975120>
7136         REGRESSION: double-cursor after switching window away/back (11770)
7137         <http://bugs.webkit.org/show_bug.cgi?id=11328>
7138         Gmail Editor: Caret can simultaneously appear in both the TO: and message body fields
7139
7140         * WebCoreSupport/WebFrameBridge.mm: Removed unused methods.
7141         * WebView/WebHTMLView.mm: Ditto.
7142         (-[WebHTMLView _web_firstResponderCausesFocusDisplay]): Don't 
7143         appear focused if a descendant view is firstResponder.
7144         (-[WebHTMLView _updateActiveState]): Removed the check for a BOOL
7145         that was always false.
7146         * WebView/WebHTMLViewInternal.h: Removed a BOOL that's always false.
7147
7148 2007-02-09  Beth Dakin  <bdakin@apple.com>
7149
7150         Reviewed by Darin.
7151
7152         Fix for <rdar://problem/4674537> REGRESSION: Adobe Acrobat 8 - Text 
7153         blinks when mouse is moved, and is invisible otherwise
7154
7155         Allow quirk if the Application was linked before 3.0 and if the 
7156         application is Adobe Acrobat.
7157
7158         * Misc/WebKitVersionChecks.h:
7159         * WebView/WebView.mm:
7160         (-[WebView _updateWebCoreSettingsFromPreferences:]):
7161
7162 2007-02-09  Timothy Hatcher  <timothy@apple.com>
7163
7164         Reviewed by Brady.
7165
7166         * WebKit.exp: Add WebBaseNetscapePluginView to the export list.
7167
7168 2007-02-09  John Sullivan  <sullivan@apple.com>
7169
7170         Reviewed by Beth
7171
7172         - WebKit part of fix for radar 4939636, problems with context menu items and binaries linked
7173           against WebKit 2.0.
7174
7175         * WebKit.xcodeproj/project.pbxproj:
7176         Changed DYLIB_CURRENT_VERSION to 2 (was 1)
7177
7178         * Misc/WebKitVersionChecks.h:
7179         Added constant WEBKIT_FIRST_VERSION_WITH_3_0_CONTEXT_MENU_TAGS, which is 2 but in the weird
7180         format that these version checks use.
7181
7182         * WebView/WebUIDelegatePrivate.h:
7183         Tweaked comments; included the old values for three tags for context menu items that changed
7184         from SPI to API in 3.0; renamed WEBMENUITEMTAG_SPI_START to WEBMENUITEMTAG_WEBKIT_3_0_SPI_START 
7185         for clarity, and bumped its value to avoid conflict with the three old values
7186
7187         * WebCoreSupport/WebContextMenuClient.mm:
7188         (isAppleMail):
7189         new helper function that checks the bundle identifier
7190         (fixMenusToSendToOldClients):
7191         Removed return value for clarity; now checks linked-on version and also makes special case
7192         for Mail; now replaces three API tags with their old SPI values for clients that linked
7193         against old WebKit version, in addition to replacing new API with WebMenuItemTagOther for
7194         items that had no specific tag before.
7195         (fixMenusReceivedFromOldClients):
7196         Removed return value for clarity; removed defaultMenuItems parameter because it's no longer 
7197         necessary; removed code that tried to recognize menus that got confused by the SPI -> API 
7198         change (we now pass the old SPI values to these clients to avoid confusing them); now 
7199         restores the tags for the items whose tags were replaced in fixMenusToSendToOldClients 
7200         (this used to restore the tags of the default items rather than the new items, which was 
7201         incorrect but happened to work since the clients we tested were using the objects from the
7202         default items array in their new items array)
7203         (WebContextMenuClient::getCustomMenuFromDefaultItems):
7204         Updated to account for the removed return values for the two fix-up methods; moved the
7205         autorelease of newItems here, which is clearer and was the source of a leak before.
7206
7207 2007-02-08  Kevin McCullough  <KMcCullough@apple.com>
7208
7209         Reviewed by
7210
7211         - fixing a build breakage. 
7212
7213         * Misc/WebNSAttributedStringExtras.mm:
7214         (fileWrapperForElement):
7215
7216 2007-02-07  Charles Ying  <charles_ying@yahoo.com>
7217
7218         Reviewed by Adam.
7219
7220         Code suggestion by aroben
7221         
7222         Fix http://bugs.webkit.org/show_bug.cgi?id=12688
7223
7224         REGRESSION (r19469): ASSERT when right clicking on hyperlinks! in TOT webkit
7225         
7226         * WebCoreSupport/WebContextMenuClient.mm:
7227         (fixMenusReceivedFromOldClients):
7228
7229         - fixMenusReceivedFromOldClients was hitting an ASSERT incorrectly
7230         because it could not match [item title] to any of the contentMenuItemTags
7231         using pointer comparison ==. Instead, it needs to do a string comparison
7232         between [item title] and the various contentMenuItemTags using
7233         isEqualToString instead of ==. You would encounter this whenever the
7234         context menu was activated, e.g., from a hyperlink right click (or
7235         control click).
7236
7237
7238 2007-02-07  Anders Carlsson  <acarlsson@apple.com>
7239
7240         Reviewed by Maciej.
7241
7242         Move shouldInterruptJavaScript to the Chrome.
7243         
7244         * WebCoreSupport/WebChromeClient.h:
7245         * WebCoreSupport/WebChromeClient.mm:
7246         (WebChromeClient::shouldInterruptJavaScript):
7247         * WebCoreSupport/WebFrameBridge.mm:
7248
7249 2007-02-07  John Sullivan  <sullivan@apple.com>
7250
7251         Reviewed by Kevin Decker
7252
7253         - fixed all places in WebKit where _web_userVisibleString was used where
7254         _web_originalDataAsString should have been used instead.
7255
7256         * History/WebURLsWithTitles.m:
7257         (+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]):
7258         use _web_originalDataAsString when writing since these aren't displayed to the user
7259         (+[WebURLsWithTitles URLsFromPasteboard:]):
7260         use _web_URLWithDataAsString when reading, to match what we used when writing
7261
7262         * Misc/WebNSPasteboardExtras.mm:
7263         (-[NSPasteboard _web_writeURL:andTitle:types:]):
7264         use _web_originalDataAsString when writing the NSURL type; continue using
7265         _web_userVisibleString when writing the plain text type
7266
7267         * WebView/WebHTMLView.mm:
7268         (-[WebHTMLView _documentFragmentWithPaths:]):
7269         added comment about why _web_userVisibleString is appropriate here
7270         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
7271         use _web_originalDataAsString when setting the href attribute of an anchor tag
7272
7273 2007-02-07  David Harrison  <harrison@apple.com>
7274
7275         Reviewed by Adam.
7276
7277         <rdar://problem/4943650> REGRESSION: insertion point blink redraws entire web page, making everything slow
7278
7279         Problem is that AppKit recently changed NSControl to trigger a full redraw if the control has a focus ring.
7280         WebHTMLView is a subclass of NSControl, but the focus ring type was the default value, though we actually
7281         draw no focus ring. Fix is to formally set our focus ring type.
7282
7283         * WebView/WebHTMLView.mm:
7284         (-[WebHTMLView initWithFrame:]):
7285         Send [self setFocusRingType:NSFocusRingTypeNone].
7286
7287 2007-02-07  John Sullivan  <sullivan@apple.com>
7288
7289         Undid changes that I hadn't intended to check in
7290
7291         * WebView/WebHTMLView.mm:
7292         (-[WebHTMLView _documentFragmentWithPaths:]):
7293         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
7294
7295 2007-02-07  John Sullivan  <sullivan@apple.com>
7296
7297         Reviewed by Ollie and Geoff
7298
7299         - fixed <rdar://problem/4982345> KURL::createCFURL leak inside -[WebFrameBridge startDraggingImage...] 
7300         reported by buildbot
7301
7302         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
7303         don't retain the imageURL we pass to the drag controller -- it's just automagically
7304         converted to a KURL anyway
7305
7306 2007-02-07  John Sullivan  <sullivan@apple.com>
7307
7308         Reviewed by Darin
7309
7310         - fixed <rdar://problem/4974420> REGRESSION: Dragging a saved image into the browser window 
7311         displays a error (No File exists at the address "null") (12662)
7312
7313         * WebCoreSupport/WebPasteboardHelper.mm:
7314         (WebPasteboardHelper::urlFromPasteboard):
7315         use _web_originalDataAsString instead of _web_userVisibleString, since _web_userVisibleString
7316         can return a string with non-ASCII characters -- suitable for display but not for code
7317
7318 2007-02-07  John Sullivan  <sullivan@apple.com>
7319
7320         Reviewed by Darin
7321
7322         - added some clarity to some menu-handling shenanigans
7323
7324         * WebCoreSupport/WebContextMenuClient.mm:
7325         (fixMenusToSendToOldClients):
7326         renamed from fixMenusForOldClients; added comments, FIXME, and assertion
7327         (fixMenusReceivedFromOldClients):
7328         renamed from fixMenusFromOldClients; added comments, FIXME, and assertion
7329         (WebContextMenuClient::getCustomMenuFromDefaultItems):
7330         updated for name changes
7331
7332 2007-02-06  Kevin Decker <kdecker@apple.com>
7333
7334         Fixed: <rdar://problem/4976681> ASSERTION failure on quit @ talkcrunch.com in _NPN_ReleaseObject
7335         
7336         Reviewed by Anders.
7337
7338         * Plugins/WebPluginDatabase.m:
7339         (+[WebPluginDatabase sharedDatabase]): Removed NSApplicationWillTerminateNotification observer and thus
7340         also removed code that would unload the entire plug-in database when receiving that notification. 
7341         
7342         The bug here was that this notification callback would happen first before anything else thus unloading
7343         plug-ins and releasing plug-in memory. That was crash prone because the JavaScriptCore collector would at
7344         a later time attempt to release its CInstance references (references that point to plug-in memory)
7345         without knowing WebKit already unloaded the plug-in out from underneath it. The WebPluginDatabase simply
7346         does not have enough context to make this decision.
7347         
7348         * WebView/WebView.mm: Added two statics: applicationIsTerminating, pluginDatabaseClientCount.
7349         (+[WebView initialize]): Added NSApplicationWillTerminateNotification observer.
7350         (+[WebView _applicationWillTerminate]): Added. 
7351         (-[WebView _close]): WebKit has both a global plug-in database and a separate, per WebView plug-in database. 
7352          We need to release both sets of plug-ins because Netscape plug-ins have "destructor functions" that should be
7353          called when the browser unloads the plug-in.  These functions can do important things, such as closing/deleting
7354          files so it is important to ensure that they are properly called when the application terminates.
7355          
7356          The new change is that on app shutdown, we unload WebKit's global plug-in database if and only if the last WebView
7357          was closed. To do so otherwise would unload plug-ins out from underneath other WebViews.
7358          
7359 2007-02-06  Darin Adler  <darin@apple.com>
7360
7361         Reviewed by John Sullivan.
7362
7363         - fix http://bugs.webkit.org/show_bug.cgi?id=11080
7364           <rdar://problem/4826648> REGRESSION: Incorrect vertical positioning of Safari
7365           status bar text containing @ character (11080)
7366
7367         * Misc/WebKitNSStringExtras.m:
7368         (canUseFastRenderer): Fix code that mistakenly used the slow renderer for strings
7369         that have a direction of "other neutral", which includes the "@" character.
7370         (-[NSString _web_drawAtPoint:font:textColor:]): Add code to make the baseline of
7371         the text in the status bar right. AppKit's rule for rounding is complicated enough
7372         that this is obviously not perfectly correct, but it does make both code paths
7373         use the same baseline in all the places this is currently used in AppKit.
7374
7375 2007-02-06  Darin Adler  <darin@apple.com>
7376
7377         Spotted by Steve F.
7378
7379         * Misc/WebNSURLExtras.m:
7380         (-[NSString _web_mapHostNameWithRange:encode:makeString:]):
7381         Fix obvious logic mistake I introduced back in revision 8255.
7382         I can't see how to exercise this code path, but I also can't
7383         bear to leave this obviously-broken code as-is.
7384
7385 2007-02-05  David Kilzer  <ddkilzer@webkit.org>
7386
7387         Reviewed by Darin.
7388
7389         http://bugs.webkit.org/show_bug.cgi?id=7266
7390         Webarchive format saves duplicate WebSubresources to .webarchive file
7391
7392         Tests: webarchive/test-duplicate-resources.html
7393                webarchive/test-frameset.html
7394
7395         * WebView/WebArchiver.mm:
7396         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]): Use an NSMutableSet to prevent
7397         duplicate subresources from being added to the webarchive.
7398
7399 2007-02-06  Mark Rowe  <mrowe@apple.com>
7400
7401         Roll out incomplete support for font-stretch (r19350) at Dave Hyatt's request.
7402         See http://bugs.webkit.org/show_bug.cgi?id=12530#c9 for more info.
7403
7404         * WebInspector/webInspector/inspector.js:
7405         * WebView/WebHTMLView.mm:
7406         (-[WebHTMLView _addToStyle:fontA:fontB:]):
7407
7408 2007-02-05  Beth Dakin  <bdakin@apple.com>
7409
7410         Reviewed by Adam.
7411
7412         Fix for <rdar://problem/4975161> REGRESSION: With BumperCar 2.1.1, 
7413         the contextual menu fails to appear when I ctrl-click on page
7414
7415         * WebCoreSupport/WebContextMenuClient.mm:
7416         (WebContextMenuClient::getCustomMenuFromDefaultItems): If the 
7417         delegate does not respond to contextMenuItemsForElement, return the 
7418         default menu instead of nil.
7419
7420 2007-02-01  Geoffrey Garen  <ggaren@apple.com>
7421
7422         Reviewed by Maciej Stachowiak.
7423         
7424         Added support for selectively ignoring WebCore::Node leaks during layout
7425         tests, so that we can ignore known leaks in other components.
7426
7427         * Misc/WebCoreStatistics.h:
7428         * Misc/WebCoreStatistics.mm:
7429         (+[WebCoreStatistics startIgnoringWebCoreNodeLeaks]):
7430         (+[WebCoreStatistics stopIgnoringWebCoreNodeLeaks]):
7431
7432 2007-02-01  Nicholas Shanks  <webkit@nickshanks.com>
7433
7434         Reviewed by Mark.
7435
7436         Add support for CSS2 font-stretch property.
7437
7438         * WebInspector/webInspector/inspector.js:
7439         * WebView/WebHTMLView.mm:
7440         (-[WebHTMLView _addToStyle:fontA:fontB:]):
7441
7442 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
7443
7444         Reviewed by Adam.
7445         
7446         <rdar://problem/4730469> REGRESSION: Assertion failure in -[WebDataSource(WebInternal) _bridge] when forwarding message
7447
7448         * WebView/WebDataSource.mm:
7449         (-[WebDataSource subresources]): Check for being uncommitted and return emtpy result.
7450         (-[WebDataSource subresourceForURL:]): ditto
7451
7452 2007-01-31  Oliver Hunt  <oliver@apple.com>
7453
7454         Reviewed by Adam.     
7455
7456         Migrating methods to WebCore
7457
7458         * WebCoreSupport/WebFrameBridge.mm:
7459         * WebView/WebHTMLView.mm:
7460         * WebView/WebHTMLViewPrivate.h:
7461
7462 2007-01-31  Anders Carlsson  <acarlsson@apple.com>
7463
7464         Reviewed by Maciej.
7465
7466         <rdar://problem/4886776>
7467         REGRESSION: After opening a web archive, location shows the actual URL, not the webarchive file
7468         
7469         "Revert" the change done in 13734.
7470         
7471         * WebView/WebHTMLRepresentation.mm:
7472         (-[WebHTMLRepresentation loadArchive]):
7473         Don't do a new load here, as this would cancel the current load and call the resource load
7474         delegate's didFailLoadingWithError: method. Instead, call continueLoadWithData.
7475
7476 2007-02-01  Nikolas Zimmermann  <zimmermann@kde.org>
7477
7478         Reviewed by Maciej.
7479
7480         Fix run-pageloadtest to actually work again.
7481
7482         * Misc/WebNSWindowExtras.m:
7483         (+[NSWindow _webkit_displayThrottledWindows]):
7484
7485 2007-01-31  Adele Peterson  <adele@apple.com>
7486
7487         Reviewed by Darin.
7488
7489         WebKit part of fix for <rdar://problem/4521461> REGRESSION: when keyPress event changes form focus, inserted key goes to wrong control
7490
7491         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): Instead of using the selected frame, use the
7492           frame for the target of the keyboard event.  Also, don't do the canEdit check here, since the target's frame might not
7493           have a selection at this point.  Do the canEdit check within Editor::insertText, where we determine which selection to use
7494           for inserting text.
7495         * WebView/WebEditingDelegatePrivate.h: Added forward declaration of DOMHTMLElement. This is needed after reordering includes in WebEditorClient.mm.
7496
7497 2007-01-31  Alice Liu  <alice.liu@apple.com>
7498
7499         Reviewed by Tim Hatcher.
7500
7501         Turning an accidental API change to an SPI change
7502
7503         * WebView/WebEditingDelegate.h:
7504         * WebView/WebEditingDelegatePrivate.h:
7505         move some declarations into private header.  
7506
7507 2007-01-31  Darin Adler  <darin@apple.com>
7508
7509         - fix build
7510
7511         * ForwardingHeaders/wtf/ListHashSet.h: Added.
7512
7513 2007-01-31  Maciej Stachowiak  <mjs@apple.com>
7514
7515         Reviewed by Anders.
7516
7517         - related fix for <rdar://problem/4964407> REGRESSION: Mail hangs when replying, forwarding , or creating a new message
7518         
7519         * WebView/WebFrame.mm:
7520         (-[WebFrame loadArchive:]): This method also needs to add the lame WebDataRequest property or other things, like
7521         Mail Contents of Page, break.
7522
7523 2007-01-31  Maciej Stachowiak  <mjs@apple.com>
7524
7525         Reviewed by Eric.
7526         
7527         - add back no-op version of silly method so that shipping Safari can still run the PLT
7528
7529         * Misc/WebNSWindowExtras.m:
7530         (-[NSWindow _webkit_displayThrottledWindows]):
7531
7532 2007-01-31  Mark Rowe  <mrowe@apple.com>
7533
7534         More build fixing.
7535
7536         * Misc/WebKitLogging.h: Use !defined() rather than !.
7537         * Plugins/WebNetscapePluginStream.h: Remove #if __cplusplus as this file is only included from Obj-C++ files.
7538         * WebView/WebHTMLView.mm:
7539         (-[WebHTMLView _lookUpInDictionaryFromMenu:]): Use #ifdef rather than #if.
7540         * WebView/WebView.mm:
7541         (-[WebView isGrammarCheckingEnabled]): Ditto.
7542
7543 2007-01-31  Mark Rowe  <mrowe@apple.com>
7544
7545         Build fix.
7546
7547         * WebView/WebView.mm:
7548         (-[WebView initWithFrame:frameName:groupName:]):
7549
7550 2007-01-31  Mark Rowe  <mrowe@apple.com>
7551
7552         Reviewed by Oliver.
7553
7554         Enable -Wundef in WebKit, and change misuses of #if to #ifdef or #ifndef as appropriate.
7555
7556         * Misc/WebKitLogging.h:
7557         * WebKit.xcodeproj/project.pbxproj:
7558         * WebView/WebFrame.mm:
7559         * WebView/WebFrameInternal.h:
7560         * WebView/WebHTMLView.mm:
7561         (-[WebHTMLView validateUserInterfaceItem:]):
7562         (-[WebHTMLView delete:]):
7563         (-[WebHTMLView showGuessPanel:]):
7564         (-[WebHTMLView copy:]):
7565         (-[WebHTMLView cut:]):
7566         (-[WebHTMLView paste:]):
7567         * WebView/WebHTMLViewInternal.h:
7568         * WebView/WebView.mm:
7569         (-[WebViewPrivate init]):
7570         (-[WebView validateUserInterfaceItem:]):
7571         * WebView/WebViewPrivate.h:
7572
7573 2007-01-30  Brady Eidson  <beidson@apple.com>
7574
7575         Reviewed by Oliver
7576
7577         This is a corollary to <rdar://problem/4944887> where certain things happened on an alternate thread.
7578         To help catch such behavior in the future, add ASSERT_MAIN_THREAD() to key WebKit API points
7579
7580         * History/WebHistoryItem.mm: Added ASSERT_MAIN_THREAD() to suspected API entry points
7581         (-[WebHistoryItem dealloc]):
7582         (-[WebHistoryItem finalize]):
7583         (-[WebHistoryItem copyWithZone:]):
7584         (-[WebHistoryItem URLString]):
7585         (-[WebHistoryItem originalURLString]):
7586         (-[WebHistoryItem title]):
7587         (-[WebHistoryItem lastVisitedTimeInterval]):
7588         (-[WebHistoryItem isEqual:]):
7589         (-[WebHistoryItem description]):
7590         (-[WebHistoryItem initWithWebCoreHistoryItem:]):
7591         (-[WebHistoryItem initFromDictionaryRepresentation:]):
7592         (-[WebHistoryItem scrollPoint]):
7593         (-[WebHistoryItem dictionaryRepresentation]):
7594         (-[WebHistoryItem target]):
7595         (-[WebHistoryItem visitCount]):
7596         (-[WebHistoryItem children]):
7597         (-[WebHistoryItem URL]):
7598         (-[WebHistoryItem _lastVisitedDate]):
7599         (-[WebHistoryItem targetItem]):
7600
7601         * Misc/WebIconDatabase.mm: Added ASSERT_MAIN_THREAD() to suspected API entry points
7602         (-[WebIconDatabase iconForURL:withSize:cache:]):
7603         (-[WebIconDatabase iconURLForURL:]):
7604         (-[WebIconDatabase defaultIconWithSize:]):
7605         (-[WebIconDatabase retainIconForURL:]):
7606         (-[WebIconDatabase releaseIconForURL:]):
7607         (-[WebIconDatabase removeAllIcons]):
7608         (-[WebIconDatabase _iconForFileURL:withSize:]):
7609         (webGetNSImage):
7610
7611         * Misc/WebKitLogging.h: Added ASSERT_MAIN_THREAD()
7612         * Misc/WebKitLogging.m:
7613         (WebKitRunningOnMainThread): Added
7614
7615         * WebKit.xcodeproj/project.pbxproj: Define DISABLE_THREAD_CHECK until it is
7616           safe to run with ASSERT_MAIN_THREAD() active
7617
7618 2007-01-30  Timothy Hatcher  <timothy@apple.com>
7619
7620         Reviewed by Darin.
7621
7622         <rdar://problem/4961953> Stop using NSString deprecated methods like initWithCString:
7623
7624         * Misc/WebNSImageExtras.m:
7625         (-[NSImage _web_saveAndOpen]):
7626         * WebKit.xcodeproj/project.pbxproj:
7627
7628 2007-01-30  Mitz Pettel  <mitz@webkit.org>
7629
7630         Reviewed by Geoff.
7631
7632         - fix http://bugs.webkit.org/show_bug.cgi?id=12050
7633           REGRESSION: Assertion failure in -[WebBaseNetscapePluginView willCallPlugInFunction] (plugin)
7634
7635         Test: plugins/createScriptableObject-before-start.html
7636
7637         * Plugins/WebBaseNetscapePluginView.mm:
7638         (-[WebBaseNetscapePluginView createPluginScriptableObject]): Return NULL if
7639         the plugin is not started.
7640
7641 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
7642
7643         Reviewed by Anders.
7644         
7645         <rdar://problem/4964407> REGRESSION: Mail hangs when replying, forwarding , or creating a new message
7646         
7647         * WebView/WebFrame.mm:
7648         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Set WebDataRequest property on data
7649         load requests since Mail specifically checks for this.
7650
7651 2007-01-30  Graham Dennis  <graham.dennis@gmail.com>
7652
7653         Reviewed by Maciej.
7654
7655         Part of fix for http://bugs.webkit.org/show_bug.cgi?id=10725
7656         Image data in from RTFD clipboard data thrown away
7657         
7658         The URLs for images in RTFD data must not be loaded until the resources
7659         have been added to the WebUnarchivingState. This can't happen until
7660         after the RTFD data has been parsed, so we must delay loading while this
7661         RTFD data is being parsed to a document fragment.
7662
7663         * WebView/WebHTMLView.mm:
7664         (uniqueURLWithRelativePart):
7665         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]): defer loading the resources while RTFD data is being parsed.
7666         (+[NSURL _web_uniqueWebDataURL]): Added this back because AppKit uses it.
7667         * WebView/WebUnarchivingState.m:
7668         (-[WebUnarchivingState archivedResourceForURL:]): orkaround for workaround for rdar://problem/4699166 so that other people can use archivedResourceForURL: too.
7669
7670 2007-01-29  Jim Correia  <jim.correia@pobox.com>
7671
7672         Reviewed by Mark.
7673
7674         Added support for -allowsUndo/-setAllowsUndo: to allow editable WebView
7675         clients to completely disable undo registration. This is functionally
7676         equivalent to the methods with the same names on NSTextView.
7677
7678         * WebView/WebView.mm:
7679         (-[WebViewPrivate init]):
7680         (-[WebView initWithCoder:]):
7681         (-[WebView encodeWithCoder:]):
7682         (-[WebView allowsUndo]):
7683         (-[WebView setAllowsUndo:]):
7684         (-[WebView undoManager]):
7685         * WebView/WebViewPrivate.h:
7686
7687 2007-01-29  Ada Chan  <adachan@apple.com>
7688
7689         Reviewed by Brady.
7690
7691         Moved the update of the title of the current entry in the backforward list to WebCore.
7692
7693         * WebCoreSupport/WebFrameLoaderClient.mm:
7694         (WebFrameLoaderClient::setTitle):
7695
7696 2007-01-29  Adele Peterson  <adele@apple.com>
7697
7698         Reviewed by Darin.
7699
7700         More preparation for event handling fixes.
7701
7702         * WebCoreSupport/WebEditorClient.h: Removed EventTargetNode parameter, since you can
7703           just get this from the KeyboardEvent.
7704         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): ditto.
7705
7706         * WebView/WebHTMLViewInternal.h: Added interpretKeyEventsParameters struct.
7707         * WebView/WebViewInternal.h: Changed parameter from NSEvent to WebCoreKeyboardEvent in _interceptEditingKeyEvent.
7708         * WebView/WebHTMLView.mm:
7709         (-[WebHTMLView yankAndSelect:]): Updated for new triggeringEvent parameter.
7710         (-[WebHTMLView _interceptEditingKeyEvent:]): Set the WebHTMLViewInterpretKeyEventsParameters.
7711         (-[WebHTMLView doCommandBySelector:]): Access WebHTMLViewInterpretKeyEventsParameters.
7712         (-[WebHTMLView insertText:]): ditto.
7713         (-[WebHTMLView _insertText:selectInsertedText:triggeringEvent:]): Added parameter for triggeringEvent.
7714
7715 2007-01-29  Oliver Hunt  <oliver@apple.com>
7716
7717         build fix  
7718
7719         * WebView/WebHTMLView.mm:
7720         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
7721
7722 2007-01-25  Oliver Hunt  <oliver@apple.com>
7723
7724         Reviewed by Adam.
7725
7726         Migrated drag state and logic to WebCore, removed superfluous methods
7727
7728         * ChangeLog:
7729         * WebCoreSupport/WebDragClient.h:
7730         * WebCoreSupport/WebDragClient.mm:
7731         (WebDragClient::dragSourceActionMaskForPoint):
7732         * WebCoreSupport/WebFrameBridge.mm:
7733            allowDHTMLDrag move to WebCore::EventHandler
7734         * WebView/WebHTMLView.mm:
7735         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
7736         (-[WebHTMLView draggedImage:movedTo:]):
7737         (-[WebHTMLView draggedImage:endedAt:operation:]):
7738           dragOffset and dragSourecAction is now stored in WebCore::DragController
7739           migrated _delegateDragSourceActionMask to WebCore::DragController
7740         * WebView/WebHTMLViewInternal.h:
7741           Removed dragOffset declaration, migrated to WebCore::DragController
7742         * WebView/WebView.mm:
7743           removed unnecessary method, _loadingDragOperationForDraggingInfo
7744
7745 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
7746
7747         Reviewed by Mark.
7748
7749         - updated for cross-platform data loading support
7750         
7751         * WebCoreSupport/WebFrameLoaderClient.h:
7752         * WebCoreSupport/WebFrameLoaderClient.mm:
7753         (WebFrameLoaderClient::createDocumentLoader):
7754         * WebView/WebDataSource.mm:
7755         (-[WebDataSource initWithRequest:]):
7756         * WebView/WebDocumentLoaderMac.h:
7757         * WebView/WebDocumentLoaderMac.mm:
7758         (WebDocumentLoaderMac::WebDocumentLoaderMac):
7759         * WebView/WebFrame.mm:
7760         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
7761         (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]):
7762         (-[WebFrame _loadHTMLString:baseURL:unreachableURL:]):
7763         (-[WebFrame loadArchive:]):
7764         * WebView/WebFrameInternal.h:
7765         * WebView/WebHTMLView.mm:
7766         (uniqueURLWithRelativePart):
7767         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
7768
7769 2007-01-27  David Kilzer  <ddkilzer@webkit.org>
7770
7771         Reviewed by Adam.
7772
7773         - fix http://bugs.webkit.org/show_bug.cgi?id=12260
7774           Windows platform build is not maintained
7775
7776         * COM/ChromeClientWin.cpp:
7777         (ChromeClientWin::canTakeFocus):
7778         (ChromeClientWin::takeFocus):
7779         * COM/ChromeClientWin.h:
7780         * COM/ContextMenuClientWin.cpp:
7781         (ContextMenuClientWin::getCustomMenuFromDefaultItems):
7782         (ContextMenuClientWin::searchWithGoogle):
7783         * COM/ContextMenuClientWin.h:
7784         * COM/WebFrameLoaderClient.cpp:
7785         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
7786         (WebFrameLoaderClient::dispatchWillSendRequest):
7787         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
7788         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
7789         (WebFrameLoaderClient::dispatchDidReceiveResponse):
7790         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
7791         (WebFrameLoaderClient::dispatchDidFinishLoading):
7792         (WebFrameLoaderClient::dispatchDidFailLoading):
7793         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
7794         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
7795         (WebFrameLoaderClient::dispatchDidFailLoad):
7796         (WebFrameLoaderClient::dispatchCreatePage):
7797         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
7798         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
7799         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
7800         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
7801         (WebFrameLoaderClient::setMainDocumentError):
7802         (WebFrameLoaderClient::incrementProgress):
7803         (WebFrameLoaderClient::completeProgress):
7804         (WebFrameLoaderClient::startDownload):
7805         (WebFrameLoaderClient::committedLoad):
7806         (WebFrameLoaderClient::cancelledError):
7807         (WebFrameLoaderClient::cannotShowURLError):
7808         (WebFrameLoaderClient::interruptForPolicyChangeError):
7809         (WebFrameLoaderClient::cannotShowMIMETypeError):
7810         (WebFrameLoaderClient::fileDoesNotExistError):
7811         (WebFrameLoaderClient::shouldFallBack):
7812         (WebFrameLoaderClient::willUseArchive):
7813         (WebFrameLoaderClient::createDocumentLoader):
7814         (WebFrameLoaderClient::download):
7815         * COM/WebFrameLoaderClient.h:
7816
7817 2007-01-27  David Harrison  <harrison@apple.com>
7818
7819         Reviewed by Kevin.
7820
7821         <rdar://problem/4958902> REGRESSION: Dashboard widgets fail to load
7822         
7823         This was caused by the WebView preferences rework in r18417. Specifically, in
7824         _updateWebCoreSettingsFromPreferences when calling setUserStyleSheetLocation,
7825         [NSURL URLWithString:] is now messaged directly with the result of
7826         [[preferences userStyleSheetLocation] _web_originalDataAsString]], which will
7827         be nil if the userStyleSheetLocation has not been set yet. [NSURL URLWithString:]
7828         throws an exception when the string is nil. DashboardClient.app calls
7829         setUserStyleSheetEnabled *before* calling setUserStyleSheetLocation.
7830
7831         * WebView/WebView.mm:
7832         (-[WebView _updateWebCoreSettingsFromPreferences:]):
7833         Pass empty string instead of nil string to [NSURL URLWithString:].
7834
7835 2007-01-26  Darin Adler  <darin@apple.com>
7836
7837         Reviewed by Timothy.
7838
7839         Fixes crash drawing avatar on mail.yahoo.com.
7840
7841         * Plugins/WebBaseNetscapePluginStream.m: Retain the object since destroyStreamWithError: might
7842         release the last reference to it.
7843
7844 2007-01-26  Darin Adler  <darin@apple.com>
7845
7846         Reviewed by Beth.
7847
7848         * WebInspector/webInspector/inspector.js: Updated for new computed style properties.
7849
7850 2007-01-26  Kevin Decker <kdecker@apple.com>
7851
7852         Reviewed by andersca.
7853
7854         Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory
7855         http://bugs.webkit.org/show_bug.cgi?id=11523
7856
7857         * Plugins/WebBaseNetscapePluginStream.m:
7858        (-[WebBaseNetscapePluginStream setPlugin:]): Calls -[WebBaseNetscapePluginView disconnectStream:]
7859         * Plugins/WebBaseNetscapePluginView.h: Added disconnectStream: to header.
7860         * Plugins/WebBaseNetscapePluginView.mm:
7861         (-[WebBaseNetscapePluginView stop]): Make a copy of the streams collection prior to calling stop all streams.
7862         This is necessary because calling stop has the side effect of removing the stream from this same collection.
7863         (-[WebBaseNetscapePluginView disconnectStream:]): Added. Removes the stream from the streams collection.
7864
7865 2007-01-25  Kevin Decker <kdecker@apple.com>
7866
7867         Backed out my last patch because it crashes espn.com. Stay tuned for a newer version..
7868
7869         * Plugins/WebBaseNetscapePluginStream.m:
7870         (-[WebBaseNetscapePluginStream setPlugin:]): Removed call to streamIsDead.
7871         * Plugins/WebBaseNetscapePluginView.h: Removed streamIsDead.
7872         * Plugins/WebBaseNetscapePluginView.mm: Ditto.
7873
7874 2007-01-25  Darin Adler  <darin@apple.com>
7875
7876         Reviewed by Beth.
7877
7878         - fix <rdar://problem/4952766> Safari has a top secret color picker that can be used to... uhh... I don't know
7879
7880         * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Let Interface Builder have its way.
7881         * Panels/English.lproj/WebAuthenticationPanel.nib/objects.nib: Remove the NSColorWell that was
7882         in here (for no good reason).
7883
7884 2007-01-25  Kevin Decker  <kdecker@apple.com>
7885
7886         Reviewed by andersca.
7887
7888         A few tweaks with of a fix done by Steve Gehrman.
7889
7890         Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory
7891                http://bugs.webkit.org/show_bug.cgi?id=11523
7892
7893         * Plugins/WebBaseNetscapePluginStream.m:
7894         (-[WebBaseNetscapePluginStream setPlugin:]): Calls -[WebBaseNetscapePluginView streamIsDead:]
7895         * Plugins/WebBaseNetscapePluginView.h: Added streamIsDead to header.
7896         * Plugins/WebBaseNetscapePluginView.mm:
7897         (-[WebBaseNetscapePluginView streamIsDead:]): Added. Removes the stream from the streams collection.
7898
7899 2007-01-25  John Sullivan  <sullivan@apple.com>
7900
7901         Reviewed by Kevin, Geoff, Brady, and Darin
7902         
7903         - fixed <rdar://problem/4918446> Safari's temp files (PDF's) should be in a sub-folder when calling Preview
7904         
7905         * WebView/WebPDFView.mm:
7906         (-[WebPDFView _path]):
7907         use _temporaryPDFDirectoryPath method instead of #defines for hardwiring strings; stop bad practice
7908         of modifying the const char* returned by fileSystemRepresentation
7909         (-[WebPDFView _temporaryPDFDirectoryPath]):
7910         new method, lazily creates and returns a secure temporary directory created with NSTemporaryDirectory()
7911         and mkdtemp
7912
7913         * English.lproj/StringsNotToBeLocalized.txt:
7914         Updated for these and other recent changes
7915
7916 2007-01-24  Oliver Hunt  <oliver@apple.com>
7917
7918         Build fix 
7919
7920         * WebView/WebHTMLView.mm:
7921         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
7922         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
7923
7924 2007-01-24  Oliver Hunt  <ioliver@apple.com>
7925
7926         Reviewed by Maciej.
7927
7928         Migrating more drag state information to WebCore
7929
7930         * WebKit.xcodeproj/project.pbxproj:
7931         * WebView/WebHTMLView.mm:
7932         (-[WebHTMLViewPrivate dealloc]):
7933         (-[WebHTMLViewPrivate clear]):
7934         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
7935         (-[WebHTMLView _mayStartDragAtEventLocation:]):
7936         (-[WebHTMLView close]):
7937         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
7938         (-[WebHTMLView _delegateDragSourceActionMask]):
7939         * WebView/WebHTMLViewInternal.h:
7940
7941 2007-01-24  Adele Peterson  <adele@apple.com>
7942
7943         Reviewed by Darin.
7944
7945         Small improvement to my last checkin to prevent the keyEventWasInterpreted bool from
7946         being overwritten by reentrancy.
7947
7948         * WebView/WebHTMLView.mm:
7949         (-[WebHTMLView _interceptEditingKeyEvent:]): Point keyEventWasInterpreted pointer to local variable.
7950         (-[WebHTMLView doCommandBySelector:]):
7951         (-[WebHTMLView insertText:]):
7952         * WebView/WebHTMLViewInternal.h: Added BOOL pointer that will point to the local variable on the stack in _interceptEditingKeyEvent
7953
7954 2007-01-24  Adele Peterson  <adele@apple.com>
7955
7956         Reviewed by Darin.
7957
7958         - Fix for <rdar://problem/4950527> REGRESSION: Can't use arrow keys (left/right) to navigate caret in input (type=text) or textarea fields
7959
7960         Keep track of whether interpretKeyEvents handles the key event based on whether or not we get
7961         called in insertText or doCommandBySelector.
7962
7963         Test: fast/events/arrow-navigation.html
7964
7965         * WebView/WebHTMLView.mm:
7966         (-[WebHTMLView performKeyEquivalent:]):
7967         (-[WebHTMLView _interceptEditingKeyEvent:]):
7968         (-[WebHTMLView doCommandBySelector:]):
7969         (-[WebHTMLView insertText:]):
7970         * WebView/WebHTMLViewInternal.h:
7971
7972 2007-01-25  Mark Rowe  <mrowe@apple.com>
7973
7974         Reviewed by Maciej.
7975
7976         * Info.plist: Update copyright string.
7977
7978 2007-01-24  Darin Adler  <darin@apple.com>
7979
7980         Reviewed by Mark Rowe.
7981
7982         * WebKit.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
7983         so we don't rely on people's paths.
7984
7985 2007-01-24  Darin Adler  <darin@apple.com>
7986
7987         Reviewed by Adele.
7988
7989         - fix small regression and GC problems noticed by code inspection
7990
7991         * WebView/WebHTMLView.mm: Move global declarations to the start of the file.
7992         (+[WebHTMLView _excludedElementsForAttributedStringConversion]):
7993         Add a CFRetain here for GC compatibility.
7994         (+[WebHTMLView _insertablePasteboardTypes]): Ditto.
7995         (-[WebHTMLView performKeyEquivalent:]): Fix small logic mistake that prevents
7996         super from being called if EventHandler::keyEvent returns false. Reformatted
7997         the code a bit and added a local variable for the frame.
7998         (-[WebHTMLView _interceptEditingKeyEvent:]): Added some comments.
7999         (-[WebHTMLView validAttributesForMarkedText]): Add a CFRetain here for
8000         GC compatibility.
8001
8002 2007-01-23  Adele Peterson  <adele@apple.com>
8003
8004         Reviewed by Adam.
8005
8006         Fixed 2 layout tests that I broke with my last checkin.
8007
8008         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): Use the selected frame to get the WebHTMLView.
8009         * WebView/WebHTMLView.mm:
8010         (-[WebHTMLView performKeyEquivalent:]): Added global to keep track of NSEvent used here.
8011         (-[WebHTMLView _interceptEditingKeyEvent:]): Check NSEvent against the event used in performKeyEquivalent.
8012           We don't want to intercept these events.
8013
8014 2007-01-23  Adele Peterson  <adele@apple.com>
8015
8016         Reviewed by Darin.
8017
8018         WebKit part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail
8019         
8020         In addition to this fix, I also reorganized some event handling code for keyPress events to
8021         prepare for another fix.
8022
8023         * WebCoreSupport/WebEditorClient.h: Added handleKeyPress method.
8024         * WebCoreSupport/WebEditorClient.mm:
8025         (WebEditorClient::handleKeyPress): Added.  Code moved from WebHTMLView keyDown method.
8026          This is called from the defaultEventHandler so that in the future, we can make the right 
8027          decision about which selection the keyPress should apply to.
8028         * WebView/WebHTMLView.mm:
8029         (-[WebHTMLView keyDown:]): Moved _interceptEditingKeyEvent call to handleKeyPress.
8030         (-[WebHTMLView _interceptEditingKeyEvent:]): Prevents intercepting keys for cmd-modified events. Removed tabCycling checks
8031          since this is now handled in WebCore.
8032         * WebView/WebHTMLViewInternal.h: Made _interceptEditingKeyEvent SPI.
8033         * WebView/WebView.mm: Use new tabKeyCyclesThroughElements methods on the page.
8034         (-[WebViewPrivate init]): ditto.
8035         (-[WebView setTabKeyCyclesThroughElements:]): ditto.
8036         (-[WebView tabKeyCyclesThroughElements]): ditto.
8037         (-[WebView setEditable:]): ditto
8038
8039 2007-01-23  Lars Knoll <lars@trolltech.com>
8040
8041         Reviewed by Maciej
8042
8043         Make the last remaining pieces of the FrameLoader platform 
8044         independent. Move most of the code over to WebFrameLoaderClient.
8045         Some smaller cleanups in the WebFrameBridge, and moved some
8046         platform independent functionality over to the shared code
8047         in WebCore.
8048
8049         * Webcoresupport/WebFrameBridge.mm:
8050         (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]):
8051         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
8052         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
8053         * WebCoreSupport/WebFrameLoaderClient.h:
8054         * WebCoreSupport/WebFrameLoaderClient.mm:
8055         (WebFrameLoaderClient::setTitle):
8056         (WebFrameLoaderClient::createFrame):
8057         (WebFrameLoaderClient::objectContentType):
8058         (nsArray):
8059         (WebFrameLoaderClient::createPlugin):
8060         (WebFrameLoaderClient::redirectDataToPlugin):
8061         (nsMutableArray):
8062         (WebFrameLoaderClient::createJavaAppletWidget):
8063         (WebFrameLoaderClient::overrideMediaType):
8064         (WebFrameLoaderClient::windowObjectCleared):
8065
8066 2007-01-23  Oliver Hunt  <oliver@apple.com>
8067
8068         Reviewed by Adam.
8069
8070         Drop logic bindings for WebKit
8071
8072         * WebCoreSupport/WebDragClient.h: Added.
8073         * WebCoreSupport/WebDragClient.mm: Added.
8074         (WebDragClient::WebDragClient):
8075         (WebDragClient::actionMaskForDrag):
8076         (WebDragClient::willPerformDragDestinationAction):
8077           Standard client impl
8078         * WebCoreSupport/WebFrameBridge.mm:
8079         (-[WebFrameBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
8080           Updated to use DragController to track drag state
8081     
8082         * WebCoreSupport/WebPasteboardHelper.h: Added.
8083         (WebPasteboardHelper::WebPasteboardHelper):
8084           A *temporary* Helper class to access NSPasteboard access and 
8085           manipulation functions present in WebKit
8086         * WebCoreSupport/WebPasteboardHelper.mm: Added.
8087         (WebPasteboardHelper::urlFromPasteboard):
8088         (WebPasteboardHelper::plainTextFromPasteboard):
8089         (WebPasteboardHelper::fragmentFromPasteboard):
8090         (WebPasteboardHelper::insertablePasteboardTypes):
8091           See header comment
8092         * WebKit.xcodeproj/project.pbxproj:
8093         * WebView/WebDocumentInternal.h:
8094           Remove unnecessary protocol
8095         * WebView/WebFrameView.mm:
8096         (-[WebFrameView _setDocumentView:]):
8097           Updating to use DragController to track drag state
8098         * WebView/WebHTMLView.mm:
8099         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
8100           ditto
8101         (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
8102           ditto
8103         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
8104           ditto
8105         (-[WebHTMLView draggedImage:endedAt:operation:]):
8106           ditto          
8107         (-[WebHTMLView _documentFragmentForPasteboard:]):
8108           Helper method to generate DocumentFragment from NSPasteboard without regressing 
8109         (-[WebHTMLView _canProcessDragWithDraggingInfo:]):
8110           Updating to use DragController to track drag state
8111         (-[WebHTMLView _isMoveDrag:]):
8112         (-[WebHTMLView _isNSColorDrag:]):
8113         * WebView/WebHTMLViewInternal.h:
8114           Removing unnecessary fields and methods
8115         * WebView/WebView.mm:
8116         (-[WebViewPrivate dealloc]):
8117           Remove obsolete ASSERT
8118         (-[WebView _setInitiatedDrag:]):
8119           Now passes directly through to DragController
8120         (-[WebView _commonInitializationWithFrameName:groupName:]):
8121         (-[WebView _loadingDragOperationForDraggingInfo:]):
8122           Removed
8123         (-[WebView draggingEntered:]):
8124           Updated to use DragController
8125         (-[WebView draggingUpdated:]):
8126           ditto
8127         (-[WebView draggingExited:]):
8128           ditto
8129         (-[WebView performDragOperation:]):
8130           ditto
8131         (-[WebView _hitTest:dragTypes:]):
8132         * WebView/WebViewInternal.h:
8133           remove unnecessary method def
8134
8135 2007-01-22  John Sullivan  <sullivan@apple.com>
8136
8137         * WebView/WebHTMLView.mm:
8138         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
8139         Tiger build fix: remove unused variable for return value of dictionaryServiceWindowShow
8140
8141 2007-01-22  John Sullivan  <sullivan@apple.com>
8142
8143         Reviewed by Adam and Darin
8144
8145         - fixed <rdar://problem/4794320> "Look Up in Dictionary" does nothing in WebKit 
8146         (need to adopt new API)
8147
8148         * Misc/WebNSURLExtras.m:
8149         (-[NSString _web_isUserVisibleURL]):
8150         random typo correction in comment
8151
8152         * English.lproj/StringsNotToBeLocalized.txt:
8153         updated for these changes
8154
8155         * WebView/WebHTMLView.mm:
8156         (coreGraphicsScreenPointForAppKitScreenPoint):
8157         new function to convert an AppKit screen point to a CG screen point
8158         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
8159         on Leopard now uses new API. There's something of an impedance mismatch between
8160         this API and WebKit, but that was true for the SPI we were using in Tiger also.
8161         Bug 4945808 covers the ways in which this is not perfect.
8162
8163 2007-01-21  Darin Adler  <darin@apple.com>
8164
8165         Reviewed by Tim H.
8166
8167         * WebInspector/webInspector/inspector.css: Use row-resize for the splitter cursor
8168         instead of move. It's a horizontal splitter resizer.
8169
8170 2007-01-19  Adam Roben  <aroben@apple.com>
8171
8172         Reviewed by Beth.
8173
8174         Fix <rdar://problem/4942294> REGRESSION: "Spelling and Grammar",
8175         "Font", "Speech", and "Writing Direction" are missing from contextual
8176         menu
8177
8178         * WebCoreSupport/WebContextMenuClient.mm:
8179         (fixMenusForOldClients): Change our new SPI tags to
8180         WebMenuItemTagOther because old clients aren't expecting the new tags.
8181         (fixMenusFromOldClients): Use each menu item's title to figure out its
8182         correct tag again.
8183         (WebContextMenuClient::getCustomMenuFromDefaultItems): Call
8184         fixMenusForOldClients before calling up to the delegate.
8185         * WebView/WebUIDelegatePrivate.h: Define WEBMENUITEMTAG_SPI_START so
8186         that we can use it in WebContextMenuClient.
8187
8188 2007-01-19  John Sullivan  <sullivan@apple.com>
8189
8190         Reviewed by Darin
8191
8192         - WebKit part of fix for: <rdar://problem/4451715> REGRESSION: On some sites, have to 
8193           type a character before username/password autofill kicks in
8194           
8195         Added new webView:didFinishDocumentLoadForFrame: SPI and wired it up
8196
8197         * WebView/WebViewPrivate.h:
8198         declare new delegate method
8199
8200         * WebCoreSupport/WebFrameLoaderClient.h:
8201         declare dispatchDidFinishDocumentLoad()
8202
8203         * WebCoreSupport/WebFrameLoaderClient.mm:
8204         (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
8205         new method, calls new delegate method
8206
8207         * DefaultDelegates/WebDefaultFrameLoadDelegate.m:
8208         (-[WebDefaultFrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
8209         empty default implementation of new delegate method
8210
8211 2007-01-19  Anders Carlsson  <acarlsson@apple.com>
8212
8213         Reviewed by John Sullivan.
8214
8215         http://bugs.webkit.org/show_bug.cgi?id=12308
8216         REGRESSION(r18910): Crash in WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError
8217         
8218         * Plugins/WebBaseNetscapePluginView.mm:
8219         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
8220         Move code from initWithFrame in here.
8221
8222 2007-01-19  Anders Carlsson  <acarlsson@apple.com>
8223
8224         Yet another build fix.
8225         
8226         * WebCoreSupport/WebChromeClient.h:
8227         * WebCoreSupport/WebChromeClient.mm:
8228         (WebChromeClient::setStatusbarText):
8229
8230 2007-01-18  Anders Carlsson  <acarlsson@apple.com>
8231
8232         Reviewed by Adam.
8233
8234         Move functions from the bridge to the chrome client.
8235         
8236         * WebCoreSupport/WebChromeClient.h:
8237         * WebCoreSupport/WebChromeClient.mm:
8238         (WebChromeClient::runJavaScriptAlert):
8239         (WebChromeClient::runJavaScriptConfirm):
8240         (WebChromeClient::runJavaScriptPrompt):
8241         (WebChromeClient::setStatusBarText):
8242         * WebCoreSupport/WebFrameBridge.mm:
8243
8244 2007-01-18  Adam Roben  <aroben@apple.com>
8245
8246         Reviewed by Beth.
8247
8248         Fix <rdar://problem/4939672> REGRESSION: With text selected that is
8249         not a link, the "Remove Link" contextual menu item remains active
8250
8251         * WebView/WebHTMLView.mm:
8252         (-[WebHTMLView menuForEvent:]): Leave autoenabling of menu items on so
8253         that clients can implement validateMenuItem:.
8254
8255 2007-01-18  Brady Eidson  <beidson@apple.com>
8256
8257         Reviewed by Adele
8258
8259         <rdar://problem/4917290> - 
8260         Null deref in WebFrameLoaderClient::restoreScrollPositionAndViewState() 
8261         after regaining network connection
8262
8263         * WebCoreSupport/WebFrameLoaderClient.mm:
8264         (WebFrameLoaderClient::restoreScrollPositionAndViewState): Bail early with a null currentItem, preventing 
8265         a crash in release builds.  Leave the ASSERT to help find other cases where this might happen in debug builds.
8266
8267 2007-01-18  Kevin Decker  <kdecker@apple.com>
8268
8269         Reviewed by John.
8270
8271         <rdar://problem/4939511> WebKit should set the CG clip path for plug-ins that draw using CoreGraphics
8272
8273         * Plugins/WebBaseNetscapePluginView.mm:
8274         (-[WebBaseNetscapePluginView drawRect:]):  Set the CG clip path to the plug-in dirty rect. This allows plug-ins to obtain their
8275         dirty rect using functions like CGContextGetClipBoundingBox().
8276
8277 2007-01-17  Alice Liu  <alice.liu@apple.com>
8278
8279         Reviewed by Harrison.
8280
8281         Fix for <rdar://problem/4894155> REGRESSION: Extra line break is pasted with content into message body after choosing File - Paste
8282
8283         Migration of some editing code from WebHTMView to WebCore::Editor
8284         resulted in not calling pasteboardTypesForSelection, which Mail was
8285         overriding for the special purpose of adding a type to the
8286         pasteboard after WebKit did.  This patch adds 2 separate code paths
8287         for Tiger and Leopard.  On Tiger we give in and call the WebView's
8288         pasteboardTypesForSelection.  On Leopard we call a delegate after
8289         the pasteboard types are set. 
8290
8291         * DefaultDelegates/WebDefaultEditingDelegate.m:
8292         (-[WebDefaultEditingDelegate webView:didSetSelectionTypesForPasteboard:]):
8293         * WebCoreSupport/WebEditorClient.h:
8294         * WebCoreSupport/WebEditorClient.mm:
8295         (WebEditorClient::didSetSelectionTypesForPasteboard):
8296         (WebEditorClient::pasteboardTypesForSelection):
8297         * WebView/WebEditingDelegate.h:
8298
8299 2007-01-17  John Sullivan  <sullivan@apple.com>
8300
8301         Reviewed by Darin
8302
8303         - WebKit part of fix for <rdar://problem/4462420> REGRESSION: Mail hangs during 
8304           Replace All if the replacement string contains the search string
8305
8306         * Misc/WebKitVersionChecks.h:
8307         Added extern "C" so this can be used from .mm files. I don't need this change anymore for
8308         this fix, but it's still worth fixing now so it doesn't bite anyone later.
8309
8310         * WebView/WebDocumentPrivate.h:
8311         Invented new private protocol WebDocumentIncrementalSearching, that has one method. The one
8312         method is just like the one WebDocumentSearching method, but with an additional parameter.
8313         We hope to eliminate this dependence on protocols someday, but adding another one as SPI
8314         seems like it won't make anything worse.
8315         
8316         * WebView/WebHTMLView.mm:
8317         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
8318         now calls through to new method that has one additional parameter, passing NO to match old behavior
8319         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
8320         pass new parameter to bridge
8321         
8322         * WebView/WebPDFView.h:
8323         Declare conformance to WebDocumentIncrementalSearching protocol
8324         
8325         * WebView/WebPDFView.mm:
8326         (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
8327         now calls through to new method that has one additional parameter, passing NO to match old behavior
8328         (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
8329         new method, former guts of searchFor:direction:caseSensitive:wrap: but now handles startInSelection
8330         parameter
8331         
8332         * WebView/WebViewPrivate.h:
8333         Declare new searchFor:direction:caseSensitive:wrap:startInSelection: method, just like existing
8334         method but with one additional parameter
8335
8336         * WebView/WebView.mm:
8337         (-[WebView searchFor:direction:caseSensitive:wrap:]):
8338         now calls through to new method that has one additional parameter, passing NO to match old behavior
8339         (-[WebView searchFor:direction:caseSensitive:wrap:startInSelection:]):
8340         new method, former guts of searchFor:direction:caseSensitive:wrap: but now handles startInSelection
8341         parameter
8342         
8343 2007-01-17  Brady Eidson  <beidson@apple.com>
8344
8345         Reviewed by Deth Bakin and Brian Dash
8346
8347         Drop Panther Support (?!?) and change the comment explaining some SPI forward decls
8348
8349         * Misc/WebDownload.m:
8350
8351 2007-01-17  Darin Adler  <darin@apple.com>
8352
8353         Reviewed by Maciej.
8354
8355         - fix http://bugs.webkit.org/show_bug.cgi?id=12278
8356           <rdar://problem/4928705> REGRESSION(r13070): Dragged image size includes padding (12278)
8357
8358         * Misc/WebElementDictionary.mm: (-[WebElementDictionary _imageRect]):
8359         Call HitTestResult::imageRect, not HitTestResult::boundingBox.
8360
8361 2007-01-17  Anders Carlsson  <acarlsson@apple.com>
8362
8363         Reviewed by John Sullivan.
8364         
8365         Move all code in WebNetscapePluginEmbeddedView down to WebBaseNetscapePluginView.
8366         
8367         * Plugins/WebBaseNetscapePluginView.h:
8368         * Plugins/WebBaseNetscapePluginView.mm:
8369         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
8370         (-[WebBaseNetscapePluginView didStart]):
8371         (-[WebBaseNetscapePluginView dataSource]):
8372         (-[WebBaseNetscapePluginView dealloc]):
8373         (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
8374         (-[WebBaseNetscapePluginView pluginView:receivedData:]):
8375         (-[WebBaseNetscapePluginView pluginView:receivedError:]):
8376         (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]):
8377         (-[WebBaseNetscapePluginView _redeliverStream]):
8378         * Plugins/WebNetscapePluginEmbeddedView.h:
8379         * Plugins/WebNetscapePluginEmbeddedView.mm:
8380
8381 2007-01-17  Maciej Stachowiak  <mjs@apple.com>
8382
8383         Reviewed by Eric.
8384         
8385         <rdar://problem/4887781> Seed: Repro Safari crash in -[WebHTMLRepresentation receivedData:withDataSource:] (music.aol.com)
8386
8387         * WebView/WebDataSource.mm:
8388         (-[WebDataSource _receivedData:]): Protect self against destruction partway through this method.
8389
8390 2007-01-16  Alice Liu  <alice.liu@apple.com>
8391
8392         Reviewed by harrison.
8393
8394         Fixed <rdar://problem/4921134> WebKit needs extensible cut/copy to allow additional types to be written to pasteboard
8395
8396         * DefaultDelegates/WebDefaultEditingDelegate.m:
8397         (-[WebDefaultEditingDelegate webView:didWriteSelectionToPasteboard:]):
8398         * WebCoreSupport/WebEditorClient.h:
8399         * WebCoreSupport/WebEditorClient.mm:
8400         (WebEditorClient::didWriteSelectionToPasteboard):
8401         * WebKit.xcodeproj/project.pbxproj:
8402         * WebView/WebEditingDelegate.h:
8403
8404 2007-01-15  Justin Garcia  <justin.garcia@apple.com>
8405
8406         Reviewed by mjs
8407
8408         <rdar://problem/4810960>
8409         Gmail Editor: window.focus() called on keyDown (9640)
8410
8411         The window's keydown event handler was being called
8412         instead of the editable subframe's if there was a key binding
8413         for the key event.
8414
8415         * WebView/WebHTMLView.mm:
8416         (-[WebHTMLView performKeyEquivalent:]): Don't send the event
8417         to WebCore unless this WebHTMLView is the firstResponder.
8418
8419 2007-01-15  Anders Carlsson  <acarlsson@apple.com>
8420
8421         Reviewed by Darin.
8422
8423         Update to match WebCore.
8424         
8425         * WebCoreSupport/WebFrameLoaderClient.h:
8426         * WebCoreSupport/WebFrameLoaderClient.mm:
8427         (WebFrameLoaderClient::willChangeEstimatedProgress):
8428         (WebFrameLoaderClient::didChangeEstimatedProgress):
8429         (WebFrameLoaderClient::postProgressStartedNotification):
8430         (WebFrameLoaderClient::postProgressEstimateChangedNotification):
8431         (WebFrameLoaderClient::postProgressFinishedNotification):
8432         Post the correct notifications.
8433         
8434         * WebView/WebView.mm:
8435         (-[WebViewPrivate init]):
8436         (-[WebViewPrivate dealloc]):
8437         Get rid of all progress tracking code.
8438         
8439         (-[WebView estimatedProgress]):
8440         Call ProgressTracker::estimatedProgress()
8441
8442 2007-01-15  Adam Roben  <aroben@apple.com>
8443
8444         Reviewed by Darin.
8445
8446         Fix: http://bugs.webkit.org/show_bug.cgi?id=12134
8447         REGRESSION: Assertion failure and crash when right clicking selection
8448         in forms
8449
8450         * WebCoreSupport/WebContextMenuClient.mm:
8451         (fixMenusFromOldApps): Static helper to fix up menus from applications
8452         compiled against Tiger WebKit.
8453         (WebContextMenuClient::getCustomMenuFromDefaultItems): Call helper to
8454         fix menus.
8455         * WebView/WebUIDelegatePrivate.h: Fixed typo.
8456
8457 2007-01-14  David Kilzer  <ddkilzer@kilzer.net>
8458
8459         Reviewed by Darin.
8460
8461         - fix http://bugs.webkit.org/show_bug.cgi?id=12251
8462           REGRESSION (r18822-r18823): Assertion failure opening document with non-existent resources
8463           (dom/xhtml/level2/html/HTMLIFrameElement11.xhtml)
8464
8465         * WebView/WebView.mm:
8466         (-[WebView _objectForIdentifier:]): Removed assertion.
8467         (-[WebView _removeObjectForIdentifier:]): Removed assertion.
8468
8469 2007-01-12  Anders Carlsson  <acarlsson@apple.com>
8470
8471         Reviewed by Darin.
8472
8473         Add a HashMap between unsigned longs and Objective-C objects and use it for
8474         the resource load delegate.
8475         
8476         * WebCoreSupport/WebFrameLoaderClient.h:
8477         * WebCoreSupport/WebFrameLoaderClient.mm:
8478         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
8479         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
8480         (WebFrameLoaderClient::dispatchWillSendRequest):
8481         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
8482         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
8483         (WebFrameLoaderClient::dispatchDidReceiveResponse):
8484         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
8485         (WebFrameLoaderClient::dispatchDidFinishLoading):
8486         (WebFrameLoaderClient::dispatchDidFailLoading):
8487         (WebFrameLoaderClient::incrementProgress):
8488         (WebFrameLoaderClient::completeProgress):
8489         * WebView/WebView.mm:
8490         (-[WebViewPrivate init]):
8491         (-[WebViewPrivate dealloc]):
8492         (-[WebView _addObject:forIdentifier:]):
8493         (-[WebView _objectForIdentifier:]):
8494         (-[WebView _removeObjectForIdentifier:]):
8495         * WebView/WebViewInternal.h:
8496
8497 2007-01-11  Brady Eidson  <beidson@apple.com>
8498
8499         Reviewed by Anders
8500
8501         Rewrites HTTP Authentication setting up a more platform-independent structure
8502
8503         * WebCoreSupport/WebFrameLoaderClient.h:
8504         * WebCoreSupport/WebFrameLoaderClient.mm:
8505         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
8506         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
8507         * WebKit.xcodeproj/project.pbxproj:
8508
8509 2007-01-11  Darin Adler  <darin@apple.com>
8510
8511         Reviewed by Mitz.
8512
8513         - fix http://bugs.webkit.org/show_bug.cgi?id=12180
8514           REGRESSION: Double-clicking on JS exception in JS log crashes in -[SharedBufferData initWithSharedBuffer:]
8515
8516         * WebView/WebDataSource.mm: (-[WebDataSource data]): Added null check.
8517
8518 2007-01-11  Darin Adler  <darin@apple.com>
8519
8520         Reviewed by Hyatt.
8521
8522         - moved code from a couple WebCore bridging classes here instead
8523
8524         * Misc/WebNSPasteboardExtras.mm:
8525         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
8526         Use MimeTypeRegistry instead of WebMimeTypeRegistryBridge.
8527
8528         * WebView/WebHTMLRepresentation.mm:
8529         (stringArray): Added. Helper to convert a HashSet to an NSArray.
8530         (concatenateArrays): Added. Helper to concatenate two NSArray objects.
8531         (+[WebHTMLRepresentation supportedMIMETypes]): Use MimeTypeRegistry instead of
8532         WebMimeTypeRegistryBridge. Also fix a potential GC problem by using a RetainPtr
8533         instead of a [retain] on a global variable.
8534         (+[WebHTMLRepresentation supportedNonImageMIMETypes]): Ditto.
8535         (+[WebHTMLRepresentation supportedImageMIMETypes]): Ditto.
8536
8537         * WebView/WebHTMLView.mm:
8538         (-[WebHTMLView _imageExistsAtPaths:]): Use MimeTypeRegistry instead of
8539         WebMimeTypeRegistryBridge.
8540         (-[WebHTMLView _documentFragmentWithPaths:]): Ditto.
8541
8542         * WebView/WebView.mm: (+[WebView _decodeData:]): Moved code here from
8543         the old WebCoreEncodings class.
8544
8545         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way with this file.
8546         Moved WebRenderNode into the appropriate group.
8547
8548 2007-01-10  Mitz Pettel  <mitz@webkit.org>
8549
8550         Reviewed by Darin.
8551
8552         - fix http://bugs.webkit.org/show_bug.cgi?id=11775
8553           'Show URLs in Tool Tips' preference is ignored
8554
8555         * WebView/WebHTMLView.mm:
8556         (-[WebHTMLView _resetCachedWebPreferences:]):
8557         (-[WebHTMLView setDataSource:]): Added a call to _resetCachedWebPreferences:.
8558         Added an assertion that the view is not closed, instead of reopening it.
8559         Reopening should not occur, now that <http://bugs.webkit.org/show_bug.cgi?id=12087>
8560         is fixed.
8561
8562 2007-01-10  Beth Dakin  <bdakin@apple.com>
8563
8564         Reviewed by John.
8565
8566         Fix for <rdar://problem/4914258> REGRESSION: Search in Google now 
8567         operates on the current WebView instead of invoking Safari's 
8568         service
8569
8570         * WebCoreSupport/WebContextMenuClient.h:
8571         * WebCoreSupport/WebContextMenuClient.mm:
8572         (WebContextMenuClient::searchWithGoogle): Call into WebView to 
8573         search in Google.
8574         * WebView/WebViewInternal.h: Make _searchWithGoogleFromMenu 
8575         available.
8576
8577 2007-01-09  Timothy Hatcher  <timothy@apple.com>
8578
8579         Reviewed by Darin.
8580
8581         Rename the now ObjC++ files to be .mm and remove the explicit file types.
8582
8583         * DOM/WebDOMOperations.m: Removed.
8584         * DefaultDelegates/WebDefaultContextMenuDelegate.m: Removed.
8585         * English.lproj/StringsNotToBeLocalized.txt:
8586         * Misc/WebCoreStatistics.m: Removed.
8587         * Misc/WebElementDictionary.m: Removed.
8588         * Misc/WebIconDatabase.m: Removed.
8589         * Misc/WebNSAttributedStringExtras.m: Removed.
8590         * Misc/WebNSPasteboardExtras.m: Removed.
8591         * Plugins/WebNetscapePluginEmbeddedView.m: Removed.
8592         * Plugins/WebNullPluginView.m: Removed.
8593         * Plugins/WebPluginContainerCheck.m: Removed.
8594         * WebCoreSupport/WebViewFactory.m: Removed.
8595         * WebKit.xcodeproj/project.pbxproj:
8596         * WebView/WebArchiver.m: Removed.
8597         * WebView/WebHTMLRepresentation.m: Removed.
8598         * WebView/WebHTMLView.m: Removed.
8599         * WebView/WebRenderNode.m: Removed.
8600         * WebView/WebResource.m: Removed.
8601         * WebView/WebScriptDebugDelegate.m: Removed.
8602
8603 2007-01-09  Maciej Stachowiak  <mjs@apple.com>
8604
8605         Reviewed by Darin.
8606         
8607         - remove window display throttling code; no longer used
8608
8609         * Misc/WebNSWindowExtras.h:
8610         * Misc/WebNSWindowExtras.m:
8611         * WebView/WebFrameView.mm:
8612         (-[WebFrameView initWithFrame:]):
8613         * WebView/WebPreferenceKeysPrivate.h:
8614
8615 2007-01-08  Anders Carlsson  <acarlsson@apple.com>
8616
8617         Reviewed by Brady.
8618
8619         Remove bridge functions that are implemented directly in FrameLoader now.
8620         
8621         * WebCoreSupport/WebFrameBridge.mm:
8622
8623 2007-01-08  Sam Weinig  <sam@webkit.org>
8624
8625         Reviewed by Mark.
8626
8627         Adds default value for outline-color and fixes default
8628         values of the recently fixed *-color properties.
8629
8630         * WebInspector/webInspector/inspector.js:
8631
8632 2007-01-08  Beth Dakin  <bdakin@apple.com>
8633
8634         Reviewed by Adam.
8635
8636         Fix for http://bugs.webkit.org/show_bug.cgi?id=12161 REGRESSION: 
8637         Crash when control-clicking on an image for contextual menu
8638
8639         * WebView/WebHTMLView.m:
8640         (-[WebHTMLView menuForEvent:]): We need to nil-check coreMenu since 
8641         it will be nil if the DOM popped up a menu instead. I cleaned up 
8642         the function to make all the nil checks early returns instead of 
8643         nesting all of the content. Also moved the autorelease to be with 
8644         the creation of the menu instead of at the return.
8645
8646 2007-01-08  Sam Weinig  <sam@webkit.org>
8647
8648         Reviewed by Tim H.
8649
8650         Adds default value for -webkit-box-shadow and fixes default
8651         value of -webkit-column-count to be "auto".  Also sorts the
8652         list of defaults.
8653
8654         * WebInspector/webInspector/inspector.js:
8655
8656 2007-01-08  Andrew Wellington  <proton@wiretapped.net>
8657
8658         Reviewed by Mark.
8659
8660         * WebInspector/webInspector/inspector.js: Hide default values of
8661         -webkit-column styles in WebInspector.
8662
8663 2007-01-05  Darin Adler  <darin@apple.com>
8664
8665         Reviewed by Hyatt.
8666
8667         * Misc/WebNSAttributedStringExtras.m:
8668         (+[NSAttributedString _web_attributedStringFromRange:]):
8669         Updated to use new list marker text API that is String rather than
8670         DeprecatedString. Also removed code to do text form of non-text list
8671         markers since the list marker class now deals with that.
8672
8673 2007-01-05  Anders Carlsson  <acarlsson@apple.com>
8674
8675         Reviewed by Darin.
8676
8677         Fix build.
8678         
8679         * WebCoreSupport/WebFrameLoaderClient.h:
8680         * WebCoreSupport/WebFrameLoaderClient.mm:
8681         (WebFrameLoaderClient::dispatchCreatePage):
8682
8683 2007-01-05  Anders Carlsson  <acarlsson@apple.com>
8684
8685         Reviewed by Maciej.
8686
8687         The data returned is now a SharedBuffer so wrap it in an NSData object.
8688         
8689         * WebView/WebDataSource.mm:
8690         (-[WebDataSource data]):
8691
8692 2007-01-04  Adam Roben  <aroben@apple.com>
8693
8694         Reviewed by Geoff, cheered by others.
8695
8696         Dead code elimination.
8697
8698         * WebView/WebHTMLView.m:
8699
8700 2007-01-04  Adam Roben  <aroben@apple.com>
8701
8702         Boo on me for undoing Beth's hard work.
8703
8704         * WebView/WebHTMLView.m:
8705         (-[WebHTMLView menuForEvent:]): Undo a mistaken roll out of r18597.
8706
8707 2007-01-04  David Kilzer  <ddkilzer@webkit.org>
8708
8709         Reviewed by Brady.
8710
8711         - fix http://bugs.webkit.org/show_bug.cgi?id=12111
8712           Uninitialized variable in -[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]
8713
8714         * DefaultDelegates/WebDefaultPolicyDelegate.m: Initialize isDirectory.
8715
8716 2007-01-04  Adam Roben  <aroben@apple.com>
8717
8718         Reviewed by Geoff.
8719
8720         Remove WebKit/AppKit from handling tabbing between subframes.
8721
8722         * WebCoreSupport/WebChromeClient.h: Added new ChromeClient methods for
8723         moving focus out of the WebView.
8724         * WebCoreSupport/WebChromeClient.mm: Ditto.
8725         (WebChromeClient::canTakeFocus):
8726         (WebChromeClient::takeFocus):
8727         * WebCoreSupport/WebFrameBridge.mm:
8728         (-[WebFrameBridge webView]): Added null-check of m_frame.
8729         * WebView/WebHTMLView.m: Removed -[WebHTMLView nextValidKeyView].
8730         (-[WebHTMLView _updateActiveState]): Changed to focus the frame if
8731         WebCore believes it to be the focused frame.
8732         (-[WebHTMLView becomeFirstResponder]): Rewrote to call into
8733         FocusController to place focus correctly within the WebView.
8734
8735 2007-01-04  Anders Carlsson  <acarlsson@apple.com>
8736
8737         Reviewed by Brady.
8738
8739         FrameLoaderClient changed yet again.
8740         
8741         * WebCoreSupport/WebFrameLoaderClient.h:
8742         * WebCoreSupport/WebFrameLoaderClient.mm:
8743         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
8744         (WebFrameLoaderClient::dispatchWillSendRequest):
8745
8746 2007-01-04  Anders Carlsson  <acarlsson@apple.com>
8747
8748         Reviewed by Adam.
8749
8750         FrameLoaderClient changed again.
8751         
8752         * WebCoreSupport/WebFrameLoaderClient.h:
8753         * WebCoreSupport/WebFrameLoaderClient.mm:
8754         (WebFrameLoaderClient::download):
8755         (WebFrameLoaderClient::willUseArchive):
8756
8757 2007-01-04  Beth Dakin  <bdakin@apple.com>
8758
8759         Reviewed by Adam.
8760
8761         No need to hit test twice.
8762
8763         * WebView/WebHTMLView.m:
8764         (-[WebHTMLView menuForEvent:]):
8765
8766 2007-01-04  Beth Dakin  <bdakin@apple.com>
8767
8768         Reviewed by Adam.
8769
8770         Turn on WebCore context menus. Delete a bunch of WebKit context 
8771         menu code that is no longer needed.
8772
8773         * DefaultDelegates/WebDefaultContextMenuDelegate.m: Removed a lot 
8774         of code from this class. This class only still needs to exist for 
8775         PDF context menus, so we only need to deal with the menu items that 
8776         might possibly be added to a PDF context menu.
8777         (-[WebDefaultUIDelegate 
8778         menuItemWithTag:target:representedObject:]): Same.
8779         (-[WebDefaultUIDelegate 
8780         webView:contextMenuItemsForElement:defaultMenuItems:]): Same.
8781         * WebCoreSupport/WebContextMenuClient.h: Name change and have the 
8782         former getCustomMenuFromDefaultItems function return the 
8783         PlatformMenuDescription since it feels funny to have the client set 
8784         the new platform description.
8785         * WebCoreSupport/WebContextMenuClient.mm: Same.
8786         (WebContextMenuClient::getCustomMenuFromDefaultItems): Same. Also 
8787         move in some code that used to be in _menuForElement.
8788         * WebView/WebHTMLView.m: Deleted a bunch of un-used functions
8789         (-[WebHTMLView menuForEvent:]): Turn on menus, and append the 
8790         Inspect Element item. 
8791         * WebView/WebHTMLViewPrivate.h: Deleted a bunch of un-used 
8792         functions.
8793         * WebView/WebView.mm:
8794         (-[WebView _menuForElement:defaultItems:]): Removed a lot of code 
8795         from _menuForElement that now makes more sense elsewhere. Only PDF 
8796         context menus use this function now. Hopefully we can just get rid 
8797         of it soon, too.
8798
8799 2007-01-04  Anders Carlsson  <acarlsson@apple.com>
8800
8801         Reviewed by Brady.
8802
8803         Update for WebCore changes.
8804         
8805         * WebCoreSupport/WebFrameLoaderClient.h:
8806         * WebCoreSupport/WebFrameLoaderClient.mm:
8807         (WebFrameLoaderClient::download):
8808         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
8809         (WebFrameLoaderClient::dispatchWillSendRequest):
8810         (WebFrameLoaderClient::dispatchDidReceiveResponse):
8811         (WebFrameLoaderClient::incrementProgress):
8812
8813 2007-01-04  Peter Kasting  <pkasting@google.com>
8814
8815         Reviewed by Alexey.
8816
8817         http://bugs.webkit.org/show_bug.cgi?id=11900:
8818         Windows build bustage
8819
8820         * COM/ChromeClientWin.cpp:
8821         (ChromeClientWin::addMessageToConsole):
8822         (ChromeClientWin::runBeforeUnloadConfirmPanel):
8823         * COM/ChromeClientWin.h:
8824         * COM/ContextMenuClientWin.cpp:
8825         (ContextMenuClientWin::contextMenuItemSelected):
8826         * COM/ContextMenuClientWin.h:
8827         * COM/WebFrameLoaderClient.cpp:
8828         (WebFrameLoaderClient::setDocumentViewFromPageCache):
8829         (WebFrameLoaderClient::forceLayout):
8830         (WebFrameLoaderClient::forceLayoutForNonHTML):
8831         (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad):
8832         (WebFrameLoaderClient::updateGlobalHistoryForReload):
8833         (WebFrameLoaderClient::shouldGoToHistoryItem):
8834         (WebFrameLoaderClient::saveScrollPositionAndViewStateToItem):
8835         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
8836         (WebFrameLoaderClient::provisionalLoadStarted):
8837         (WebFrameLoaderClient::saveDocumentViewToPageCache):
8838         (WebFrameLoaderClient::canCachePage):
8839         * COM/WebFrameLoaderClient.h:
8840         * WebKit.vcproj/WebKit.vcproj:
8841
8842 2007-01-03  John Sullivan  <sullivan@apple.com>
8843
8844         * WebView/WebPDFView.mm:
8845         (-[WebPDFView _openWithFinder:]):
8846         Tiger build fix: use [NSNumber initWithInt:] rather than the new [NSNumber initWithInteger:]
8847
8848 2007-01-03  John Sullivan  <sullivan@apple.com>
8849
8850         Reviewed by Kevin Decker
8851
8852         - fixed <rdar://problem/4145714> WebKit's PDFView's "Open in Preview" puts the 
8853           PDF in /tmp, both group and world-readable
8854
8855         * WebView/WebPDFView.mm:
8856         (-[WebPDFView _openWithFinder:]):
8857         Make the file only readable by the current user
8858
8859 2007-01-03  Beth Dakin  <bdakin@apple.com>
8860
8861         Reviewed by John.
8862
8863         Make localized strings for all of the context menu item titles that 
8864         are accessible to WebCore.
8865
8866         * English.lproj/Localizable.strings:
8867         * WebCoreSupport/WebViewFactory.m:
8868         (-[WebViewFactory contextMenuItemTagOpenLinkInNewWindow]):
8869         (-[WebViewFactory contextMenuItemTagDownloadLinkToDisk]):
8870         (-[WebViewFactory contextMenuItemTagCopyLinkToClipboard]):
8871         (-[WebViewFactory contextMenuItemTagOpenImageInNewWindow]):
8872         (-[WebViewFactory contextMenuItemTagDownloadImageToDisk]):
8873         (-[WebViewFactory contextMenuItemTagCopyImageToClipboard]):
8874         (-[WebViewFactory contextMenuItemTagOpenFrameInNewWindow]):
8875         (-[WebViewFactory contextMenuItemTagCopy]):
8876         (-[WebViewFactory contextMenuItemTagGoBack]):
8877         (-[WebViewFactory contextMenuItemTagGoForward]):
8878         (-[WebViewFactory contextMenuItemTagStop]):
8879         (-[WebViewFactory contextMenuItemTagReload]):
8880         (-[WebViewFactory contextMenuItemTagCut]):
8881         (-[WebViewFactory contextMenuItemTagPaste]):
8882         (-[WebViewFactory contextMenuItemTagNoGuessesFound]):
8883         (-[WebViewFactory contextMenuItemTagIgnoreSpelling]):
8884         (-[WebViewFactory contextMenuItemTagLearnSpelling]):
8885         (-[WebViewFactory contextMenuItemTagSearchInSpotlight]):
8886         (-[WebViewFactory contextMenuItemTagSearchWeb]):
8887         (-[WebViewFactory contextMenuItemTagLookUpInDictionary]):
8888         (-[WebViewFactory contextMenuItemTagOpenLink]):
8889         (-[WebViewFactory contextMenuItemTagIgnoreGrammar]):
8890         (-[WebViewFactory contextMenuItemTagSpellingMenu]):
8891         (-[WebViewFactory contextMenuItemTagShowSpellingPanel:]):
8892         (-[WebViewFactory contextMenuItemTagCheckSpelling]):
8893         (-[WebViewFactory contextMenuItemTagCheckSpellingWhileTyping]):
8894         (-[WebViewFactory contextMenuItemTagCheckGrammarWithSpelling]):
8895         (-[WebViewFactory contextMenuItemTagFontMenu]):
8896         (-[WebViewFactory contextMenuItemTagShowFonts]):
8897         (-[WebViewFactory contextMenuItemTagBold]):
8898         (-[WebViewFactory contextMenuItemTagItalic]):
8899         (-[WebViewFactory contextMenuItemTagUnderline]):
8900         (-[WebViewFactory contextMenuItemTagOutline]):
8901         (-[WebViewFactory contextMenuItemTagStyles]):
8902         (-[WebViewFactory contextMenuItemTagShowColors]):
8903         (-[WebViewFactory contextMenuItemTagSpeechMenu]):
8904         (-[WebViewFactory contextMenuItemTagStartSpeaking]):
8905         (-[WebViewFactory contextMenuItemTagStopSpeaking]):
8906         (-[WebViewFactory contextMenuItemTagWritingDirectionMenu]):
8907         (-[WebViewFactory contextMenuItemTagDefaultDirection]):
8908         (-[WebViewFactory contextMenuItemTagLeftToRight]):
8909         (-[WebViewFactory contextMenuItemTagRightToLeft]):
8910
8911 2007-01-03  Brady Eidson  <beidson@apple.com>
8912
8913         Reviewed by John Sullivan
8914
8915         In the Bookmarks View/History View, favicon may be the incorrect size
8916
8917         * History/WebHistoryItem.mm:
8918         (-[WebHistoryItem icon]): Call to the WebIconDatabase until a WebCore issue is resolved
8919
8920 2007-01-03  Adele Peterson  <adele@apple.com>
8921
8922         Reviewed by Darin.
8923
8924         - Fix for <rdar://problem/4455147> Safari allows division slash character in URLs, which looks like slash character (not fixed by IDNScriptWhiteList.txt)
8925
8926         * Misc/WebNSURLExtras.m: (allCharactersInIDNScriptWhiteList): Always disallow the division slash character.
8927
8928 2007-01-02  Brady Eidson <beidson@apple.com>
8929
8930         Controversially reviewed by Tim H. and Maciej
8931
8932         Fixes http://bugs.webkit.org/show_bug.cgi?id=12086, http://bugs.webkit.org/show_bug.cgi?id=12088, 
8933         possibly http://bugs.webkit.org/show_bug.cgi?id=12087, and probably a slew of others
8934
8935         WebHistoryItems returned from the WebBackForwardList accessors were being release/retained out-of-order
8936         by the Safari app.  This bug never surfaced before because the WebBackForwardList had a retain on the 
8937         item, preventing deallocation. Since the items are now just temporary wrappers, the list 
8938         is no longer actually retaining them.
8939
8940         This solution is to simulate the ownership with a [[id retain] autorelease] - gross, but maybe the 
8941         only solution for now...  =/
8942
8943         We can possibly consider reverting this fix at a later date - that task is marked by
8944         <rdar://problem/4905705>
8945
8946         * History/WebBackForwardList.mm:
8947         (-[WebBackForwardList backItem]):
8948         (-[WebBackForwardList currentItem]):
8949         (-[WebBackForwardList forwardItem]):
8950         (-[WebBackForwardList itemAtIndex:]):
8951
8952 2007-01-02  Beth Dakin  <bdakin@apple.com>
8953
8954         Reviewed by Geoff.
8955
8956         Remove un-used function.
8957
8958         * WebCoreSupport/WebContextMenuClient.h:
8959         * WebCoreSupport/WebContextMenuClient.mm:
8960
8961 2007-01-02  Brady Eidson  <beidson@apple.com>
8962
8963         Reviewed extensively and repeatedly by Darin
8964
8965         <rdar://problem/4887137> - WebCore Back/Forward Cache 
8966         Most things not specifically commented on in the ChangeLog can be summed up as 
8967         "Do things exactly the same way as we used to, but just stick in WebCore-land as much as possible"
8968
8969         * History/WebBackForwardList.mm:
8970         (kitPrivate): Convenience functions to help with subbing "WebBackForwardListPrivate" for WebCore::BackForwardList
8971         (core):
8972         (backForwardListWrappers): A HashMap pattern used to map WebCore objects to their WebKit counterpart
8973         (kit):
8974         (+[WebBackForwardList setDefaultPageCacheSizeIfNecessary]):
8975         (-[WebBackForwardList initWithWebCoreBackForwardList:]):
8976         (-[WebBackForwardList init]):
8977         (-[WebBackForwardList dealloc]):
8978         (-[WebBackForwardList finalize]):
8979         (-[WebBackForwardList _close]):
8980         (-[WebBackForwardList addItem:]):
8981         (-[WebBackForwardList removeItem:]):
8982         (-[WebBackForwardList containsItem:]):
8983         (-[WebBackForwardList goBack]):
8984         (-[WebBackForwardList goForward]):
8985         (-[WebBackForwardList goToItem:]):
8986         (-[WebBackForwardList backItem]):
8987         (-[WebBackForwardList currentItem]):
8988         (-[WebBackForwardList forwardItem]):
8989         (vectorToNSArray):
8990         (-[WebBackForwardList backListWithLimit:]):
8991         (-[WebBackForwardList forwardListWithLimit:]):
8992         (-[WebBackForwardList capacity]):
8993         (-[WebBackForwardList setCapacity:]):
8994         (-[WebBackForwardList description]):
8995         (-[WebBackForwardList _clearPageCache]):
8996         (-[WebBackForwardList setPageCacheSize:]):
8997         (-[WebBackForwardList pageCacheSize]):
8998         (-[WebBackForwardList _usesPageCache]):
8999         (-[WebBackForwardList backListCount]):
9000         (-[WebBackForwardList forwardListCount]):
9001         (-[WebBackForwardList itemAtIndex:]):
9002         * History/WebBackForwardListInternal.h: Added.
9003
9004         * History/WebHistory.m: Removed.
9005         * History/WebHistory.mm: Added - Needed to be .mm to accept C++ header style
9006         (-[_WebCoreHistoryProvider containsItemForURLLatin1:length:]):
9007         (-[_WebCoreHistoryProvider containsItemForURLUnicode:length:]):
9008
9009         * History/WebHistoryItem.mm:
9010         (kitPrivate): Same pattern as WebBackForwardList
9011         (core):
9012         (historyItemWrappers):
9013         (WKNotifyHistoryItemChanged):
9014         (-[WebHistoryItem init]):
9015         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
9016         (-[WebHistoryItem dealloc]):
9017         (-[WebHistoryItem finalize]):
9018         (-[WebHistoryItem copyWithZone:]):
9019         (-[WebHistoryItem URLString]):
9020         (-[WebHistoryItem originalURLString]):
9021         (-[WebHistoryItem title]):
9022         (-[WebHistoryItem setAlternateTitle:]):
9023         (-[WebHistoryItem alternateTitle]):
9024         (-[WebHistoryItem icon]):
9025         (-[WebHistoryItem lastVisitedTimeInterval]):
9026         (-[WebHistoryItem hash]):
9027         (-[WebHistoryItem isEqual:]):
9028         (-[WebHistoryItem description]):
9029         (kit):
9030         (+[WebHistoryItem entryWithURL:]):
9031         (+[WebHistoryItem initWindowWatcherIfNecessary]):
9032         (-[WebHistoryItem initWithURL:target:parent:title:]):
9033         (-[WebHistoryItem initWithWebCoreHistoryItem:]):
9034         (-[WebHistoryItem setTitle:]):
9035         (-[WebHistoryItem setVisitCount:]):
9036         (-[WebHistoryItem setViewState:]):
9037         (-[WebHistoryItem _mergeAutoCompleteHints:]):
9038         (-[WebHistoryItem initFromDictionaryRepresentation:]):
9039         (-[WebHistoryItem scrollPoint]):
9040         (-[WebHistoryItem _transientPropertyForKey:]):
9041         (-[WebHistoryItem _setTransientProperty:forKey:]):
9042         (-[WebHistoryItem dictionaryRepresentation]):
9043         (-[WebHistoryItem target]):
9044         (-[WebHistoryItem isTargetItem]):
9045         (-[WebHistoryItem visitCount]):
9046         (-[WebHistoryItem RSSFeedReferrer]):
9047         (-[WebHistoryItem setRSSFeedReferrer:]):
9048         (-[WebHistoryItem children]):
9049         (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
9050         (-[WebHistoryItem URL]):
9051         (-[WebHistoryItem _setLastVisitedTimeInterval:]):
9052         (-[WebHistoryItem _lastVisitedDate]):
9053         (-[WebHistoryItem targetItem]):
9054         (+[WebHistoryItem _releaseAllPendingPageCaches]):
9055         (-[WebWindowWatcher windowWillClose:]):
9056         * History/WebHistoryItemInternal.h:
9057         * History/WebHistoryItemPrivate.h:
9058
9059         * WebCoreSupport/WebFrameBridge.mm:
9060         * WebCoreSupport/WebFrameLoaderClient.h:
9061         * WebCoreSupport/WebFrameLoaderClient.mm:
9062         (WebFrameLoaderClient::setDocumentViewFromPageCache):
9063         (WebFrameLoaderClient::detachedFromParent1):
9064         (WebFrameLoaderClient::loadedFromPageCache):
9065         (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad):
9066         (WebFrameLoaderClient::updateGlobalHistoryForReload):
9067         (WebFrameLoaderClient::shouldGoToHistoryItem):
9068         (WebFrameLoaderClient::frameLoadCompleted):
9069         (WebFrameLoaderClient::saveScrollPositionAndViewStateToItem):
9070         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
9071         (WebFrameLoaderClient::provisionalLoadStarted):
9072         (WebFrameLoaderClient::setTitle):
9073         (WebFrameLoaderClient::saveDocumentViewToPageCache):
9074         (WebFrameLoaderClient::canCachePage):
9075
9076         * WebCoreSupport/WebSystemInterface.m:
9077         (InitWebCoreSystemInterface):
9078
9079         * WebKit.xcodeproj/project.pbxproj:
9080
9081         * WebView/WebDataSource.mm:
9082         * WebView/WebDataSourceInternal.h:
9083
9084         * WebView/WebFrame.mm:
9085         (-[WebFramePrivate dealloc]):
9086         (-[WebFrame _canCachePage]):
9087         (-[WebFrame _loadURL:referrer:intoChild:]):
9088         * WebView/WebFrameInternal.h:
9089
9090         * WebView/WebFrameView.mm:
9091         (-[WebFrameView initWithFrame:]):
9092         (-[WebFrameView keyDown:]):
9093
9094         * WebView/WebHTMLView.m:
9095         (-[WebHTMLView closeIfNotCurrentView]): Added for a dirty hack in WebCore that is marked with a FIXME Radar
9096         * WebView/WebHTMLViewInternal.h:
9097
9098         * WebView/WebView.mm:
9099         (-[WebViewPrivate init]):
9100         (-[WebViewPrivate dealloc]):
9101         (-[WebView _close]):
9102         (-[WebView _loadBackForwardListFromOtherView:]):
9103         (-[WebView _commonInitializationWithFrameName:groupName:]):
9104         (-[WebView initWithCoder:]):
9105         (-[WebView backForwardList]):
9106         (-[WebView goBack]):
9107         (-[WebView goForward]):
9108         (-[WebView goToBackForwardItem:]):
9109         (-[WebView canGoBack]):
9110         (-[WebView canGoForward]):
9111
9112 2007-01-02  John Sullivan  <sullivan@apple.com>
9113
9114         Reviewed by Kevin Decker
9115
9116         - fixed <rdar://problem/4892525> Cannot open PDF in Preview if you attempted to 
9117           open it in Preview while PDF was loading
9118
9119         * WebView/WebPDFView.mm:
9120         (-[WebPDFView menuForEvent:]):
9121         added comment
9122         (-[WebPDFView validateUserInterfaceItem:]):
9123         disable this menu item when there's no document yet
9124         (-[WebPDFView _openWithFinder:]):
9125         If this is invoked when there is no document yet (e.g. via the PDFKit delegate method), 
9126         just beep and return. I should make a nice error message here, but I'll do that separately.
9127
9128 2007-01-03  Nikolas Zimmermann  <zimmermann@kde.org>
9129
9130         Reviewed by Timothy.
9131
9132         Fix inspection of RenderSVGInlineText objects (#text nodes in SVG documents).
9133
9134         * WebInspector/WebInspector.m:
9135         (-[WebInspector _highlightNode:]):
9136
9137 2007-01-02  Beth Dakin  <bdakin@apple.com>
9138
9139         Reviewed by Darin.
9140
9141         Fix bug with WebCore context menu item "Copy Image."
9142
9143         * WebCoreSupport/WebContextMenuClient.mm:
9144         (WebContextMenuClient::copyImageToClipboard): We must call 
9145         declareTypes on the pasteboard.
9146
9147 2006-12-27  Mitz Pettel  <mitz@webkit.org>
9148
9149         Reviewed by Geoff.
9150
9151         - fix http://bugs.webkit.org/show_bug.cgi?id=9403
9152           Red outline from Web Inspector appears above all other OS X windows
9153
9154         Made the window containing the highlight a child window of the window
9155         containing the view.
9156
9157         * WebInspector/WebNodeHighlight.m:
9158         (-[WebNodeHighlight initWithBounds:andRects:forView:]):
9159         (-[WebNodeHighlight dealloc]):
9160         (-[WebNodeHighlight expire]):
9161
9162 2006-12-27  Matt Lilek  <pewtermoose@gmail.com>
9163
9164         Reviewed by Tim H.
9165         
9166         Bug 11993: REGRESSION(r18320): Web Inspector scroll bars not drawn
9167         http://bugs.webkit.org/show_bug.cgi?id=11993
9168         
9169         AppleVerticalScrollbar tries to set a NaN value as the scroll height which
9170         causes DOM Exceptions after r18320.  This overrides the _setObjectLength
9171         method and checks for NaN until a system update can fix this.  See rdar://4901491
9172
9173         * WebInspector/webInspector/inspector.html:
9174         * WebInspector/webInspector/inspector.js:
9175
9176 2006-12-27  Geoffrey Garen  <ggaren@apple.com>
9177
9178         Reviewed by Oliver Hunt.
9179         
9180         Fixed <rdar://problem/4901629> Crash occurs at WebCore::Frame::page() 
9181         after closing window containing flash content
9182         
9183         No testcase because we can't open and close windows in DRT.
9184         
9185         I can't reproduce this crash, but from the backtrace it's clear that it 
9186         occured because of a NULL frame object. Since it's valid for a frame to
9187         be NULL, I've added NULL checks.
9188
9189         * Plugins/WebBaseNetscapePluginView.mm:
9190         (-[WebBaseNetscapePluginView sendEvent:]):
9191         (-[WebBaseNetscapePluginView requestWithURLCString:]):
9192         (-[WebBaseNetscapePluginView getVariable:value:]):
9193
9194 2006-12-27  Geoffrey Garen  <ggaren@apple.com>
9195
9196         Reviewed by Darin Adler.
9197         
9198         Updated <rdar://problem/4871518> fix based on Darin's comments.
9199
9200         Instead of searching the frame tree to retrieve the new frame, put it in
9201         a RefPtr, and then explicitly check for its removal. This option is slightly
9202         more efficient, and it avoids problems that can occur due to frame name collision.
9203         
9204         * WebCoreSupport/WebFrameBridge.mm:
9205         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
9206
9207 2006-12-26  Geoffrey Garen  <ggaren@apple.com>
9208
9209         Reviewed by Eric Seidel.
9210
9211         Fixed <rdar://problem/4740328> Safari crash on quit in _NPN_ReleaseObject 
9212         from KJS::Bindings::CInstance::~CInstance
9213         
9214         The essence of this change is that WebKit shouldn't meddle in plug-in
9215         lifetime, since WebCore already manages it. The rest is details.
9216         
9217         * Plugins/WebBaseNetscapePluginView.mm:
9218         (-[WebBaseNetscapePluginView removeTrackingRect]): Autorelease our window
9219         instead of releasing it, since we might hold the last reference to our window,
9220         and releasing it immediately would crash AppKit.
9221         (-[WebBaseNetscapePluginView resetTrackingRect]):
9222
9223         * Plugins/WebNetscapePluginEmbeddedView.h:
9224         * Plugins/WebNetscapePluginEmbeddedView.m:
9225         (-[WebNetscapePluginEmbeddedView dataSource]): Use our DOMElement to access
9226         our WebFrame, since we don't keep around a direct pointer to our WebFrame
9227         anymore.
9228
9229         * Plugins/WebNullPluginView.h:
9230         * Plugins/WebNullPluginView.m:
9231         (-[WebNullPluginView initWithFrame:error:DOMElement:]):
9232         (-[WebNullPluginView dealloc]):
9233         (-[WebNullPluginView viewDidMoveToWindow]): Use our DOMElement to access
9234         our WebFrame, as above.
9235
9236         * WebCoreSupport/WebFrameBridge.mm: Don't call _addPlugInView because it
9237         doesn't exist anymore. Do pass a DOMElement to WebNullPluginView's initializer,
9238         so it can access its frame like WebNetscapePluginEmbeddedView does.
9239         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
9240         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
9241
9242         * WebCoreSupport/WebFrameLoaderClient.h:
9243         * WebCoreSupport/WebFrameLoaderClient.mm: Removed didCloseDocument. It had
9244         two purposes -- one unnecessary, one harmful:
9245         (1) NULL out plug-ins' weak references to their frames. Unnecessary. Having 
9246         plug-ins access their frames through their DOM elements solves this problem.
9247         (2) Unload plug-ins. Harmful. If a plug-in unloads before WebCore is done
9248         with it, WebCore will access unmapped memory. Also unnecessary. WebCore
9249         Widgets take care of calling -removeFromSuperview on their NSViews, which
9250         is sufficient for stopping plug-ins.
9251
9252         * WebKit.xcodeproj/project.pbxproj: Made WebNullPluginView.m ObjC++.
9253
9254         * WebView/WebFrame.mm: Removed _addPlugInView, since it was only used to
9255         call -setWebFrame, which is gone.
9256         (-[WebFramePrivate dealloc]):
9257         * WebView/WebFrameInternal.h: Removed plugInViews, since it was only used
9258         by _addPlugInView, which is gone.
9259
9260 2006-12-26  Geoffrey Garen  <ggaren@apple.com>
9261
9262         Reviewed by Eric Seidel.
9263
9264         Some cleanup in preparation for fixing <rdar://problem/4740328> Safari 
9265         crash on quit in _NPN_ReleaseObject from KJS::Bindings::CInstance::~CInstance
9266         
9267         Renamed "installedPlugins" to "sharedDatabase." This better follows 
9268         the Cocoa naming scheme, and calls out the key attribute that produced this 
9269         crash -- namely, that the database is shared throughout the process.
9270         
9271         -installedPlugins is actually a part of SPI, but a global search showed
9272         that it had no users.
9273
9274         * Plugins/WebPluginDatabase.h:
9275         * Plugins/WebPluginDatabase.m:
9276         (+[WebPluginDatabase sharedDatabase]):
9277         (-[WebPluginDatabase refresh]):
9278         (-[WebPluginDatabase _plugInPaths]):
9279         (-[WebPluginDatabase _removePlugin:]):
9280         * WebCoreSupport/WebViewFactory.m:
9281         (-[WebViewFactory pluginsInfo]):
9282         (-[WebViewFactory refreshPlugins:]):
9283         (-[WebViewFactory pluginSupportsMIMEType:]):
9284         * WebView/WebView.mm:
9285         (+[WebView _supportedMIMETypes]):
9286         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
9287         (-[WebView _close]):
9288         (-[WebView _pluginForMIMEType:]):
9289         (-[WebView _pluginForExtension:]):
9290         (-[WebView _isMIMETypeRegisteredAsPlugin:]):
9291
9292 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
9293
9294         Reviewed by Adam Roben.
9295         
9296         Fixed <rdar://problem/4778898> REGRESSION: crash in getInstanceForView() 
9297         when quitting from kcbs.com
9298
9299         No testcase because we can't open and close windows in DRT.
9300
9301         The crash was caused by deallocating plug-ins that were later referenced
9302         in the unload event handler.
9303
9304         * Plugins/WebBaseNetscapePluginView.mm: Don't call stop on ourselves because
9305         we may destroy our plugin before the unload handler fires. Also, we don't
9306         need to, since didCloseDocument will do it for us.
9307
9308         (-[WebBaseNetscapePluginView addWindowObservers]): We don't need to listen
9309         for windowWillClose anymore, since we don't want to call -stop on ourselves.
9310         (-[WebBaseNetscapePluginView removeWindowObservers]): ditto.
9311
9312         * WebCoreSupport/WebFrameLoaderClient.h:
9313         * WebCoreSupport/WebFrameLoaderClient.mm:
9314         (WebFrameLoaderClient::didCloseDocument): Renamed from "willCloseDocument."
9315
9316 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
9317
9318         More "plugin" => "pluginPackage" renaming that I forgot to check in.
9319         
9320         * Plugins/WebBaseNetscapePluginView.h:
9321         * Plugins/WebBaseNetscapePluginView.mm:
9322         (-[WebBaseNetscapePluginView setPluginPackage:]):
9323         * Plugins/WebNetscapePluginEmbeddedView.h:
9324         * Plugins/WebNetscapePluginEmbeddedView.m:
9325         (-[WebNetscapePluginEmbeddedView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
9326         * WebCoreSupport/WebFrameBridge.mm:
9327         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
9328         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
9329
9330 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
9331
9332         Reviewed by Eric Seidel.
9333         
9334         Fixed crash when opening view source window.
9335
9336         * WebView/WebView.mm:
9337         (-[WebView initWithCoder:]): Don't use the WebView until calling
9338         _commonInitialization...
9339
9340 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
9341
9342         Reviewed by Oliver Hunt.
9343         
9344         Removed WebCoreSettings, cleaned up WebCore::Settings.
9345
9346         * WebView/WebFrame.mm: Added helper functions for converting between
9347         WebKitEditableLinkBehavior and WebCore::EditableLinkBehavior. I'm not sure
9348         that this is the best place for these functions, but it's where all the
9349         other functions like them reside.
9350         (core):
9351         (kit):
9352         * WebView/WebFrameInternal.h:
9353
9354         * WebView/WebView.mm: Removed uses of WebCoreSettings. Replaced with direct
9355         use of underlying page's settings.
9356
9357 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
9358
9359         Reviewed by Oliver Hunt.
9360         
9361         Some refactoring in preparation for fixing <rdar://problem/4778898> 
9362         REGRESSION: crash in getInstanceForView() when quitting from kcbs.com
9363         
9364         Two renames:
9365             - "plugin" => "pluginPackage" (since the type is WebNetscapePluginPackage *)
9366             - "instance" and/or "pluginPointer" => plugin (since NPP is an opaque handle to a plug-in)
9367         
9368         Removed braces around single-line 'if' statements.
9369         
9370         Made plugin a pointer instead of an inline ivar. This allows us to NULL
9371         it out once we call NPP_Destroy on it.
9372         
9373         Added helper functions for creating and destroying plugin. The destroy function
9374         NULLs out plugin, which helps with debugging.
9375             
9376         (-[WebBaseNetscapePluginView willCallPlugInFunction]): Added an ASSERT
9377         to catch attempts to call functions on destroyed plug-ins.
9378
9379         (-[WebBaseNetscapePluginView _createPlugin]): New helper function.
9380         (-[WebBaseNetscapePluginView _destroyPlugin]): New helper function.
9381
9382 2006-12-24  David Kilzer  <ddkilzer@webkit.org>
9383
9384         Removed empty directory.
9385
9386         * WebKit/Loader: Removed.
9387
9388 2006-12-22  Geoffrey Garen  <ggaren@apple.com>
9389
9390         Reviewed by Brady Eidson.
9391         
9392         Fixed <rdar://problem/4871518> Leopard9A321: Crash visiting www.audible.com 
9393         (WebCore::FrameLoader::loadSubframe)
9394
9395         * WebCoreSupport/WebFrameBridge.mm:
9396         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
9397         - The fix: 
9398             Changed to re-fetch the child frame we're trying to load before returning it,
9399             since its onload handler may have removed it from the document. This
9400             allows us to treat a removed frame like a frame that never loaded.
9401         
9402         - Plus some cleanup:
9403             - Changed to return a WebCore::Frame* instead of a WebFrameBridge *,
9404             to simplify some code.
9405             - Grouped ObjC objects by usage, and moved calls to -release so that they
9406             immediately follow the calls that retain.
9407
9408 2006-12-21  John Sullivan  <sullivan@apple.com>
9409
9410         Reviewed by Geoff Garen
9411
9412         - improved concept and implementation of my previous checkin after discussing with Darin
9413
9414         * WebView/WebViewPrivate.h:
9415         * WebView/WebView.mm:
9416         (-[WebView setHoverFeedbackSuspended:]):
9417         renamed from setIgnoresMouseMovedEvents, and now tells the main WebHTMLView (if any) that this state has
9418         changed. Telling just the main WebHTMLView is a bit of an implementation hack. Hopefully someday we can
9419         rework the document architecture and make this kind of thing less hacky (but this is following existing
9420         customs, so I don't feel too bad)
9421         (-[WebView isHoverFeedbackSuspended]):
9422         renamed from ignoresMouseMovedEvents
9423
9424         * WebView/WebHTMLViewInternal.h:
9425         declare _hoverFeedbackSuspendedChanged
9426
9427         * WebView/WebHTMLView.m:
9428         (-[WebHTMLView _updateMouseoverWithEvent:]):
9429         test the webView's state of the hit-tested WebHTMLView rather than self 
9430         (-[WebHTMLView _hoverFeedbackSuspendedChanged]):
9431         generate a fake mouse-moved event, which simulates the mouse moving away from
9432         the current element or back over it
9433
9434 2006-12-21  Darin Adler  <darin@apple.com>
9435
9436         Reviewed by Oliver.
9437
9438         * WebInspector/webInspector/inspector.js: Added default values for the new CSS
9439         properties so they don't appear in the inspector when their values are
9440         uninteresting.
9441
9442 2006-12-21  John Sullivan  <sullivan@apple.com>
9443
9444         Reviewed by Geoff Garen
9445
9446         - added WebKit support for making a web page temporarily ignore mouse movements
9447
9448         * WebView/WebViewPrivate.h:
9449         declare ignoresMouseMovedEvents and setIgnoresMouseMovedEvents:
9450
9451         * WebView/WebView.mm:
9452         added ignoresMouseMovedEvents boolean field to _private data structure
9453         (-[WebView setIgnoresMouseMovedEvents:]):
9454         set new boolean field
9455         (-[WebView ignoresMouseMovedEvents]):
9456         return new boolean field
9457
9458         * WebView/WebHTMLView.m:
9459         (-[WebHTMLView _updateMouseoverWithEvent:]):
9460         bail out right away if [[self _webView] ignoresMouseMovedEvents]
9461
9462 2006-12-21  Mark Rowe  <bdash@webkit.org>
9463
9464         Reviewed by Geoff.
9465
9466         http://bugs.webkit.org/show_bug.cgi?id=11888
9467         Bug 11888: REGRESSION (r18320): Web Inspector panes broken
9468
9469         * WebInspector/webInspector/inspector.js: Use removeProperty to reset a style property to its
9470         initial value.  Bail out early from updateNodePane if Inspector has not yet been set.
9471
9472 2006-12-19  John Sullivan  <sullivan@apple.com>
9473
9474         Reviewed by Darin
9475
9476         - fix for unrepro infinite recursion bug:
9477         <rdar://problem/4448181> CrashTracer: 154 crashes in Safari at com.apple.AppKit: 
9478         -[NSView isDescendantOf:] + 24; infinite recursion in makeFirstResponder logic
9479
9480         * WebView/WebView.mm:
9481         added becomingFirstResponder BOOL to private struct
9482         (-[WebView becomeFirstResponder]):
9483         use _private->becomingFirstResponder to guard against infinite recursion; complain on
9484         debug builds if we run into this problem
9485
9486 2006-12-19  Timothy Hatcher  <timothy@apple.com>
9487
9488         Reviewed by Darin.
9489
9490         <rdar://problem/4891774> Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features
9491
9492         * WebKit.xcodeproj/project.pbxproj:
9493
9494 2006-12-18  Ada Chan  <adachan@apple.com>
9495
9496         Reviewed by Adam.
9497         
9498         Moved canRunBeforeUnloadConfirmPanel, runBeforeUnloadConfirmPanel, and closeWindowSoon
9499         from WebCoreFrameBridge to Chrome.
9500
9501         * COM/ChromeClientWin.cpp:
9502         (ChromeClientWin::canRunBeforeUnloadConfirmPanel):
9503         (ChromeClientWin::runBeforeUnloadConfirmPanel):
9504         (ChromeClientWin::closeWindowSoon):
9505         * COM/ChromeClientWin.h:
9506         * WebCoreSupport/WebChromeClient.h:
9507         * WebCoreSupport/WebChromeClient.mm:
9508         (WebChromeClient::canRunBeforeUnloadConfirmPanel):
9509         (WebChromeClient::runBeforeUnloadConfirmPanel):
9510         (WebChromeClient::closeWindowSoon):
9511         * WebCoreSupport/WebFrameBridge.mm:
9512
9513 2006-12-18  Alice Liu  <alice.liu@apple.com>
9514
9515         Reviewed by Adam.
9516
9517         Have the Editor handle deletion instead of WebHTMLView
9518
9519         * WebKitPrefix.h:
9520         Turned on WebCore deletion
9521
9522         * WebView/WebHTMLViewInternal.h:
9523         Moved ownership of startNewKillRingSequence to the WebCore::Editor
9524
9525         * WebView/WebHTMLView.m:
9526         (-[NSArray becomeFirstResponder]):
9527         Use the Editor's startNewKillRingSequence flag
9528
9529         (-[NSArray deleteForward:]):
9530         (-[NSArray deleteBackward:]):
9531         (-[NSArray deleteWordForward:]):
9532         (-[NSArray deleteWordBackward:]):
9533         (-[NSArray deleteToBeginningOfLine:]):
9534         (-[NSArray deleteToEndOfLine:]):
9535         (-[NSArray deleteToBeginningOfParagraph:]):
9536         (-[NSArray deleteToEndOfParagraph:]):
9537         (-[NSArray deleteToMark:]):
9538         use Editor::deleteWithDirection instead of WebHTMLView's
9539
9540 2006-12-16  Adele Peterson  <adele@apple.com>
9541
9542         Reviewed by Adam.
9543
9544         WebKit part of fix for:
9545         <rdar://problem/4463829> Switch to use new search field implementation for <input type="search">
9546
9547         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Initialize WKDrawTextFieldCellFocusRing.
9548         * WebInspector/webInspector/inspector.css: Set -webkit-user-select:text and text-shadow:none on the search field.
9549           These are both properties that we didn't honor in the old control, and the inherited values didn't work or look right.
9550
9551 2006-12-16  Beth Dakin  <bdakin@apple.com>
9552
9553         Reviewed by Adam.
9554
9555         WebKit side of making WebCore context menus support state and
9556         enabled/disabled.
9557
9558         * WebCoreSupport/WebContextMenuClient.h: contextMenuItemSelected
9559         takes a pointer to the parentMenu now since menu items no longer
9560         hold onto it.
9561         * WebCoreSupport/WebContextMenuClient.mm: Same.
9562         (WebContextMenuClient::contextMenuItemSelected): Same.
9563         * WebView/WebHTMLView.m: Must call setAutoenablesItems:NO on our
9564         menu.
9565         (-[NSArray menuForEvent:]):
9566         * WebView/WebUIDelegatePrivate.h: No need for if-def.
9567
9568 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
9569
9570         Reviewed by Geoff.
9571
9572         Update for WebCore changes.
9573         
9574         * WebCoreSupport/WebFrameLoaderClient.h:
9575         * WebCoreSupport/WebFrameLoaderClient.mm:
9576         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
9577         * WebView/WebDataSource.mm:
9578         (-[WebDataSource response]):
9579
9580 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
9581
9582         Reviewed by Darin.
9583
9584         Update for WebCore changes.
9585         
9586         * WebCoreSupport/WebFrameLoaderClient.h:
9587         * WebCoreSupport/WebFrameLoaderClient.mm:
9588         (WebFrameLoaderClient::willUseArchive):
9589         * WebView/WebDataSource.mm:
9590         (-[WebDataSource _URLForHistory]):
9591
9592 2006-12-15  Marvin Decker  <marv.decker@gmail.com>
9593
9594         Reviewed by Darin and Alexey.
9595
9596         Fix the Windows build, move various Client implementations out of
9597         WebCore and into WebKit.
9598
9599         * COM/ChromeClientWin.cpp: Added.
9600         (ChromeClientWin::~ChromeClientWin):
9601         (ChromeClientWin::chromeDestroyed):
9602         (ChromeClientWin::setWindowRect):
9603         (ChromeClientWin::windowRect):
9604         (ChromeClientWin::pageRect):
9605         (ChromeClientWin::scaleFactor):
9606         (ChromeClientWin::focus):
9607         (ChromeClientWin::unfocus):
9608         (ChromeClientWin::createWindow):
9609         (ChromeClientWin::createModalDialog):
9610         (ChromeClientWin::show):
9611         (ChromeClientWin::canRunModal):
9612         (ChromeClientWin::runModal):
9613         (ChromeClientWin::setToolbarsVisible):
9614         (ChromeClientWin::toolbarsVisible):
9615         (ChromeClientWin::setStatusbarVisible):
9616         (ChromeClientWin::statusbarVisible):
9617         (ChromeClientWin::setScrollbarsVisible):
9618         (ChromeClientWin::scrollbarsVisible):
9619         (ChromeClientWin::setMenubarVisible):
9620         (ChromeClientWin::menubarVisible):
9621         (ChromeClientWin::setResizable):
9622         (ChromeClientWin::addMessageToConsole):
9623         * COM/ChromeClientWin.h: Added.
9624         * COM/ContextMenuClientWin.cpp: Added.
9625         (ContextMenuClientWin::~ContextMenuClientWin):
9626         (ContextMenuClientWin::contextMenuDestroyed):
9627         (ContextMenuClientWin::addCustomContextMenuItems):
9628         (ContextMenuClientWin::contextMenuItemSelected):
9629         (ContextMenuClientWin::copyLinkToClipboard):
9630         (ContextMenuClientWin::downloadURL):
9631         (ContextMenuClientWin::copyImageToClipboard):
9632         (ContextMenuClientWin::lookUpInDictionary):
9633         (ContextMenuClientWin::speak):
9634         (ContextMenuClientWin::stopSpeaking):
9635         * COM/ContextMenuClientWin.h: Added.
9636         * COM/EditorClientWin.cpp: Added.
9637         (EditorClientWin::~EditorClientWin):
9638         (EditorClientWin::pageDestroyed):
9639         (EditorClientWin::shouldDeleteRange):
9640         (EditorClientWin::shouldShowDeleteInterface):
9641         (EditorClientWin::smartInsertDeleteEnabled):
9642         (EditorClientWin::isContinuousSpellCheckingEnabled):
9643         (EditorClientWin::toggleContinuousSpellChecking):
9644         (EditorClientWin::isGrammarCheckingEnabled):
9645         (EditorClientWin::toggleGrammarChecking):
9646         (EditorClientWin::spellCheckerDocumentTag):
9647         (EditorClientWin::selectWordBeforeMenuEvent):
9648         (EditorClientWin::isEditable):
9649         (EditorClientWin::shouldBeginEditing):
9650         (EditorClientWin::shouldEndEditing):
9651         (EditorClientWin::shouldInsertNode):
9652         (EditorClientWin::shouldInsertText):
9653         (EditorClientWin::shouldApplyStyle):
9654         (EditorClientWin::didBeginEditing):
9655         (EditorClientWin::respondToChangedContents):
9656         (EditorClientWin::didEndEditing):
9657         (EditorClientWin::registerCommandForUndo):
9658         (EditorClientWin::registerCommandForRedo):
9659         (EditorClientWin::clearUndoRedoOperations):
9660         (EditorClientWin::canUndo):
9661         (EditorClientWin::canRedo):
9662         (EditorClientWin::undo):
9663         (EditorClientWin::redo):
9664         * COM/EditorClientWin.h: Added.
9665         * COM/WebFrame.cpp:
9666         (WebFrame::WebFrame):
9667         (WebFrame::initWithName):
9668         * COM/WebFrame.h:
9669         * COM/WebFrameLoaderClient.cpp: Added.
9670         (WebFrameLoaderClient::WebFrameLoaderClient):
9671         (WebFrameLoaderClient::~WebFrameLoaderClient):
9672         (WebFrameLoaderClient::frameLoaderDestroyed):
9673         (WebFrameLoaderClient::hasWebView):
9674         (WebFrameLoaderClient::hasFrameView):
9675         (WebFrameLoaderClient::hasBackForwardList):
9676         (WebFrameLoaderClient::resetBackForwardList):
9677         (WebFrameLoaderClient::provisionalItemIsTarget):
9678         (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
9679         (WebFrameLoaderClient::invalidateCurrentItemPageCache):
9680         (WebFrameLoaderClient::privateBrowsingEnabled):
9681         (WebFrameLoaderClient::makeDocumentView):
9682         (WebFrameLoaderClient::makeRepresentation):
9683         (WebFrameLoaderClient::forceLayout):
9684         (WebFrameLoaderClient::forceLayoutForNonHTML):
9685         (WebFrameLoaderClient::updateHistoryForCommit):
9686         (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
9687         (WebFrameLoaderClient::updateHistoryForReload):
9688         (WebFrameLoaderClient::updateHistoryForStandardLoad):
9689         (WebFrameLoaderClient::updateHistoryForInternalLoad):
9690         (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
9691         (WebFrameLoaderClient::setCopiesOnScroll):
9692         (WebFrameLoaderClient::tokenForLoadErrorReset):
9693         (WebFrameLoaderClient::resetAfterLoadError):
9694         (WebFrameLoaderClient::doNotResetAfterLoadError):
9695         (WebFrameLoaderClient::willCloseDocument):
9696         (WebFrameLoaderClient::detachedFromParent1):
9697         (WebFrameLoaderClient::detachedFromParent2):
9698         (WebFrameLoaderClient::detachedFromParent3):
9699         (WebFrameLoaderClient::detachedFromParent4):
9700         (WebFrameLoaderClient::loadedFromPageCache):
9701         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
9702         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
9703         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
9704         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
9705         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
9706         (WebFrameLoaderClient::dispatchWillClose):
9707         (WebFrameLoaderClient::dispatchDidReceiveIcon):
9708         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
9709         (WebFrameLoaderClient::dispatchDidReceiveTitle):
9710         (WebFrameLoaderClient::dispatchDidCommitLoad):
9711         (WebFrameLoaderClient::dispatchDidFinishLoad):
9712         (WebFrameLoaderClient::dispatchDidFirstLayout):
9713         (WebFrameLoaderClient::dispatchShow):
9714         (WebFrameLoaderClient::cancelPolicyCheck):
9715         (WebFrameLoaderClient::dispatchWillSubmitForm):
9716         (WebFrameLoaderClient::dispatchDidLoadMainResource):
9717         (WebFrameLoaderClient::clearLoadingFromPageCache):
9718         (WebFrameLoaderClient::isLoadingFromPageCache):
9719         (WebFrameLoaderClient::revertToProvisionalState):
9720         (WebFrameLoaderClient::clearUnarchivingState):
9721         (WebFrameLoaderClient::progressStarted):
9722         (WebFrameLoaderClient::progressCompleted):
9723         (WebFrameLoaderClient::setMainFrameDocumentReady):
9724         (WebFrameLoaderClient::willChangeTitle):
9725         (WebFrameLoaderClient::didChangeTitle):
9726         (WebFrameLoaderClient::finishedLoading):
9727         (WebFrameLoaderClient::finalSetupForReplace):
9728         (WebFrameLoaderClient::setDefersLoading):
9729         (WebFrameLoaderClient::isArchiveLoadPending):
9730         (WebFrameLoaderClient::cancelPendingArchiveLoad):
9731         (WebFrameLoaderClient::clearArchivedResources):
9732         (WebFrameLoaderClient::canHandleRequest):
9733         (WebFrameLoaderClient::canShowMIMEType):
9734         (WebFrameLoaderClient::representationExistsForURLScheme):
9735         (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
9736         (WebFrameLoaderClient::frameLoadCompleted):
9737         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
9738         (WebFrameLoaderClient::provisionalLoadStarted):
9739         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
9740         (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
9741         (WebFrameLoaderClient::didFinishLoad):
9742         (WebFrameLoaderClient::prepareForDataSourceReplacement):
9743         (WebFrameLoaderClient::setTitle):
9744         (WebFrameLoaderClient::userAgent):
9745         * COM/WebFrameLoaderClient.h: Added.
9746         * COM/WebKitDLL.h:
9747         * WebKit.vcproj/WebKit.vcproj:
9748
9749 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
9750
9751         Reviewed by Darin.
9752
9753         Include ResourceError.h.
9754         
9755         * Plugins/WebNetscapePluginStream.mm:
9756         * WebKit.xcodeproj/project.pbxproj:
9757
9758 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
9759
9760         Reviewed by Maciej.
9761
9762         Update for WebCore changes.
9763         
9764         * WebCoreSupport/WebFrameLoaderClient.h:
9765         * WebCoreSupport/WebFrameLoaderClient.mm:
9766         (WebFrameLoaderClient::incrementProgress):
9767         (WebFrameLoaderClient::committedLoad):
9768         (WebFrameLoaderClient::deliverArchivedResources):
9769         * WebView/WebView.mm:
9770         (-[WebView _incrementProgressForIdentifier:length:]):
9771         * WebView/WebViewInternal.h:
9772
9773 2006-12-14  Timothy Hatcher  <timothy@apple.com>
9774
9775         Reviewed by Darin.
9776
9777         <rdar://problem/4827549> need NSRange-based selection support exposed.
9778
9779         * WebView/WebFrame.mm:
9780         (-[WebFrame _selectedNSRange]):
9781         (-[WebFrame _selectNSRange:]):
9782         * WebView/WebFramePrivate.h:
9783
9784 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
9785
9786         Reviewed by John.
9787
9788         Update for WebCore changes.
9789         
9790         * WebCoreSupport/WebFrameLoaderClient.h:
9791         * WebCoreSupport/WebFrameLoaderClient.mm:
9792         (WebFrameLoaderClient::dispatchDidFailLoading):
9793         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
9794         (WebFrameLoaderClient::dispatchDidFailLoad):
9795         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
9796         (WebFrameLoaderClient::setMainDocumentError):
9797         (WebFrameLoaderClient::cancelledError):
9798         (WebFrameLoaderClient::cannotShowURLError):
9799         (WebFrameLoaderClient::interruptForPolicyChangeError):
9800         (WebFrameLoaderClient::cannotShowMIMETypeError):
9801         (WebFrameLoaderClient::fileDoesNotExistError):
9802         (WebFrameLoaderClient::shouldFallBack):
9803
9804 2006-12-13  Maciej Stachowiak  <mjs@apple.com>
9805
9806         Reviewed by Anders.
9807         
9808         - adjusted for changes from NSURLRequest to ResourceRequest
9809
9810         * Plugins/WebPluginController.mm:
9811         * WebCoreSupport/WebFrameLoaderClient.h:
9812         * WebCoreSupport/WebFrameLoaderClient.mm:
9813         (WebFrameLoaderClient::updateHistoryForReload):
9814         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
9815         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
9816         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
9817         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
9818         (WebFrameLoaderClient::startDownload):
9819         (WebFrameLoaderClient::cannotShowURLError):
9820         (WebFrameLoaderClient::createDocumentLoader):
9821         * WebView/WebDataSource.mm:
9822         (-[WebDataSource _initWithDocumentLoader:]):
9823         (-[WebDataSource initialRequest]):
9824         (-[WebDataSource request]):
9825         * WebView/WebDocumentLoaderMac.h:
9826         * WebView/WebDocumentLoaderMac.mm:
9827         (WebDocumentLoaderMac::WebDocumentLoaderMac):
9828         * WebView/WebFrame.mm:
9829         (-[WebFrame _createItem:]):
9830         (-[WebFrame _loadItem:withLoadType:]):
9831         (-[WebFrame loadArchive:]):
9832
9833 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
9834
9835         Reviewed by Darin.
9836
9837         * WebCoreSupport/WebFrameLoaderClient.h:
9838         * WebCoreSupport/WebFrameLoaderClient.mm:
9839         (WebFrameLoaderClient::download):
9840         Get the handle and proxy from the ResourceHandle now that they aren't passed to us.
9841         
9842 2006-12-11  Darin Adler  <darin@apple.com>
9843
9844         Reviewed by Brady.
9845
9846         - did some of the Mac-specific file moves mentioned in my recent mail to the WebKit list
9847
9848         * WebCoreSupport/WebFrameBridge.h: Updated for change to WebCoreKeyboardAccess.
9849         * WebCoreSupport/WebFrameBridge.mm:
9850         (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]): Ditto.
9851         (-[WebFrameBridge keyboardUIMode]): Ditto.
9852
9853 2006-12-11  Beth Dakin  <bdakin@apple.com>
9854
9855         Reviewed by Adam.
9856
9857         WebKit support for editing sub-menu actions.
9858
9859         * WebCoreSupport/WebContextMenuClient.h: New functions for the
9860         speech sub-menu.
9861         * WebCoreSupport/WebContextMenuClient.mm:
9862         (WebContextMenuClient::speak):
9863         (WebContextMenuClient::stopSpeaking):
9864         * WebCoreSupport/WebEditorClient.h: New functions to toggle
9865         spelling/grammar checking.
9866         * WebCoreSupport/WebEditorClient.mm:
9867         (WebEditorClient::toggleContinuousSpellChecking):
9868         (WebEditorClient::toggleGrammarChecking):
9869         * WebView/WebUIDelegatePrivate.h: Re-named some of the spelling
9870         sub-menu tags.
9871
9872 2006-12-11  Alice Liu  <alice.liu@apple.com>
9873
9874         Reviewed by Geoff, Adam.
9875         
9876         switch to use the Editor for copying URLs
9877
9878         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
9879         (-[WebDefaultUIDelegate copyLinkToClipboard:]):
9880         Call down to the editor for this. 
9881         * WebCoreSupport/WebSystemInterface.m:
9882         (InitWebCoreSystemInterface):
9883         Add some calls necessary for Pasteboard::writeURL to work
9884
9885 2006-12-11  Darin Adler  <darin@apple.com>
9886
9887         Reviewed by Brady.
9888
9889         - http://bugs.webkit.org/show_bug.cgi?id=11794
9890           fix lifetime problems affecting Frame's ownerElement pointer
9891
9892         * WebCoreSupport/WebFrameBridge.mm:
9893         (-[WebFrameBridge finishInitializingWithPage:WebCore::frameName:frameView:ownerElement:]):
9894         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:frameView:]):
9895         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
9896         Use HTMLFrameOwnerElement.
9897
9898         * WebCoreSupport/WebFrameLoaderClient.mm: Include the relevant headers for the
9899         HTMLFormElement class.
9900
9901         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way.
9902
9903         * WebView/WebFrame.mm: (-[WebFrame frameElement]): Update includes and types for the
9904         change in return type of ownerElement.
9905
9906 2006-12-11  David Harrison  <harrison@apple.com>
9907
9908         Fix previous checkin where I committed the wrong file.
9909
9910         <rdar://problem/4863611> Xyle Scope crashes at launch due to WebCore-521.29.3
9911
9912         * WebView/WebFrame.mm:
9913         (-[WebFrame frameElement]):
9914         Add nil check.
9915         
9916         * WebView/WebPreferences.m:
9917         (-[WebPreferences editableLinkBehavior]):
9918         Reverted to previous.
9919
9920 2006-12-08  David Hyatt  <hyatt@apple.com>
9921
9922         Land new ICU abstraction layer.  Patch by Lars.
9923
9924         Reviewed by me
9925
9926         * ForwardingHeaders/wtf/icu/UnicodeIcu.h: Added.
9927         * ForwardingHeaders/wtf/unicode/Unicode.h: Added.
9928         * WebKit.xcodeproj/project.pbxproj:
9929
9930 === Safari-521.32 ===
9931
9932 2006-12-08  Timothy Hatcher  <timothy@apple.com>
9933
9934         Rolling out a change that broke Mail stationary.
9935         <rdar://problem/4699166> REGRESSION: Background images in Mail stationery do not load
9936
9937         * WebView/WebUnarchivingState.m:
9938         (-[WebUnarchivingState archivedResourceForURL:]):
9939
9940 2006-12-08  Peter Kasting  <pkasting@google.com>
9941
9942         Reviewed and landed by Alexey.
9943
9944         http://bugs.webkit.org/show_bug.cgi?id=11759:
9945         Windows build bustage
9946
9947         * COM/WebFrame.cpp:
9948         (WebFrame::loadDataSource):
9949         * COM/WebFrame.h:
9950
9951 2006-12-08  David Harrison  <harrison@apple.com>
9952
9953         Reviewed by Brady.
9954
9955         <rdar://problem/4863611> Xyle Scope crashes at launch due to WebCore-521.29.3
9956
9957         * WebView/WebPreferences.m:
9958         (-[WebPreferences editableLinkBehavior]):
9959         Add nil check.
9960
9961 2006-12-07  Beth Dakin  <bdakin@apple.com>
9962
9963         Reviewed by Brady.
9964
9965         Build fix for WebCore ContextMenus. It got broken by r18046.
9966
9967         * WebView/WebHTMLView.m:
9968         (-[NSArray menuForEvent:]):
9969
9970 2006-12-07  Beth Dakin  <bdakin@apple.com>
9971
9972         Reviewed by Brady.
9973
9974         Make some parameters const and const references.
9975
9976         * WebCoreSupport/WebContextMenuClient.h:
9977         * WebCoreSupport/WebContextMenuClient.mm:
9978         (WebContextMenuClient::contextMenuItemSelected):
9979         (WebContextMenuClient::copyLinkToClipboard):
9980         (WebContextMenuClient::downloadURL):
9981         (WebContextMenuClient::copyImageToClipboard):
9982
9983 2006-12-06  Brady Eidson  <beidson@apple.com>
9984
9985         Reviewed by John Sullivan
9986
9987         Fixes http://bugs.webkit.org/show_bug.cgi?id=11675 and <rdar://4857669>
9988         Now we need to explicitly set the data source when loading from a page cache
9989
9990         * History/WebHistoryItem.mm:
9991         (-[WebHistoryItem _scheduleRelease]): Enhanced a logging message
9992         (+[WebHistoryItem _releasePageCache:]): Ditto
9993         (+[WebHistoryItem _releaseAllPendingPageCaches]): Ditto
9994         * WebCoreSupport/WebFrameLoaderClient.mm:
9995         (WebFrameLoaderClient::setDocumentViewFromPageCache): Reset the View's DataSource from the cache, effectively reopening it
9996         * WebView/WebHTMLView.m:
9997         (-[NSArray setDataSource:]): Properly Handle resetting the DataSource and "reopening" the view
9998
9999 2006-12-06  Brady Eidson  <beidson@apple.com>
10000
10001         Reviewed by Adam and Oliver
10002
10003         While working on http://bugs.webkit.org/show_bug.cgi?id=11675 I
10004         decided to fix much of the null-deref problems that creeped in via 
10005         the loader refactoring.  This isn't changing behavior, just reintroducing
10006         the free nil checking we used to have with pure ObjC
10007
10008         * WebView/WebHTMLView.m:
10009         (-[NSArray menuForEvent:]):  Explicitly check for null frames
10010         (-[NSArray mouseDown:]):  Ditto
10011         (-[NSArray mouseDragged:]):  Ditto
10012         (-[NSArray mouseUp:]):  Ditto
10013         (-[NSArray performKeyEquivalent:]):  Ditto
10014         (-[WebHTMLView elementAtPoint:allowShadowContent:]):  Ditto
10015
10016 2006-12-05  John Sullivan  <sullivan@apple.com>
10017
10018         Reviewed by Beth
10019
10020         Updated to match Frame -> Editor changes in WebCore
10021
10022         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
10023         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
10024         guessesForUngrammaticalSelection() is now in Editor
10025
10026         * WebView/WebHTMLView.m:
10027         (-[WebHTMLView _isSelectionUngrammatical]):
10028         isSelectionUngrammatical() is now in Editor
10029         (-[WebHTMLView _isSelectionMisspelled]):
10030         isSelectionMisspelled() is now in Editor
10031
10032         (-[WebHTMLView checkSpelling:]):
10033         advanceToNextMisspelling() is now in Editor
10034         (-[WebHTMLView showGuessPanel:]):
10035         ditto
10036
10037 2006-12-05  John Sullivan  <sullivan@apple.com>
10038
10039         Reviewed by Adam
10040         
10041         Old context-menu mechanism fix for:
10042         <rdar://problem/4864351> Should leave out "No Guesses Found" from context menu for bad grammar
10043
10044         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
10045         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
10046         Leave out "No Guesses Found" and separator for grammar-checking case.
10047
10048 2006-12-05  John Sullivan  <sullivan@apple.com>
10049
10050         build fix
10051
10052         * WebView/WebViewPrivate.h:
10053         * WebView/WebView.mm:
10054         (-[WebView isGrammarCheckingEnabled]):
10055         define isGrammarCheckingEnabled whether on Tiger or not (just return NO on Tiger)
10056
10057 2006-12-04  John Sullivan  <sullivan@apple.com>
10058
10059         Reviewed by Darin
10060
10061         WebKit part of fix for:
10062         <rdar://problem/4817188> Context menu for bad grammar should include suggestions and "Ignore Grammar"
10063
10064         The context menu mechanism is currently in flux; the old mechanism is still in place, but an
10065         up-and-coming new mechanism is waiting in the wings. I updated both of them, but couldn't
10066         test the new mechanism because it doesn't work well enough yet. Most of this WebKit code
10067         can be deleted when the new mechanism is in place.
10068
10069         * WebView/WebUIDelegatePrivate.h:
10070         added WebMenuItemTagIgnoreGrammar
10071
10072         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
10073         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
10074         added case for WebMenuItemTagIgnoreGrammar
10075         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
10076         now considers adding grammar-related items as well as spelling-related items
10077         
10078         * WebView/WebHTMLViewPrivate.h:
10079         declared _isSelectionUngrammatical
10080
10081         * WebView/WebHTMLView.m:
10082         (-[WebHTMLView _isSelectionUngrammatical]):
10083         new method, calls through to WebCore
10084         (-[WebHTMLView _ignoreGrammarFromMenu:]):
10085         new method, calls _ignoreSpellingFromMenu: since NSSpellChecker has one method for both
10086
10087         * English.lproj/Localizable.strings:
10088         updated for "Ignore Grammar" menu item title
10089
10090 2006-12-04  Darin Adler  <darin@apple.com>
10091
10092         Reviewed by Adele.
10093
10094         * WebCoreSupport/WebFrameLoaderClient.mm:
10095         (WebFrameLoaderClient::actionDictionary): Changed to use the new
10096         findEventWithKeyState function in WebCore instead of a local function
10097         in this file.
10098
10099 2006-12-04  Geoffrey Garen  <ggaren@apple.com>
10100
10101         Rolled out the WebDashboardBehaviorUseBackwardCompatibilityModeEnabled
10102         part of my last checkin.
10103         
10104         We have to turn on support for backward compatibility mode to avoid Dashboard
10105         regressions in the short term.
10106
10107         * WebView/WebView.mm:
10108         (-[WebView _setDashboardBehavior:to:]):
10109
10110 2006-12-02  Geoffrey Garen  <ggaren@apple.com>
10111
10112         Reviewed by Darin Adler.
10113         
10114         Added SPI for enabling Dashboard backward compatibility mode. For now,
10115         we enable it unconditionally for Dashboard and Dashcode. Once they 
10116         implement specific support for the backward compatibility mode behavior,
10117         we can change that.
10118         
10119         Set the default WebDashboardBehaviorUseBackwardCompatibilityModeEnabled
10120         to YES in order to turn this code on.
10121
10122         * WebView/WebView.mm:
10123         (-[WebView _setDashboardBehavior:to:]):
10124         (-[WebView _dashboardBehavior:]):
10125         * WebView/WebViewPrivate.h:
10126
10127 2006-12-04  Darin Adler  <darin@apple.com>
10128
10129         Reviewed by Alice.
10130
10131         * WebCoreSupport/WebEditorClient.h: Removed "_web_" prefix from
10132         C++ userVisibleString member function.
10133         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::userVisibleString):
10134         Ditto.
10135
10136         * WebView/WebView.mm: (-[WebView selectedFrame]): Removed extra return statement.
10137
10138 2006-12-04  Peter Kasting  <pkasting@google.com>
10139
10140         Reviewed and landed by Alexey.
10141
10142         http://bugs.webkit.org/show_bug.cgi?id=11738:
10143         Make link clicking work again on Windows.
10144
10145         The WebKit changes are to ignore WM_MOUSEMOVED messages when the mouse
10146         hasn't actually moved, which were preventing clicks from actually
10147         getting dispatched in many cases.  It's a peculiarity of Windows mouse
10148         handling that we receive these at all.
10149
10150         * COM/WebView.cpp:
10151         (WebView::WebView):
10152         (WebView::mouseMoved):
10153         * COM/WebView.h:
10154
10155 2006-12-04  John Sullivan  <sullivan@apple.com>
10156
10157         Reviewed by Anders
10158
10159         - fixed <rdar://problem/4857833> REGRESSION: When ctrl-clicking on a misspelled word, "Ignore Spelling" and "Learn Spelling" 
10160           menu items not displayed in the contextual menu
10161
10162         * WebView/WebHTMLView.m:
10163         (-[WebHTMLView _isSelectionMisspelled]):
10164         We were computing isSelectionMisspelled by calling WebCore, but then ignoring the result and always
10165         returning NO. D'oh!
10166
10167 2006-12-01  Beth Dakin  <bdakin@apple.com>
10168
10169         Reviewed by Adam.
10170
10171         Changes to support sub-menus in WebCore ContextMenus.
10172
10173         * WebCoreSupport/WebContextMenuClient.mm:
10174         (WebContextMenuClient::contextMenuItemSelected): 
10175         ContextMenuItem::menu() is now called parentMenu()
10176         * WebView/WebUIDelegatePrivate.h: New not-yet-API tags.
10177
10178 2006-12-01  Darin Adler  <darin@apple.com>
10179
10180         Reviewed by Mitz.
10181
10182         - fix http://bugs.webkit.org/show_bug.cgi?id=11628
10183           REGRESSION (r17597): Command-return in native text fields doesn't open a new tab or window
10184
10185         * WebCoreSupport/WebFrameLoaderClient.mm:
10186         (findKeyStateEvent): Added. Helper that finds the mouse or keyboard event in a chain
10187         of events and their underlying events.
10188         (findMouseEvent): Added. Same, but specifically for mouse events.
10189         (WebFrameLoaderClient::actionDictionary): Rewrote to use the above functions. This means we
10190         use the modifiers from the underlying events rather than just the one from the event itself.
10191         So if the event is a DOM activate event, we can still see the modifiers from the original
10192         keyboard event that triggered it. Has no effect if the event is already the right type or
10193         if there is no underlying event.
10194
10195         * WebView/WebFrame.mm: Added a newly-needed include.
10196
10197         * WebKit.xcodeproj/project.pbxproj: Xcode wants what it wants.
10198
10199 2006-12-01  Peter Kasting  <pkasting@google.com>
10200
10201         Reviewed by Mitz.
10202
10203         http://bugs.webkit.org/show_bug.cgi?id=11732:
10204         Windows build bustage.
10205
10206         * COM/WebFrame.cpp:
10207         (WebFrame::initWithName):
10208
10209 2006-12-01  Timothy Hatcher  <timothy@apple.com>
10210
10211         Reviewed by Adam.
10212
10213         <rdar://problem/4841432> 9A312: iWeb crashes on launch; _WebReportError missing from WebKit
10214
10215         Added back WebReportAssertionFailure and WebReportError for apps that still need these symbols.
10216
10217         * Misc/OldWebAssertions.c: Added.
10218         (WebReportAssertionFailure):
10219         (WebReportError):
10220         * WebKit.LP64.exp: added the new symbols, and sorted the file
10221         * WebKit.exp: added the new symbols, and sorted the file
10222         * WebKit.xcodeproj/project.pbxproj:
10223
10224 2006-11-30  Geoffrey Garen  <ggaren@apple.com>
10225
10226         Rubber Stamped by Anders Carlsson.
10227
10228         Global rename of Document::focusNode to Document::focusedNode. 'focusNode'
10229         suggested a command, and conflicted with a different meaning for 'focusNode'
10230         in the Mozilla selection API.
10231
10232         * WebView/WebHTMLView.m:
10233         (-[NSArray clearFocus]):
10234
10235 2006-11-30  Matt Lilek  <pewtermoose@gmail.com>
10236
10237         Reviewed by Mitz.
10238
10239         Bug 10698: Scroll wheel causes inspector to shift up
10240         http://bugs.webkit.org/show_bug.cgi?id=10698
10241
10242         Remove size attribute from the tree popup as a workaround for
10243         http://bugs.webkit.org/show_bug.cgi?id=11362 Bug 11362: Native popup with size="1" wraps options
10244
10245         * WebInspector/webInspector/inspector.css:
10246         * WebInspector/webInspector/inspector.html:
10247
10248 2006-11-30  Matt Lilek  <pewtermoose@gmail.com>
10249
10250         Reviewed by Tim H.
10251
10252         Move web inspector style markup to javascript to fix http://bugs.webkit.org/show_bug.cgi?id=6724
10253         Bug 6724: Text copied from Web Inspector is different from actual text
10254
10255         * WebInspector/webInspector/inspector.css:
10256         * WebInspector/webInspector/inspector.js:
10257
10258 2006-11-30  Adam Roben  <aroben@apple.com>
10259
10260         Reviewed by Beth.
10261
10262         Put code in place to use WebCore context menus when they are turned
10263         on.
10264
10265         * WebView/WebHTMLView.m:
10266         (-[NSArray menuForEvent:]):
10267
10268 2006-11-29  Timothy Hatcher  <timothy@apple.com>
10269
10270         Reviewed by Oliver.
10271
10272         Keep preferences separate from the rest of the client, making sure we are using expected preference values.
10273         This lets the inspector work when plugins are disabled for the WebView.
10274
10275         * WebInspector/WebInspector.m:
10276         (-[NSWindow window]):
10277
10278 2006-11-29  Anders Carlsson  <acarlsson@apple.com>
10279
10280         Reviewed by Tim.
10281
10282         Add back methods in WebCoreStatistics that are still used by Tiger Safari.
10283         
10284         * Misc/WebCoreStatistics.h:
10285         * Misc/WebCoreStatistics.m:
10286         (+[WebCoreStatistics emptyCache]):
10287         (+[WebCoreStatistics setCacheDisabled:]):
10288
10289 2006-11-28  Alice Liu  <alice.liu@apple.com>
10290
10291         Reviewed by Maciej.
10292
10293         A fix for a couple failing layout tests involving copy/cut in iframes.
10294
10295         * WebCoreSupport/WebEditorClient.h:
10296         * WebCoreSupport/WebEditorClient.mm:
10297         (WebEditorClient::dataForArchivedSelection):
10298         Use the frame parameter instead of using the webview's selectedFrame. 
10299
10300 2006-11-28  Beth Dakin  <bdakin@apple.com>
10301
10302         Reviewed by Geoffff.
10303
10304         Fix for http://bugs.webkit.org/show_bug.cgi?id=11691 REGRESSION 
10305         (r17399, r17511): WebElementDictionary no longer returns nil 
10306         NSStrings
10307
10308         String's NSString* operator converts null Strings to empty 
10309         NSStrings for compatibility with AppKit. We need to work around 
10310         that here.
10311
10312         * Misc/WebElementDictionary.m:
10313         (NSStringOrNil):
10314         (-[WebElementDictionary _altDisplayString]):
10315         (-[WebElementDictionary _spellingToolTip]):
10316         (-[WebElementDictionary _title]):
10317         (-[WebElementDictionary _titleDisplayString]):
10318         (-[WebElementDictionary _textContent]):
10319
10320 2006-11-28  Geoffrey Garen  <ggaren@apple.com>
10321
10322         Reviewed by Beth Dakin.
10323
10324         Fixed <rdar://problem/4844855> Should clarify when to create clients in 
10325         the WebCore client API
10326         
10327         All clients must now be supplied as constructor arguments. This clarifies 
10328         when you need to create clients, and also guarantees that objects can't 
10329         (for the most part) be in a clientless state.
10330
10331         Layout tests pass. No leaks reported.
10332         
10333         * WebCoreSupport/WebFrameBridge.mm: Shuffled around initialization and changed
10334         some arguments to resolve ciruclar dependencies at init time.
10335         (-[WebFrame _initWithWebFrameView:webView:bridge:]): We no longer call setClient
10336         here, because the client is set up at construction time.
10337
10338 2006-11-28  Anders Carlsson  <acarlsson@apple.com>
10339
10340         Reviewed by Maciej.
10341
10342         Update for changes to ResourceRequest.
10343         
10344         * WebCoreSupport/WebChromeClient.mm:
10345         (WebChromeClient::createWindow):
10346         (WebChromeClient::createModalDialog):
10347         * WebCoreSupport/WebFrameLoaderClient.mm:
10348         (WebFrameLoaderClient::canHandleRequest):
10349
10350 2006-11-28  Adam Roben  <aroben@apple.com>
10351
10352         Reviewed by Beth.
10353
10354         More WebCore context menu work.
10355
10356         * DefaultDelegates/WebDefaultUIDelegate.m: New stub delegate method implementation.
10357         (-[NSApplication webView:contextMenuItemSelected:forElement:]):
10358         * WebCoreSupport/WebContextMenuClient.h: Updated to match ContextMenuClient.h changes.
10359         * WebCoreSupport/WebContextMenuClient.mm:
10360         (WebContextMenuClient::addCustomContextMenuItems): Updated for method name changes.
10361         (WebContextMenuClient::contextMenuItemSelected): Added new client method.
10362         * WebView/WebUIDelegatePrivate.h: New private delegate method declaration.
10363
10364 2006-11-28  Alice Liu  <alice.liu@apple.com>
10365
10366         Reviewed by Justin and Adam.
10367
10368         * WebCoreSupport/WebEditorClient.h:
10369         * WebCoreSupport/WebEditorClient.mm:
10370         added the following        
10371         (WebEditorClient::smartInsertDeleteEnabled):
10372         (WebEditorClient::dataForArchivedSelectionInFrame):
10373         (WebEditorClient::_web_userVisibleString):
10374         (WebEditorClient::shouldInsertNode):
10375         
10376         * WebKitPrefix.h:
10377         Added flags to control whether WebCore cut/copy/paste is enabled.
10378         Turned on Cut and Copy, left Paste and Delete off
10379         
10380         * WebView/WebHTMLViewPrivate.h:
10381         * WebView/WebHTMLView.m:
10382         removed _can[Cut|Copy|Paste|Delete]
10383         (-[NSArray validateUserInterfaceItem:]):
10384         call the editor for canDHTML[C|C|P|D] and _can[C|C|P|D] instead 
10385         (-[NSArray delete:]):
10386         added code to call the editor's delete instead (not turned on)
10387         (-[WebHTMLView copy:]):
10388         added code to call the editor's copy (turned on)
10389         (-[WebHTMLView cut:]):
10390         added code to call the editor's cut (turned on)
10391         (-[WebHTMLView paste:]):
10392         added code to call the editor's paste (not turned on)
10393
10394 2006-11-28  Geoffrey Garen  <ggaren@apple.com>
10395
10396         Reviewed by Adam.
10397
10398         Fixed <rdar://problem/4844848> REGRESSION: extra cross-library ref/deref 
10399         calls cause .5% PLT regression.
10400         
10401         Changed ref/deref calls to a single 'xxxDestroyed' call. Moved EditorClient
10402         from the Frame to the Page, since it's only responsible for
10403         Webview-level delegate calls.
10404         
10405         I don't really love this design, but it fixes the regression and allows
10406         a single WebKit object to implement multiple client interfaces.
10407         
10408         Layout tests pass.
10409
10410 2006-11-27  Beth Dakin  <bdakin@apple.com>
10411
10412         Reviewed by Adam.
10413
10414         WebKit half of getting rid of the FixMes in ContextMenu.cpp
10415
10416         * WebCoreSupport/WebFrameLoaderClient.h: canHandleRequest takes a 
10417         ResourceRequest now.
10418         * WebCoreSupport/WebFrameLoaderClient.mm:
10419         (WebFrameLoaderClient::canHandleRequest): Same.
10420         * WebView/WebHTMLView.m:
10421         (-[WebHTMLView _isSelectionMisspelled]): Call into WebCore.
10422
10423 2006-11-27  Ada Chan  <adachan@apple.com>
10424
10425         Reviewed by Adam.
10426
10427         Part of the change to move WebCoreCache into WebKit:
10428         Added WebCache which handles emptying and enable/disabling the cache.
10429         emptyCache and setCacheDisabled have been removed from WebCoreStatistics.
10430
10431         * Misc/WebCache.h: Added.
10432         * Misc/WebCache.mm: Added.
10433         * Misc/WebCoreStatistics.h:
10434         * Misc/WebCoreStatistics.m:
10435         (+[WebCoreStatistics statistics]):
10436         * WebKit.exp:
10437         * WebKit.xcodeproj/project.pbxproj:
10438
10439 2006-11-27  Anders Carlsson  <acarlsson@apple.com>
10440
10441         Reviewed by Adam.
10442
10443         Move addMessageToConsole to Chrome.
10444
10445         * WebCoreSupport/WebChromeClient.h:
10446         * WebCoreSupport/WebChromeClient.mm:
10447         (WebChromeClient::addMessageToConsole):
10448         * WebCoreSupport/WebFrameBridge.mm:
10449
10450 2006-11-27  Brady Eidson  <beidson@apple.com>
10451
10452         Reviewed by Anders
10453
10454         Moved unused Private SPI to Internal and pruned other unused code
10455
10456         * Misc/WebIconDatabase.m:
10457         * Misc/WebIconDatabasePrivate.h:
10458
10459 2006-11-21  Darin Adler  <darin@apple.com>
10460
10461         Reviewed by Maciej.
10462
10463         - make the close method do a more-complete job to prevent world leaks seen when
10464           running some of the layout tests
10465
10466         * WebView/WebHTMLViewInternal.h: Added declaration of -[WebHTMLViewPrivate clear].
10467         * WebView/WebHTMLView.m:
10468         (-[WebHTMLViewPrivate clear]): Added method to drop references to other objects.
10469         We want to do this at "close" time, rather than waiting for deallocation time.
10470         This is especially important for the data source, which indirectly keeps a number of
10471         objects alive.
10472         (-[WebHTMLView close]): Added an explicit call to clear out the data source on the
10473         plug-in controller. Without this, we'd see the plug-in controller making calls to
10474         a deallocated data source during the layout tests. Added a call to the new clear method
10475         on the private object so that we release the objects at close time instead of waiting
10476         for deallocation time.
10477
10478         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way with the project file,
10479         because I can't fight the power.
10480
10481 2006-11-20  Samuel Weinig  <sam@webkit.org>
10482
10483         Reviewed by Alexey.
10484
10485         Fix for http://bugs.webkit.org/show_bug.cgi?id=11656
10486         Fix Windows build
10487
10488         * WebKit.vcproj/WebKit.vcproj: don't include directories that no
10489         longer exist.
10490
10491 2006-11-19  Beth Dakin  <bdakin@apple.com>
10492
10493         Reviewed by Adam.
10494
10495         WebKit side of new context menu actions.
10496
10497         * WebCoreSupport/WebContextMenuClient.h: These are for the 
10498         currently-WebKit-dependent menu actions.
10499         * WebCoreSupport/WebContextMenuClient.mm:
10500         (WebContextMenuClient::copyLinkToClipboard):
10501         (WebContextMenuClient::downloadURL):
10502         (WebContextMenuClient::copyImageToClipboard):
10503         (WebContextMenuClient::searchWithSpotlight):
10504         (WebContextMenuClient::lookUpInDictionary):
10505         * WebCoreSupport/WebEditorClient.h:
10506         * WebCoreSupport/WebEditorClient.mm:
10507         (core): These are to convert between WebViewInsertAction and 
10508         EditorInsertAction.
10509         (kit):
10510         (WebEditorClient::shouldInsertText): Added implementation for 
10511         shouldInsertText.
10512         * WebKit.xcodeproj/project.pbxproj:
10513         * WebView/WebHTMLView.m:
10514         (-[WebHTMLView _lookUpInDictionaryFromMenu:]): Moved 
10515         _lookUpInDictionary to be within the implementation of WebHTMLView 
10516         internal.
10517         * WebView/WebHTMLViewInternal.h: Add _lookUpInDictionaryFromMenu
10518         * WebView/WebViewInternal.h: Add _searchWithSpotlightFromMenu
10519
10520 2006-11-18  Peter Kasting  <pkasting@google.com>
10521
10522         Reviewed by Sam Weinig.
10523
10524         http://bugs.webkit.org/show_bug.cgi?id=11634:
10525         Fix segfault on startup for Windows build.  Also fix segfault when
10526         typing in a URL.
10527
10528         * COM/WebFrame.cpp:
10529         (WebFrame::initWithName):
10530
10531 === Safari-521.31 ===
10532
10533 2006-11-17  Timothy Hatcher  <timothy@apple.com>
10534
10535         Reviewed by Geoff.
10536
10537         <rdar://problem/4841044> Temporarily default Mail.app editable link clicking behavior, until they do it themselves
10538
10539         * WebKit.xcodeproj/project.pbxproj:
10540         * WebView/WebView.mm:
10541         (+[WebView initialize]):
10542         (-[WebView setPreferences:]):
10543
10544 2006-11-16  Peter Kasting  <pkasting@google.com>
10545
10546         Reviewed and landed by ap.
10547
10548         http://bugs.webkit.org/show_bug.cgi?id=11509:
10549         Windows build bustage.
10550
10551         * COM/WebFrame.cpp:
10552         (WebFrame::initWithName):
10553         (WebFrame::loadHTMLString):
10554         (WebFrame::stopLoading):
10555         (WebFrame::reload):
10556         (WebFrame::loadDataSource):
10557         (WebFrame::didReceiveData):
10558         (WebFrame::receivedResponse):
10559         (WebFrame::receivedAllData):
10560         * COM/WebFrame.h:
10561         * COM/WebView.cpp:
10562         (WebView::mouseMoved):
10563         (WebView::mouseDown):
10564         (WebView::mouseUp):
10565         (WebView::mouseDoubleClick):
10566         * WebKit.vcproj/WebKit.vcproj:
10567
10568 2006-11-16  Anders Carlsson  <acarlsson@apple.com>
10569
10570         Reviewed by Tim.
10571
10572         <rdar://problem/4841123>
10573         REGRESSION: Crash in WebCore::Range::boundaryPointsValid when replying to a mail Message
10574         
10575         * Misc/WebNSAttributedStringExtras.m:
10576         (+[NSAttributedString _web_attributedStringFromRange:]):
10577         If the range passed in is null, return null. When this function was in the bridge, it would never get called
10578         with a null range when nothing was selected. Instead, the range would just have invalid boundary points.
10579
10580 2006-11-15  Adam Roben  <aroben@apple.com>
10581
10582         Reviewed by Anders.
10583
10584         Added new WebContextMenuClient class to act as WebCore's ChromeClient,
10585         and moved context menu-related code there from WebChromeClient.
10586
10587         * WebCoreSupport/WebChromeClient.h:
10588         * WebCoreSupport/WebChromeClient.mm:
10589         * WebCoreSupport/WebContextMenuClient.h: Added.
10590         (WebContextMenuClient::webView):
10591         * WebCoreSupport/WebContextMenuClient.mm: Added.
10592         (WebContextMenuClient::create):
10593         (WebContextMenuClient::WebContextMenuClient):
10594         (WebContextMenuClient::ref):
10595         (WebContextMenuClient::deref):
10596         (WebContextMenuClient::addCustomContextMenuItems):
10597         * WebKit.xcodeproj/project.pbxproj: Added new files.
10598         * WebView/WebView.mm:
10599         (-[WebView _commonInitializationWithFrameName:groupName:]):
10600
10601 2006-11-15  Beth Dakin  <bdakin@apple.com>
10602         &   Adam Roben  <aroben@apple.com>
10603
10604         Reviewed by Adam & Beth.
10605
10606         WebKit side of first cut at engine context menus. Use the client to 
10607         call into the UIDelegate.
10608
10609         * WebCoreSupport/WebChromeClient.h:
10610         * WebCoreSupport/WebChromeClient.mm:
10611         (WebChromeClient::addCustomContextMenuItems):
10612         * WebKit.xcodeproj/project.pbxproj:
10613
10614 2006-11-15  Brady Eidson  <beidson@apple.com>
10615
10616         Reviewed by Maciej
10617
10618         Quick change of files to ObjC++ for BF cache re-write
10619
10620         * History/WebBackForwardList.m: Removed.
10621         * History/WebBackForwardList.mm: Added.
10622         * History/WebHistoryItem.m: Removed.
10623         * History/WebHistoryItem.mm: Added.
10624         * WebKit.xcodeproj/project.pbxproj:
10625
10626 2006-11-15  Brady Eidson  <beidson@apple.com>
10627
10628         Reviewed by Sarge
10629
10630         SPI addition
10631
10632         * WebView/WebFrame.mm:
10633         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
10634         * WebView/WebFrameInternal.h:
10635         * WebView/WebFramePrivate.h:
10636
10637 2006-11-15  Brady Eidson  <beidson@apple.com>
10638
10639         Reviewed by Adele
10640
10641         <rdar://problem/4838729> - Replace mistakenly removed SPI
10642
10643         * WebView/WebHTMLView.m:
10644         (-[WebHTMLView _handleAutoscrollForMouseDragged:]):
10645         * WebView/WebHTMLViewPrivate.h:
10646
10647 2006-11-15  Anders Carlsson  <acarlsson@apple.com>
10648
10649         Reviewed by Adele.
10650
10651         isTargetItem is used by DRT, so make it private instead of internal.
10652         
10653         * History/WebHistoryItem.m:
10654         (-[WebHistoryItem isTargetItem]):
10655         * History/WebHistoryItemInternal.h:
10656         * History/WebHistoryItemPrivate.h:
10657         * WebCoreSupport/WebFrameLoaderClient.mm:
10658
10659 2006-11-15  Brady Eidson  <beidson@apple.com>
10660
10661         Reviewed by Maciej
10662
10663         Split much of unused WebHistoryItemPrivate.h SPI into WebHistoryItemInternal.h
10664
10665         * History/WebBackForwardList.m:
10666         * History/WebHistory.m:
10667         * History/WebHistoryItem.m:
10668         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
10669         (-[WebHistoryItem initWithURL:title:]):
10670         (-[WebHistoryItem visitCount]):
10671         (-[WebHistoryItem RSSFeedReferrer]):
10672         (-[WebHistoryItem setRSSFeedReferrer:]):
10673         (-[WebHistoryItem children]):
10674         (-[WebHistoryItem dictionaryRepresentation]):
10675         (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
10676         (+[WebHistoryItem _releaseAllPendingPageCaches]):
10677         (-[WebHistoryItem URL]):
10678         (-[WebHistoryItem target]):
10679         (-[WebHistoryItem _setLastVisitedTimeInterval:]):
10680         (-[WebHistoryItem _lastVisitedDate]):
10681         (-[WebHistoryItem targetItem]):
10682         * History/WebHistoryItemInternal.h: Added.
10683         * History/WebHistoryItemPrivate.h:
10684         * WebCoreSupport/WebFrameBridge.mm:
10685         * WebCoreSupport/WebFrameLoaderClient.mm:
10686         * WebKit.xcodeproj/project.pbxproj:
10687         * WebView/WebFrame.mm:
10688         * WebView/WebView.mm:
10689
10690 2006-11-14  Beth Dakin  <bdakin@apple.com>
10691
10692         Reviewed by Geoff.
10693
10694         Moving things off the bridge and onto clients.
10695
10696         * WebCoreSupport/WebEditorClient.h:
10697         * WebCoreSupport/WebEditorClient.mm:
10698         (WebEditorClient::selectWordBeforeMenuEvent):
10699         (WebEditorClient::isEditable):
10700         * WebCoreSupport/WebFrameBridge.mm:
10701         * WebKit.xcodeproj/project.pbxproj:
10702
10703 2006-11-14  Timothy Hatcher  <timothy@apple.com>
10704
10705         Reviewed by Harrison.
10706
10707         <rdar://problem/4766635> Safari should never follow links in editable areas (add a WebKitEditableLinkNeverLive option)
10708
10709         Adds an Open Link, Open Link in New Window and Copy Link to the editing context menu.
10710         Adds a new WebKitEditableLinkNeverLive preference value that maps to WebCore's EditableLinkNeverLive.
10711
10712         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
10713         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
10714         (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
10715         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
10716         (-[WebDefaultUIDelegate requestWithURL:includingReferrerFromFrame:]):
10717         (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
10718         (-[WebDefaultUIDelegate openLink:]):
10719         * English.lproj/Localizable.strings:
10720         * WebKit.exp:
10721         * WebView/WebPreferences.m:
10722         (-[WebPreferences editableLinkBehavior]):
10723         * WebView/WebPreferencesPrivate.h:
10724         * WebView/WebUIDelegatePrivate.h:
10725
10726 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
10727
10728         Turns out I wasn't forcing DWARF on the world at all, 
10729         it's now the default!
10730
10731         * WebKit.xcodeproj/project.pbxproj:
10732
10733 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
10734
10735         I must stop trying to force DWARF on the world.
10736
10737         * WebKit.xcodeproj/project.pbxproj:
10738
10739 2006-11-14  Darin Adler  <darin@apple.com>
10740
10741         Reviewed by Anders.
10742
10743         - update for creation of EventHandler
10744
10745         * WebCoreSupport/WebFrameLoaderClient.mm:
10746         (WebFrameLoaderClient::actionDictionary):
10747         * WebView/WebHTMLView.m:
10748         (-[WebHTMLView _updateMouseoverWithEvent:]):
10749         (-[NSArray menuForEvent:]):
10750         (-[NSArray scrollWheel:]):
10751         (-[NSArray acceptsFirstMouse:]):
10752         (-[NSArray shouldDelayWindowOrderingForEvent:]):
10753         (-[NSArray mouseDown:]):
10754         (-[NSArray mouseDragged:]):
10755         (-[NSArray mouseUp:]):
10756         (-[NSArray keyDown:]):
10757         (-[NSArray keyUp:]):
10758         (-[NSArray performKeyEquivalent:]):
10759         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
10760
10761 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
10762
10763         Fix build for real this time.
10764         
10765         * WebCoreSupport/WebEditorClient.mm:
10766         (-[WebEditCommand initWithEditCommand:WebCore::]):
10767         (-[WebEditCommand dealloc]):
10768         (-[WebEditCommand finalize]):
10769         (+[WebEditCommand commandWithEditCommand:]):
10770         (-[WebEditCommand command]):
10771
10772 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
10773
10774         Try fixing the build.
10775         
10776         * WebCoreSupport/WebEditorClient.mm:
10777         (-[WebEditorUndoTarget undoEditing:]):
10778         (-[WebEditorUndoTarget redoEditing:]):
10779
10780 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
10781
10782         Reviewed by Darin.
10783
10784         Move undo/redo handling into WebEditorClient.
10785         
10786         * WebCoreSupport/WebEditorClient.h:
10787         * WebCoreSupport/WebEditorClient.mm:
10788         (WebEditorClient::WebEditorClient):
10789         (WebEditorClient::~WebEditorClient):
10790         (-[WebEditCommand initWithEditCommand:WebCore::]):
10791         (-[WebEditCommand dealloc]):
10792         (-[WebEditCommand finalize]):
10793         (+[WebEditCommand commandWithEditCommand:]):
10794         (-[WebEditCommand command]):
10795         (-[WebEditorUndoTarget undoEditing:]):
10796         (-[WebEditorUndoTarget redoEditing:]):
10797         (undoNameForEditAction):
10798         (WebEditorClient::registerCommandForUndoOrRedo):
10799         (WebEditorClient::registerCommandForUndo):
10800         (WebEditorClient::registerCommandForRedo):
10801         (WebEditorClient::clearUndoRedoOperations):
10802         (WebEditorClient::canUndo):
10803         (WebEditorClient::canRedo):
10804         (WebEditorClient::undo):
10805         (WebEditorClient::redo):
10806         * WebCoreSupport/WebFrameBridge.mm:
10807         * WebKit.xcodeproj/project.pbxproj:
10808
10809 2006-11-14  Alexey Proskuryakov  <ap@webkit.org>
10810
10811         Reviewed by Tim H.
10812
10813         http://bugs.webkit.org/show_bug.cgi?id=3387
10814         Redundant keydown, keypress, keyup events sent for arrow keys
10815
10816         Added another layer of ugly hacks around AppKit event dispatching.
10817
10818         1. For arrow keys, keyDown: is invoked after performKeyEquivalent:, so had to store
10819         _private->keyDownEvent in both methods, and make it persist after leaving them.
10820
10821         2. For Esc, AppKit calls performKeyEquivalent: with a fake event of some kind,
10822         use [NSApp currentEvent] to check for this to prevent it from being passed to  WebCore.
10823
10824         Test: manual-tests/arrow-key-events.html
10825
10826         * WebView/WebHTMLView.m:
10827         (-[NSMutableDictionary dealloc]):
10828         (-[NSArray keyDown:]):
10829         (-[NSArray keyUp:]):
10830         (-[NSArray performKeyEquivalent:]):
10831         * WebView/WebHTMLViewInternal.h:
10832
10833 2006-11-12  Brady Eidson <beidson@apple.com>
10834
10835         Rubberstamped by Anders
10836
10837         Changed some #includes from <WebKit/foo.h> to "foo.h"
10838
10839         * History/WebBackForwardList.m:
10840         * History/WebHistory.m:
10841
10842 2006-11-11  Geoffrey Garen  <ggaren@apple.com>
10843
10844         Reviewed by Maciej Stachowiak.
10845         
10846         - Fixed loader crash by clarifying ownership of WebKit client objects. 
10847         WebCore objects own their WebKit clients, and ref and deref through 
10848         virtual methods, leaving WebKit free to use whatever client / reference-counting 
10849         implementation it likes.
10850         
10851         WebKit on Mac just uses the same refcounting class that WebCore uses (Shared),
10852         but other platforms may choose to do other things.
10853
10854         * WebCoreSupport/WebChromeClient.h:
10855         (WebChromeClient::ref):
10856         (WebChromeClient::deref):
10857         (WebChromeClient::refCount):
10858         * WebCoreSupport/WebEditorClient.h: Nixed commented-out function prototypes.
10859         The ones in WebCore make clear what remains to be implemented. Replaced constructor
10860         with factory function to avoid leaks.
10861         * WebCoreSupport/WebEditorClient.mm:
10862         (WebEditorClient::create):
10863         (WebEditorClient::WebEditorClient):
10864         (WebEditorClient::setWebFrame):
10865         * WebCoreSupport/WebFrameBridge.mm:
10866         (-[WebFrameBridge initMainFrameWithPage:WebCore::frameName:view:webView:]):
10867         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
10868         * WebCoreSupport/WebFrameLoaderClient.h: Replaced constructor with factory
10869         function to avoid leaks.
10870         (WebFrameLoaderClient::ref):
10871         (WebFrameLoaderClient::deref):
10872         (WebFrameLoaderClient::refCount):
10873         * WebCoreSupport/WebFrameLoaderClient.mm:
10874         (WebFrameLoaderClient::create):
10875         * WebView/WebFrame.mm:
10876         (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):
10877
10878 === Safari-521.30 ===
10879
10880 2006-11-10  Maciej Stachowiak  <mjs@apple.com>
10881
10882         Reviewed by Anders.
10883         
10884         - remove some unnecessary uses of WebDataProtocol
10885
10886         * WebView/WebDataSource.mm: Remove the unneeded include.
10887         * WebView/WebView.mm:
10888         (+[WebView _canHandleRequest:]): Don't bother to check for unreachable URL here.
10889         Any request that has one will be an applewebdata: request, which will pass the check anyway.
10890
10891 2006-11-10  Anders Carlsson  <acarlsson@apple.com>
10892
10893         Reviewed by Geoff.
10894
10895         Update for changes to WebCore
10896         * WebView/WebHTMLView.m:
10897         (-[NSArray _applyStyleToSelection:withUndoAction:]):
10898         (-[NSArray _applyParagraphStyleToSelection:withUndoAction:]):
10899         (-[NSArray _toggleBold]):
10900         (-[NSArray _toggleItalic]):
10901
10902 2006-11-09  Anders Carlsson  <acarlsson@apple.com>
10903
10904         Reviewed by Maciej, Geoff.
10905
10906         Call execCommand directly here instead of going through the bridge.
10907         
10908         * WebView/WebHTMLView.m:
10909         (-[NSArray moveBackward:]):
10910         (-[NSArray moveBackwardAndModifySelection:]):
10911         (-[NSArray moveDown:]):
10912         (-[NSArray moveDownAndModifySelection:]):
10913         (-[NSArray moveForward:]):
10914         (-[NSArray moveForwardAndModifySelection:]):
10915         (-[NSArray moveLeft:]):
10916         (-[NSArray moveLeftAndModifySelection:]):
10917         (-[NSArray moveRight:]):
10918         (-[NSArray moveRightAndModifySelection:]):
10919         (-[NSArray moveToBeginningOfDocument:]):
10920         (-[NSArray moveToBeginningOfDocumentAndModifySelection:]):
10921         (-[NSArray moveToBeginningOfSentence:]):
10922         (-[NSArray moveToBeginningOfSentenceAndModifySelection:]):
10923         (-[NSArray moveToBeginningOfLine:]):
10924         (-[NSArray moveToBeginningOfLineAndModifySelection:]):
10925         (-[NSArray moveToBeginningOfParagraph:]):
10926         (-[NSArray moveToBeginningOfParagraphAndModifySelection:]):
10927         (-[NSArray moveToEndOfDocument:]):
10928         (-[NSArray moveToEndOfDocumentAndModifySelection:]):
10929         (-[NSArray moveToEndOfSentence:]):
10930         (-[NSArray moveToEndOfSentenceAndModifySelection:]):
10931         (-[NSArray moveToEndOfLine:]):
10932         (-[NSArray moveToEndOfLineAndModifySelection:]):
10933         (-[NSArray moveToEndOfParagraph:]):
10934         (-[NSArray moveToEndOfParagraphAndModifySelection:]):
10935         (-[NSArray moveParagraphBackwardAndModifySelection:]):
10936         (-[NSArray moveParagraphForwardAndModifySelection:]):
10937         (-[NSArray moveUp:]):
10938         (-[NSArray moveUpAndModifySelection:]):
10939         (-[NSArray moveWordBackward:]):
10940         (-[NSArray moveWordBackwardAndModifySelection:]):
10941         (-[NSArray moveWordForward:]):
10942         (-[NSArray moveWordForwardAndModifySelection:]):
10943         (-[NSArray moveWordLeft:]):
10944         (-[NSArray moveWordLeftAndModifySelection:]):
10945         (-[NSArray moveWordRight:]):
10946         (-[NSArray moveWordRightAndModifySelection:]):
10947
10948 2006-11-10  Brady Eidson  <beidson@apple.com>
10949
10950         Reviewed by Darin
10951   
10952         Took out WebIconDatabaseBridge and made WebKit call IconDatabase directly
10953
10954         * Misc/WebIconDatabase.m:
10955         (-[WebIconDatabase init]):
10956         (-[WebIconDatabase iconForURL:withSize:cache:]):
10957         (-[WebIconDatabase iconURLForURL:]):
10958         (-[WebIconDatabase defaultIconWithSize:]):
10959         (-[WebIconDatabase defaultIconForURL:withSize:]):
10960         (-[WebIconDatabase retainIconForURL:]):
10961         (-[WebIconDatabase releaseIconForURL:]):
10962         (-[WebIconDatabase setDelegate:]):
10963         (-[WebIconDatabase removeAllIcons]):
10964         (-[WebIconDatabase isIconExpiredForIconURL:]):
10965         (-[WebIconDatabase _isEnabled]):
10966         (-[WebIconDatabase _setIconData:forIconURL:]):
10967         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
10968         (-[WebIconDatabase _setIconURL:forURL:]):
10969         (-[WebIconDatabase _hasEntryForIconURL:]):
10970         (-[WebIconDatabase _applicationWillTerminate:]):
10971         (-[WebIconDatabase _resetCachedWebPreferences:]):
10972         (-[WebIconDatabase _convertToWebCoreFormat]):
10973         (webGetNSImage):
10974         * Misc/WebIconDatabaseInternal.h: Added.
10975         * Misc/WebIconDatabasePrivate.h:
10976         * WebCoreSupport/WebFrameLoaderClient.h:
10977         * WebCoreSupport/WebFrameLoaderClient.mm:
10978         (WebFrameLoaderClient::dispatchDidReceiveIcon):
10979         * WebCoreSupport/WebIconDatabaseBridge.h: Removed.
10980         * WebCoreSupport/WebIconDatabaseBridge.m: Removed.
10981         * WebKit.xcodeproj/project.pbxproj:
10982
10983 2006-11-09  Oliver Hunt  <oliver@apple.com>
10984
10985         Reviewed by Brady.
10986         
10987         Updated to make use of MimeTypeRegistry/bridge
10988
10989         * Misc/WebNSPasteboardExtras.m:
10990         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
10991         * WebCoreSupport/WebFrameBridge.mm:
10992         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
10993         * WebView/WebDataSource.mm:
10994         (-[WebDataSource _documentFragmentWithArchive:]):
10995         * WebView/WebHTMLRepresentation.m:
10996         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
10997         (+[WebHTMLRepresentation supportedImageMIMETypes]):
10998         * WebView/WebHTMLView.m:
10999         (-[WebHTMLView _imageExistsAtPaths:]):
11000         (-[WebHTMLView _documentFragmentWithPaths:]):
11001
11002 2006-11-09  Brady Eidson  <beidson@apple.com>
11003
11004         Reviewed by Darin
11005
11006         <rdar://problem/4829080>
11007         More loader re-factoring cleanup - WebFramePolicyListener was over-released
11008
11009         * WebCoreSupport/WebFrameLoaderClient.h: Changed vanilla ptr to a RetainPtr<> 
11010         * WebCoreSupport/WebFrameLoaderClient.mm:
11011         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): Ditto
11012         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto
11013         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto
11014         (WebFrameLoaderClient::dispatchWillSubmitForm): Ditto
11015         (WebFrameLoaderClient::setUpPolicyListener): Ditto
11016         (-[WebFramePolicyListener receivedPolicyDecision:]): Ditto 
11017
11018 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
11019
11020         Reviewed by Adam, Oliver.
11021
11022         Update for changes to WebCore. Pass a specific WebFrame to WebEditorClient
11023         instead of just passing the WebView.
11024         
11025         * WebCoreSupport/WebEditorClient.h:
11026         * WebCoreSupport/WebEditorClient.mm:
11027         (WebEditorClient::WebEditorClient):
11028         (WebEditorClient::setWebFrame):
11029         (WebEditorClient::isContinuousSpellCheckingEnabled):
11030         (WebEditorClient::spellCheckerDocumentTag):
11031         (WebEditorClient::shouldDeleteRange):
11032         (WebEditorClient::shouldShowDeleteInterface):
11033         (WebEditorClient::shouldApplyStyle):
11034         (WebEditorClient::shouldBeginEditing):
11035         (WebEditorClient::shouldEndEditing):
11036         (WebEditorClient::didBeginEditing):
11037         (WebEditorClient::respondToChangedContents):
11038         (WebEditorClient::didEndEditing):
11039         * WebCoreSupport/WebFrameBridge.mm:
11040         (-[WebFrameBridge initMainFrameWithPage:WebCore::frameName:view:webView:]):
11041         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
11042
11043 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
11044
11045         Reviewed by Adam.
11046
11047         Move more code into editor.
11048
11049         * WebCoreSupport/WebEditorClient.h:
11050         * WebCoreSupport/WebEditorClient.mm:
11051         (WebEditorClient::shouldBeginEditing):
11052         (WebEditorClient::shouldEndEditing):
11053         (WebEditorClient::didBeginEditing):
11054         (WebEditorClient::didEndEditing):
11055         * WebCoreSupport/WebFrameBridge.mm:
11056         * WebView/WebHTMLView.m:
11057         (-[NSArray indent:]):
11058         (-[NSArray outdent:]):
11059         * WebView/WebView.mm:
11060         * WebView/WebViewInternal.h:
11061
11062 2006-11-08  Beth Dakin  <bdakin@apple.com>
11063
11064         Reviewed by Adam.
11065
11066         Add WebElementIsContentEditableKey to the WebElementDictionary, and 
11067         use it!
11068
11069         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
11070         (-[WebDefaultUIDelegate 
11071         webView:contextMenuItemsForElement:defaultMenuItems:]): Use new 
11072         WebElementIsContentEditableKey.
11073         * Misc/WebElementDictionary.m:
11074         (+[WebElementDictionary initializeLookupTable]):
11075         (-[WebElementDictionary _isContentEditable]): Call into 
11076         HitTestResult::isContentEditable()
11077         * WebView/WebView.mm: Add new key.
11078         * WebView/WebViewPrivate.h: Add new key.
11079
11080 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
11081
11082         Reviewed by Oliver.
11083
11084         Call into the WebCore editor object directly.
11085         
11086         * MigrateHeaders.make:
11087         * WebCoreSupport/WebEditorClient.h:
11088         * WebCoreSupport/WebEditorClient.mm:
11089         (WebEditorClient::shouldDeleteRange):
11090         (WebEditorClient::shouldShowDeleteInterface):
11091         (WebEditorClient::shouldApplyStyle):
11092         * WebView/WebFrame.mm:
11093         (core):
11094         (kit):
11095         * WebView/WebFrameInternal.h:
11096         * WebView/WebHTMLView.m:
11097         (-[NSArray _applyStyleToSelection:withUndoAction:]):
11098         (-[NSArray _applyParagraphStyleToSelection:withUndoAction:]):
11099         (-[NSArray _toggleBold]):
11100         (-[NSArray _toggleItalic]):
11101         (-[NSArray _changeCSSColorUsingSelector:inRange:]):
11102         (-[NSArray underline:]):
11103         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
11104         * WebView/WebView.mm:
11105         (-[WebView applyStyle:]):
11106
11107 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
11108
11109         Reviewed by Oliver.
11110
11111         <rdar://problem/4825370>
11112         REGRESSION: Selecting "Look Up In Dictionary" from contextual menu fails to open the Dictionary app
11113         
11114         * WebView/WebHTMLView.m:
11115         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
11116         Initialize the framework pointer to 0.
11117         
11118 2006-11-07  Darin Adler  <darin@apple.com>
11119
11120         Reviewed by Geoff.
11121
11122         - udpated for changes to move from Frame/FrameMac to FrameLoader
11123
11124         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
11125         (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
11126         * Misc/WebNSAttributedStringExtras.m:
11127         (+[NSAttributedString _web_attributedStringFromRange:]):
11128         * Plugins/WebBaseNetscapePluginView.mm:
11129         (-[WebBaseNetscapePluginView requestWithURLCString:]):
11130         * Plugins/WebNetscapePluginEmbeddedView.m:
11131         (-[WebNetscapePluginEmbeddedView didStart]):
11132         * Plugins/WebNetscapePluginStream.mm:
11133         * Plugins/WebPluginController.mm:
11134         (-[WebPluginController pluginView:receivedResponse:]):
11135         * WebCoreSupport/WebFrameBridge.mm:
11136         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
11137         * WebCoreSupport/WebFrameLoaderClient.mm:
11138         (WebFrameLoaderClient::provisionalLoadStarted):
11139         * WebView/WebFrame.mm:
11140         (-[WebFrame _canCachePage]):
11141         (+[WebFrame _timeOfLastCompletedLoad]):
11142         (-[WebFrame _loadItem:withLoadType:]):
11143         (-[WebFrame _reloadForPluginChanges]):
11144         (-[WebFrame stopLoading]):
11145
11146 2006-11-07  Anders Carlsson  <acarlsson@apple.com>
11147
11148         Reviewed by Geoff.
11149
11150         Use the WebCore editing enums.
11151         
11152         * WebCoreSupport/WebFrameBridge.mm:
11153         (-[WebFrameBridge undoNameForEditAction:]):
11154         * WebView/WebHTMLView.m:
11155         (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:granularity:]):
11156         (-[WebHTMLView _deleteSelection]):
11157         (-[WebHTMLView moveBackward:]):
11158         (-[WebHTMLView moveBackwardAndModifySelection:]):
11159         (-[WebHTMLView moveDown:]):
11160         (-[WebHTMLView moveDownAndModifySelection:]):
11161         (-[WebHTMLView moveForward:]):
11162         (-[WebHTMLView moveForwardAndModifySelection:]):
11163         (-[WebHTMLView moveLeft:]):
11164         (-[WebHTMLView moveLeftAndModifySelection:]):
11165         (-[WebHTMLView moveRight:]):
11166         (-[WebHTMLView moveRightAndModifySelection:]):
11167         (-[WebHTMLView moveToBeginningOfDocument:]):
11168         (-[WebHTMLView moveToBeginningOfDocumentAndModifySelection:]):
11169         (-[WebHTMLView moveToBeginningOfSentence:]):
11170         (-[WebHTMLView moveToBeginningOfSentenceAndModifySelection:]):
11171         (-[WebHTMLView moveToBeginningOfLine:]):
11172         (-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
11173         (-[WebHTMLView moveToBeginningOfParagraph:]):
11174         (-[WebHTMLView moveToBeginningOfParagraphAndModifySelection:]):
11175         (-[WebHTMLView moveToEndOfDocument:]):
11176         (-[WebHTMLView moveToEndOfDocumentAndModifySelection:]):
11177         (-[WebHTMLView moveToEndOfSentence:]):
11178         (-[WebHTMLView moveToEndOfSentenceAndModifySelection:]):
11179         (-[WebHTMLView moveToEndOfLine:]):
11180         (-[WebHTMLView moveToEndOfLineAndModifySelection:]):
11181         (-[WebHTMLView moveToEndOfParagraph:]):
11182         (-[WebHTMLView moveToEndOfParagraphAndModifySelection:]):
11183         (-[WebHTMLView moveParagraphBackwardAndModifySelection:]):
11184         (-[WebHTMLView moveParagraphForwardAndModifySelection:]):
11185         (-[WebHTMLView moveUp:]):
11186         (-[WebHTMLView moveUpAndModifySelection:]):
11187         (-[WebHTMLView moveWordBackward:]):
11188         (-[WebHTMLView moveWordBackwardAndModifySelection:]):
11189         (-[WebHTMLView moveWordForward:]):
11190         (-[WebHTMLView moveWordForwardAndModifySelection:]):
11191         (-[WebHTMLView moveWordLeft:]):
11192         (-[WebHTMLView moveWordLeftAndModifySelection:]):
11193         (-[WebHTMLView moveWordRight:]):
11194         (-[WebHTMLView moveWordRightAndModifySelection:]):
11195         (-[WebHTMLView pageUp:]):
11196         (-[WebHTMLView pageDown:]):
11197         (-[WebHTMLView pageUpAndModifySelection:]):
11198         (-[WebHTMLView pageDownAndModifySelection:]):
11199         (-[WebHTMLView _expandSelectionToGranularity:]):
11200         (-[WebHTMLView selectParagraph:]):
11201         (-[WebHTMLView selectLine:]):
11202         (-[WebHTMLView selectSentence:]):
11203         (-[WebHTMLView selectWord:]):
11204         (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
11205         (-[WebHTMLView _applyParagraphStyleToSelection:withUndoAction:]):
11206         (-[WebHTMLView _toggleBold]):
11207         (-[WebHTMLView _toggleItalic]):
11208         (-[WebHTMLView pasteFont:]):
11209         (-[WebHTMLView changeFont:]):
11210         (-[WebHTMLView changeAttributes:]):
11211         (-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
11212         (-[WebHTMLView changeColor:]):
11213         (-[WebHTMLView _alignSelectionUsingCSSValue:withUndoAction:]):
11214         (-[WebHTMLView alignCenter:]):
11215         (-[WebHTMLView alignJustified:]):
11216         (-[WebHTMLView alignLeft:]):
11217         (-[WebHTMLView alignRight:]):
11218         (-[WebHTMLView _deleteWithDirection:SelectionController::granularity:killRing:isTypingAction:]):
11219         (-[WebHTMLView deleteForward:]):
11220         (-[WebHTMLView deleteBackward:]):
11221         (-[WebHTMLView deleteWordForward:]):
11222         (-[WebHTMLView deleteWordBackward:]):
11223         (-[WebHTMLView deleteToBeginningOfLine:]):
11224         (-[WebHTMLView deleteToEndOfLine:]):
11225         (-[WebHTMLView deleteToBeginningOfParagraph:]):
11226         (-[WebHTMLView deleteToEndOfParagraph:]):
11227         (-[WebHTMLView subscript:]):
11228         (-[WebHTMLView superscript:]):
11229         (-[WebHTMLView unscript:]):
11230         (-[WebHTMLView underline:]):
11231         (-[WebHTMLView deleteToMark:]):
11232         (-[WebHTMLView toggleBaseWritingDirection:]):
11233         (-[WebHTMLView changeBaseWritingDirection:]):
11234         (-[WebHTMLView _canSmartCopyOrDelete]):
11235         (-[WebTextCompleteController doCompletion]):
11236         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
11237         * WebView/WebView.mm:
11238         (-[WebView setTypingStyle:]):
11239         (-[WebView applyStyle:]):
11240
11241 2006-11-06  Geoffrey Garen  <ggaren@apple.com>
11242
11243         Reviewed by Tim Hatcher.
11244
11245         Removed ScreenClient. It was highly unpopular, risking my midterm re-election.
11246         
11247         None of Screen's responsibilities require up-calls to WebKit or delegates, 
11248         so WebCore can handle it all.
11249
11250         * WebCoreSupport/WebChromeClient.mm:
11251         (WebChromeClient::setWindowRect):
11252         (WebChromeClient::windowRect):
11253         * WebCoreSupport/WebScreenClient.h: Removed.
11254         * WebCoreSupport/WebScreenClient.mm: Removed.
11255         * WebKit.xcodeproj/project.pbxproj:
11256         * WebView/WebView.mm:
11257         (-[WebView _commonInitializationWithFrameName:groupName:]):
11258
11259 2006-11-06  Geoffrey Garen  <ggaren@apple.com>
11260
11261         Reviewed by Darin.
11262         
11263         Accidentally rolled out this change when removing the WebPageBridge. Now
11264         putting it back.
11265
11266         * WebView/WebView.mm:
11267         (-[WebView _commonInitializationWithFrameName:groupName:]):
11268
11269 2006-11-05  Geoffrey Garen  <ggaren@apple.com>
11270
11271         Reviewed by Maciej, Darin, Anders.
11272
11273         Removed the Page bridge. Beefed up Chrome. Added Screen and ScreenClient.
11274         
11275         (WebChromeClient::pageRect): It may seem weird for the page to ask the Chrome/ChromeClient
11276         about its own dimensions. The idea here is that we're asking the Chrome how
11277         much space it has devoted to the page. We have API for this (-webViewContentRect), but 
11278         it was documented incorrectly (even Safari used it wrong), so we don't use 
11279         it anymore. Once we fix our API/documentation, we can return to making a
11280         delegate callback to ask for the page's size.
11281         (WebChromeClient::createWindow): Changed to take a FrameLoadRequest with
11282         an appropriate referrer, instead of making up its own.
11283         (WebChromeClient::createModalDialog): Changed to take a FrameLoadRequest with
11284         an appropriate referrer, instead of broken out parcels.
11285         * WebCoreSupport/WebPageBridge.h: Removed. Dead Code.
11286         * WebCoreSupport/WebPageBridge.mm: Removed. Dead Code.
11287         * WebCoreSupport/WebScreenClient.h: Added.
11288         * WebCoreSupport/WebScreenClient.mm: Added.
11289         * WebView/WebView.mm: Added NULL checks for new _private->page, since
11290         it's not NULL-safe like the bridge was, and it gets cleared before
11291         dealloc.
11292
11293 2006-11-06  Graham Dennis  <graham.dennis@gmail.com>
11294
11295         Reviewed by Tim Hatcher.
11296
11297         Part of patch for http://bugs.webkit.org/show_bug.cgi?id=11323
11298         Link dragging behaviour does not obey WebKitEditableLinkBehavior WebPref
11299
11300         * DefaultDelegates/WebDefaultUIDelegate.m:
11301         (-[NSApplication webView:dragSourceActionMaskForPoint:]): Logic moved to 
11302         WebHTMLView's _mayStartDragAtEventLocation
11303         * Misc/WebElementDictionary.m: added isLiveLink
11304         (+[WebElementDictionary initializeLookupTable]):
11305         (-[WebElementDictionary _isLiveLink]):
11306         * WebView/WebHTMLView.m: 
11307         (-[WebHTMLView _mayStartDragAtEventLocation:]): Editable links should
11308         only be followed if isLiveLink is true
11309         (-[WebHTMLView _isMoveDrag:]): A drag of a live editable link is not
11310         a move
11311         (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]):
11312         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
11313         * WebView/WebView.mm: added WebElementLinkIsLiveKey
11314         * WebView/WebViewPrivate.h: ditto
11315
11316 2006-11-04  Maciej Stachowiak  <mjs@apple.com>
11317
11318         Reviewed by Oliver.
11319         
11320         - removed unneeded (and obsolete) header includes
11321
11322         * WebCoreSupport/WebFrameBridge.mm:
11323         * WebView/WebFrame.mm:
11324
11325 2006-11-05  Darin Adler  <darin@apple.com>
11326
11327         - WebKit part of Frame.h check-in (forgot to land it)
11328
11329         * WebCoreSupport/WebFrameBridge.h:
11330         * WebCoreSupport/WebFrameBridge.mm:
11331         (-[WebFrameBridge textViewWasFirstResponderAtMouseDownTime:]):
11332         (-[WebFrameBridge shouldInterruptJavaScript]):
11333         (-[WebFrameBridge saveDocumentState:]):
11334         (-[WebFrameBridge previousKeyViewOutsideWebFrameViews]):
11335         (-[WebFrameBridge valueForKey:keys:values:]):
11336         (-[WebFrameBridge getObjectCacheSize]):
11337         (-[WebFrameBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
11338         (-[WebFrameBridge mayStartDragAtEventLocation:]):
11339         (-[WebFrameBridge canGoBackOrForward:]):
11340         (-[WebFrameBridge goBackOrForward:]):
11341         (-[WebFrameBridge print]):
11342         (-[WebFrameBridge getAppletInView:]):
11343         (-[WebFrameBridge pollForAppletInView:]):
11344         (-[WebFrameBridge respondToChangedContents]):
11345         (-[WebFrameBridge respondToChangedSelection]):
11346         (-[WebFrameBridge setIsSelected:forView:]):
11347
11348 2006-11-04  Darin Adler  <darin@apple.com>
11349
11350         Reviewed by Maciej.
11351
11352         - converted more of the loader machinery to work with cross-platform
11353           data structures instead of Macintosh-specific ones
11354
11355           store the computed user agent string as a WebCore::String instead
11356           of an NSString to avoid overhead converting it every time we get it
11357
11358         * COM/WebFrame.cpp:
11359         (WebFrame::initWithName):
11360         * ChangeLog:
11361         * Misc/WebElementDictionary.m:
11362         (-[WebElementDictionary _image]):
11363         (-[WebElementDictionary _targetWebFrame]):
11364         * WebCoreSupport/WebFrameLoaderClient.h:
11365         * WebCoreSupport/WebFrameLoaderClient.mm:
11366         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
11367         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
11368         (WebFrameLoaderClient::setTitle):
11369         (WebFrameLoaderClient::userAgent):
11370         (WebFrameLoaderClient::actionDictionary):
11371         * WebCoreSupport/WebPageBridge.mm:
11372         (WebCore::if):
11373         * WebView/WebDataSource.mm:
11374         (-[WebDataSource _URL]):
11375         (-[WebDataSource _URLForHistory]):
11376         (-[WebDataSource unreachableURL]):
11377         * WebView/WebHTMLView.m:
11378         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
11379         * WebView/WebPDFView.mm:
11380         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
11381         (-[WebPDFView _path]):
11382         * WebView/WebView.mm:
11383         (-[WebViewPrivate init]):
11384         (-[WebViewPrivate dealloc]):
11385         (-[WebViewPrivate finalize]):
11386         (-[WebView _preferencesChangedNotification:]):
11387         (-[WebView _cachedResponseForURL:]):
11388         (-[WebView setApplicationNameForUserAgent:]):
11389         (-[WebView setCustomUserAgent:]):
11390         (-[WebView customUserAgent]):
11391         (-[WebView userAgentForURL:]):
11392         (-[WebView _computeUserAgent]):
11393         (-[WebView WebCore::]):
11394         * WebView/WebViewInternal.h:
11395
11396 2006-11-04  Bertrand Guiheneuf <guiheneuf@gmail.com>
11397
11398         Reviewed by Maciej, tweaked and landed by Alexey (using a patch by Don Gibson).
11399
11400         http://bugs.webkit.org/show_bug.cgi?id=11433
11401         Fixes to get WebKit to run on Windows; implemented AffineTransformCairo.
11402
11403         * COM/WebFrame.cpp:
11404         (WebFrame::initWithName):
11405         (WebFrame::loadDataSource):
11406         (WebFrame::receivedRedirect):
11407         (WebFrame::receivedResponse):
11408         (WebFrame::didReceiveData):
11409         (WebFrame::receivedAllData):
11410         Use resource handles now. Do not start doc loader by hand anymore. 
11411         Handle didReceiveData() callback instead of receivedData() which 
11412         is deprecated in implementation of ResourceHandleClient        
11413
11414         * COM/WebFrame.h:
11415         * COM/WebView.cpp:
11416         Applied ResourceLoader --> ResourceHandle renaming
11417
11418         * WebKit.vcproj/WebKit.rc:
11419         Got rid of MFC dependencies (build fix for VCExpress).
11420
11421         * WebKit.vcproj/WebKit.vcproj:
11422         Added platform/graphics platform/network and platform/network/win 
11423         to headers search paths
11424
11425 2006-11-03  Geoffrey Garen  <ggaren@apple.com>
11426
11427         Forgot to add these two files. Oops.
11428
11429         * WebCoreSupport/WebChromeClient.h: Added.
11430         * WebCoreSupport/WebChromeClient.mm: Added.
11431
11432 2006-11-02  Geoffrey Garen  <ggaren@apple.com>
11433
11434         Reviewed by Darin, Beth.
11435
11436         First cut at factoring Page's UIDelegate-related functions into Chrome
11437         and ChromeClient.
11438
11439         Layout tests pass.
11440         
11441         * WebCoreSupport/WebEditorClient.h:
11442         * WebCoreSupport/WebPageBridge.mm:
11443         * WebKit.xcodeproj/project.pbxproj:
11444
11445 2006-11-02  Timothy Hatcher  <timothy@apple.com>
11446
11447         Reviewed by Brady.
11448
11449         Adding outdent to the WebView responder forwarding list.
11450         Also add outdent to WebHTMLView.h and WebViewPrivate.h.
11451
11452         * WebView/WebHTMLView.h:
11453         * WebView/WebViewPrivate.h:
11454         * WebView/WebView.mm:
11455
11456 2006-11-01  John Sullivan  <sullivan@apple.com>
11457
11458         Reviewed by Adam Roben
11459         
11460         - fixed <rdar://problem/4801351> Crash reloading PDF file in new Safari (or closing a window containing a PDF file)
11461
11462         * WebView/WebPDFView.mm:
11463         (-[WebPDFView initWithFrame:]):
11464         Retain the PDFSubview in the code path where we just obtain it by asking the PDFPreviewView for it. We were
11465         unconditionally releasing it in dealloc, but only retaining it in one of the two code paths.
11466
11467 2006-10-31  Mark Rowe  <bdash@webkit.org>
11468
11469         Reviewed by Maciej.
11470
11471         Fix null pointer dereference while running editing/pasteboard/drag-drop-modifies-page.html
11472
11473         * Misc/WebElementDictionary.m:
11474         (-[WebElementDictionary _image]): Add null check.
11475
11476 2006-10-31  Beth Dakin  <bdakin@apple.com>
11477
11478         Reviewed by Maciej.
11479
11480         This creates local functions for the remaining WebElementDictionary 
11481         members that calls into HitTestResult instead of doing magical 
11482         things with the Objective-C DOM classes.
11483
11484         * ChangeLog:
11485         * Misc/WebElementDictionary.m:
11486         (addLookupKey): The values of the dictionary are now just 
11487         selectors. They used to be WebElementMethods which were 
11488         WebElementTargetObjects associated with selectors, but none of that 
11489         is needed any more.
11490         (+[WebElementDictionary initializeLookupTable]): All selectors are 
11491         now local functions, no more WebElementTargetObjects.
11492         (-[WebElementDictionary objectForKey:]): No more target objects!
11493         (-[WebElementDictionary _domNode]): Call into HitTestResult member 
11494         variable.
11495         (-[WebElementDictionary _altDisplayString]): Same.
11496         (-[WebElementDictionary _image]): Same.
11497         (-[WebElementDictionary _absoluteImageURL]): Same.
11498         (-[WebElementDictionary _title]): Same.
11499         (-[WebElementDictionary _absoluteLinkURL]): Same.
11500         (-[WebElementDictionary _targetWebFrame]): Same.
11501         (-[WebElementDictionary _titleDisplayString]): Same.
11502         (-[WebElementDictionary _textContent]): Same.
11503
11504 2006-10-31  Geoffrey Garen  <ggaren@apple.com>
11505
11506         Reviewed by Alice.
11507         
11508         Moved some Editing code from WebKit, the bridge, and WebCore::Frame down 
11509         to WebCore::Editor.
11510
11511         * WebCoreSupport/WebFrameBridge.mm:
11512         * WebView/WebHTMLView.m:
11513         (-[WebHTMLView _shouldDeleteRange:]):
11514         (-[WebHTMLView _canCopy]):
11515         (-[WebHTMLView _canCut]):
11516         (-[WebHTMLView _canDelete]):
11517         (-[WebHTMLView _canPaste]):
11518         (-[WebHTMLView _canEdit]):
11519         (-[WebHTMLView _canEditRichly]):
11520         (-[WebHTMLView _isEditable]):
11521         (-[WebHTMLView _isSelectionInPasswordField]):
11522         (-[NSArray validateUserInterfaceItem:]):
11523         (-[NSArray _expandSelectionToGranularity:]):
11524
11525 2006-10-31  John Sullivan  <sullivan@apple.com>
11526
11527         Reviewed by Beth and Adam
11528         
11529         Display a tooltip when hovering over marked bad grammar.
11530
11531         * Misc/WebElementDictionary.m:
11532         (+[WebElementDictionary initializeLookupTable]):
11533         support spelling tool tip
11534         (-[WebElementDictionary _spellingToolTip]):
11535         new method, calls through to HitTestResult
11536         
11537         * WebView/WebHTMLView.m:
11538         (-[WebHTMLView _updateMouseoverWithEvent:]):
11539         Check for a spelling tool tip; if found, prefer it over the other possible tool tips.
11540         Check for empty strings instead of just nil strings being, since values from 
11541         WebElementDictionary are empty strings.
11542         
11543         * WebView/WebViewPrivate.h:
11544         declare new string constant WebElementSpellingToolTipKey
11545         * WebView/WebView.mm:
11546         define new string constant WebElementSpellingToolTipKey
11547         
11548 2006-10-31  Beth Dakin  <bdakin@apple.com>
11549
11550         Reviewed by Maciej.
11551
11552         Small tweaks to WebKit because of http://bugs.webkit.org/
11553         show_bug.cgi?id=11461 HitTestResult should be split into 
11554         HitTestRequest and HitTestResult
11555
11556         * WebKit.xcodeproj/project.pbxproj:
11557         * WebView/WebHTMLView.m:
11558         (-[WebHTMLView elementAtPoint:allowShadowContent:]): The 
11559         HitTestResult initializer now just takes a point.
11560
11561 2006-10-31  Darin Adler  <darin@apple.com>
11562
11563         Reviewed by Brady.
11564
11565         - got "action dictionary" code out of FrameLoader,
11566           replacing with a class called NavigationAction
11567
11568         * WebCoreSupport/WebFrameLoaderClient.h: Changed parameter types to NavigationAction.
11569         Made elementForEvent non-virtual. Added actionDictionary function.
11570         * WebCoreSupport/WebFrameLoaderClient.mm:
11571         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Changed parameter type,
11572         and used actionDictionary to make the action dictionary.
11573         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
11574         (WebFrameLoaderClient::actionDictionary): Added. Code that was originally in WebCore
11575         that creates the action dictionary (from a NavigationAction).
11576
11577         * WebView/WebFrame.mm: (-[WebFrame _loadItem:withLoadType:]): Use NavigationAction
11578         instead of a dictionary for the action parameters.
11579
11580 2006-10-31  Marvin Decker  <marv.decker@gmail.com>
11581
11582         Reviewed by Maciej.
11583         
11584         - fixed "Stop and reload don't work on the WebView"
11585         http://bugs.webkit.org/show_bug.cgi?id=11285
11586
11587         * COM/WebFrame.cpp:
11588         (WebFrame::stopLoading): Implement.
11589         * COM/WebView.cpp:
11590         (WebView::stopLoading): ditto
11591         (WebView::reload): ditto
11592
11593 2006-10-30  Darin Adler  <darin@apple.com>
11594
11595         * Plugins/WebBaseNetscapePluginView.mm:
11596         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
11597         Fix comment.
11598
11599 2006-10-30  John Sullivan  <sullivan@apple.com>
11600
11601         Reviewed by Geoff Garen
11602
11603         * WebView/WebHTMLView.m:
11604         (-[NSArray checkSpelling:]):
11605         removed code to update spelling panel; WebCore handles that now
11606         (-[NSArray showGuessPanel:]):
11607         ditto
11608
11609 2006-10-30  John Sullivan  <sullivan@apple.com>
11610
11611         * English.lproj/WebViewEditingContextMenu.nib/info.nib:
11612         * English.lproj/WebViewEditingContextMenu.nib/objects.nib:
11613         Another wording change to match framework, post-Tiger:
11614         "Check Spelling" -> "Check Document Now"
11615
11616 2006-10-30  John Sullivan  <sullivan@apple.com>
11617
11618         Reviewed by Geoff Garen.
11619         
11620         Moved spelling-related methods from bridge to EditorClient. Added one not-yet-used
11621         grammar-related method.
11622
11623         * WebCoreSupport/WebEditorClient.h:
11624         declare overrides of isContinuousSpellCheckingEnabled(), spellCheckerDocumentTag(), and new
11625         isGrammarCheckingEnabled()
11626         * WebCoreSupport/WebEditorClient.mm:
11627         (WebEditorClient::isContinuousSpellCheckingEnabled):
11628         implement by calling through to WebView
11629         (WebEditorClient::isGrammarCheckingEnabled):
11630         ditto
11631         (WebEditorClient::spellCheckerDocumentTag):
11632         ditto
11633         
11634         * WebCoreSupport/WebFrameBridge.mm:
11635         removed bridge equivalents of these methods
11636
11637 2006-10-30  Geoffrey Garen  <ggaren@apple.com>
11638
11639         Reviewed by Beth.
11640         
11641         Fixed nil-deref crash that I saw while using TOT (not sure how to repro,
11642         but the debugger confirmed the cause).
11643
11644         * WebView/WebFrame.mm:
11645         (core): Added check for NULL bridge.
11646
11647 2006-10-30  Geoffrey Garen  <ggaren@apple.com>
11648
11649         Reviewed by Darin.
11650
11651         Removed a number of editing and selection methods from the bridge.
11652         
11653         I moved cross-platform editing and selection code into WebCore::Editor and 
11654         WebCore::SelectionController, respecitvely.
11655         
11656         All of the seemingly new code here is just code grabbed from WebCore or
11657         merged from WebCoreFrameBridge.
11658         
11659         I changed one piece of internal API: we now pass around Ranges in places
11660         where we used to pass around broken out components of Ranges.
11661         
11662         I also added WebCore XPATH_SUPPORT AND SVG_SUPPORT #defines to the project.
11663         Since we now include WebCore headers that depend on these #defines, we need
11664         to keep in sync with them, to avoid binary incompatibility.
11665
11666 2006-10-30  Darin Adler  <darin@apple.com>
11667
11668         Reviewed by John Sullivan.
11669
11670         - work toward removing Objective-C data types from FrameLoader.h:
11671           removed NSDate, NSString, WebCorePageState, WebCoreResourceLoader,
11672           and WebCoreResourceHandle
11673         - moved bodyBackgroundColor function here from Frame
11674
11675         * History/WebHistoryItem.m: (+[WebHistoryItem _closeObjectsInPendingPageCaches]):
11676         Updated for change in WebCorePageState.
11677
11678         * WebCoreSupport/WebFrameBridge.mm: Removed saveDocumentToPageCache method.
11679
11680         * WebCoreSupport/WebFrameLoaderClient.h: Changed NSDate to double.
11681         * WebCoreSupport/WebFrameLoaderClient.mm:
11682         (WebFrameLoaderClient::invalidateCurrentItemPageCache): Moved the code that was
11683         formerly in invalidatePageCache: on the bridge here.
11684         (WebFrameLoaderClient::dispatchWillPerformClientRedirect): Added code to make the
11685         NSDate here.
11686         (WebFrameLoaderClient::createPageCache): Restructured code to create the
11687         WebCorePageState object directly instead of calling saveDocumentToPageCache on
11688         the bridge.
11689
11690         * WebView/WebFrame.mm: (-[WebFrame _bodyBackgroundColor]): Rewrote this to work
11691         directly with the DOM and renderers rather than using a function on Frame.
11692
11693 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
11694
11695         Reviewed by Anders.
11696
11697         - added ResourceResponse class and didReceiveResponse delegate call
11698
11699         * WebCoreSupport/WebFrameBridge.mm: Removed no longer needed
11700         expiresTimeForResponse: method.
11701
11702 2006-10-29  Darin Adler  <darin@apple.com>
11703
11704         - update for the WebCore rename
11705
11706         * WebCoreSupport/WebFrameLoaderClient.mm:
11707         * WebView/WebFrame.mm:
11708
11709 2006-10-29  Darin Adler  <darin@apple.com>
11710
11711         - update for the WebCore renames
11712
11713         * Plugins/WebNetscapePluginStream.mm:
11714         * Plugins/WebPluginController.mm:
11715         * WebCoreSupport/WebFrameBridge.mm:
11716         * WebCoreSupport/WebFrameLoaderClient.h:
11717         * WebCoreSupport/WebFrameLoaderClient.mm:
11718         (WebFrameLoaderClient::willUseArchive):
11719         (WebFrameLoaderClient::isArchiveLoadPending):
11720         (WebFrameLoaderClient::cancelPendingArchiveLoad):
11721         (WebFrameLoaderClient::deliverArchivedResources):
11722         * WebCoreSupport/WebPageBridge.mm:
11723         (-[WebPageBridge canRunModalNow]):
11724         * WebView/WebDocumentLoaderMac.h:
11725         * WebView/WebFrame.mm:
11726         * WebView/WebHTMLRepresentation.m:
11727         * WebView/WebView.mm:
11728
11729 2006-10-29  Darin Adler  <darin@apple.com>
11730
11731         Rubber stamped by Adam Roben.
11732
11733         - renamed WebCore's WebFrameLoaderClient to match the class name inside it
11734
11735         * WebCoreSupport/WebFrameBridge.mm: Update include.
11736         * WebCoreSupport/WebFrameLoaderClient.h: Ditto.
11737
11738 2006-10-29  Darin Adler  <darin@apple.com>
11739
11740         Reviewed by Maciej.
11741
11742         - eliminate use of NSArray to carry form data around
11743           (the code in this framework was actually using the NSArray to hold a single
11744            NSData anyway, so I just went back to an NSData for now)
11745
11746         - also fixed http://bugs.webkit.org/show_bug.cgi?id=11444
11747           REGRESSION (r17378): Exception (-[NSCFDictionary setObject:forKey:]:
11748           attempt to insert nil value) when submitting a form with an empty
11749           uninitialized field
11750
11751         * History/WebHistoryItem.m:
11752         (-[WebHistoryItem _setFormInfoFromRequest:]):
11753         (-[WebHistoryItem formData]):
11754         * History/WebHistoryItemPrivate.h:
11755         * WebCoreSupport/WebFrameLoaderClient.mm:
11756         (WebFrameLoaderClient::dispatchWillSubmitForm):
11757         * WebView/WebFrame.mm:
11758         (-[WebFrame _loadItem:withLoadType:]):
11759
11760 2006-10-28  Darin Adler  <darin@apple.com>
11761
11762         Reviewed by Maciej.
11763
11764         - eliminated the use of Objective-C for the policy decider
11765           machinery, obviating the need for WebPolicyDeciderMac
11766
11767         - moved the defersLoading flag from WebView to WebCore::Page
11768
11769         - removed unused copies of four methods that in the frame bridge;
11770           the actually-used copies are in the page bridge
11771
11772         - updated for rename of PassRefPtr::release to releaseRef
11773
11774         * WebView/WebPolicyDeciderMac.h: Removed.
11775         * WebView/WebPolicyDeciderMac.m: Removed.
11776         * WebKit.xcodeproj/project.pbxproj: Updated for removal.
11777
11778         * Plugins/WebBaseNetscapePluginView.mm:
11779         (-[WebBaseNetscapePluginView sendEvent:]):
11780         * Plugins/WebNetscapePluginStream.mm:
11781         * WebCoreSupport/WebFrameBridge.mm:
11782         * WebCoreSupport/WebFrameLoaderClient.h:
11783         * WebCoreSupport/WebFrameLoaderClient.mm:
11784         (getWebView):
11785         (WebFrameLoaderClient::WebFrameLoaderClient):
11786         (WebFrameLoaderClient::willCloseDocument):
11787         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
11788         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
11789         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
11790         (WebFrameLoaderClient::cancelPolicyCheck):
11791         (WebFrameLoaderClient::dispatchWillSubmitForm):
11792         (WebFrameLoaderClient::setDefersLoading):
11793         (WebFrameLoaderClient::setTitle):
11794         (WebFrameLoaderClient::deliverArchivedResourcesAfterDelay):
11795         (WebFrameLoaderClient::deliverArchivedResources):
11796         (WebFrameLoaderClient::setUpPolicyListener):
11797         (WebFrameLoaderClient::receivedPolicyDecison):
11798         (WebFrameLoaderClient::userAgent):
11799         (-[WebFramePolicyListener initWithWebCoreFrame:]):
11800         (-[WebFramePolicyListener invalidate]):
11801         (-[WebFramePolicyListener dealloc]):
11802         (-[WebFramePolicyListener finalize]):
11803         (-[WebFramePolicyListener receivedPolicyDecision:]):
11804         (-[WebFramePolicyListener ignore]):
11805         (-[WebFramePolicyListener download]):
11806         (-[WebFramePolicyListener use]):
11807         (-[WebFramePolicyListener continue]):
11808         * WebCoreSupport/WebPageBridge.mm:
11809         (-[WebPageBridge runModal]):
11810         * WebView/WebArchiver.m:
11811         (+[WebArchiver archiveSelectionInFrame:]):
11812         * WebView/WebFormDelegate.h:
11813         * WebView/WebFormDelegate.m:
11814         (+[WebFormDelegate _sharedWebFormDelegate]):
11815         (-[WebFormDelegate textFieldDidBeginEditing:inFrame:]):
11816         (-[WebFormDelegate textFieldDidEndEditing:inFrame:]):
11817         (-[WebFormDelegate textDidChangeInTextField:inFrame:]):
11818         (-[WebFormDelegate textDidChangeInTextArea:inFrame:]):
11819         (-[WebFormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:]):
11820         * WebView/WebFrame.mm:
11821         (-[WebFrame _loadURL:referrer:intoChild:]):
11822         (-[WebFrame _isFrameSet]):
11823         * WebView/WebFrameInternal.h:
11824         * WebView/WebFrameView.mm:
11825         (-[WebFrameView _shouldDrawBorder]):
11826         * WebView/WebHTMLView.m:
11827         (-[NSArray knowsPageRange:]):
11828         * WebView/WebView.mm:
11829         (-[WebView _formDelegate]):
11830         * WebView/WebViewInternal.h:
11831         * WebView/WebViewPrivate.h:
11832
11833 2006-10-28  Adam Roben  <aroben@apple.com>
11834
11835         Reviewed by Maciej.
11836
11837         Fix layout tests that broke after r17399. Mitz discovered that the
11838         failures were caused by HitTestResult::m_point being uninitialized
11839         much of the time. HitTestResults are now always constructed with a
11840         point.
11841
11842         * WebView/WebHTMLView.m:
11843         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Pass point to
11844         HitTestResult constructor.
11845
11846 2006-10-28  Beth Dakin  <bdakin@apple.com>
11847
11848         Reviewed by Darin.
11849
11850         This is the WebKit half of pushing the guts of elementAtPoint and 
11851         WebElementDictionary into WebCore. Among other things, this patch 
11852         makes WebElementDictionary.m and WebHTMLView.m Objective-C++
11853
11854         * MigrateHeaders.make: Add DOMElementInternal.h to the list of 
11855         headers to migrate.
11856         * Misc/WebElementDictionary.h: Replaced DOMNode, DOMElement, and 
11857         NSPoint member variables with a HitTestResult member variable.
11858         * Misc/WebElementDictionary.m:
11859         (addLookupKey): Formatting.
11860         (-[WebElementDictionary initWithHitTestResult:]): Constructor just 
11861         takes a HitTestResult now and sets the member variable.
11862         (-[WebElementDictionary dealloc]): delete HitTestResult.
11863         (-[WebElementDictionary finalize]): Address HitTestResult.
11864         (-[WebElementDictionary _domNode]): Use HitTestResult and call into 
11865         WebCore.
11866         (-[WebElementDictionary objectForKey:]): Same.
11867         (-[WebElementDictionary _webFrame]): Same.
11868         (-[WebElementDictionary _targetWebFrame]): Same.
11869         (-[WebElementDictionary _title]): Same.
11870         (-[WebElementDictionary _imageRect]): Same.
11871         (-[WebElementDictionary _isSelected]): Same.
11872         * WebKit.xcodeproj/project.pbxproj:
11873         * WebView/WebFrame.mm:
11874         (core): Convert from DOMNode* to Node*
11875         (kit): Convert from Node* to DOMNode*
11876         * WebView/WebFrameInternal.h: Support for the above.
11877         * WebView/WebHTMLView.m:
11878         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Call directly 
11879         into Frame.cpp to get HitTestResult.
11880
11881 2006-10-27  Maciej Stachowiak  <mjs@apple.com>
11882
11883         Reviewed by John & Adam.
11884         
11885         - various performance improvements for resource delegate dispatch.
11886         
11887         - avoid any ObjC messaging when fetching the WebView
11888         - avoid ObjC calls to WebView to get resource load delegate and impl cache
11889         - cache actual method pointers, not just the fact that the method is present
11890         - added a new SPI resource load delegate method which allows clients to get
11891           just one message in case of synchronously loading from memory cache; if this
11892           is implemented you don't get the normal delegate calls in that case.
11893         - various other minor tweaks
11894
11895         * WebCoreSupport/WebFrameBridge.h:
11896         * WebCoreSupport/WebFrameLoaderClient.h:
11897         * WebCoreSupport/WebFrameLoaderClient.mm:
11898         (getWebView):
11899         (WebFrameLoaderClient::hasBackForwardList):
11900         (WebFrameLoaderClient::resetBackForwardList):
11901         (WebFrameLoaderClient::privateBrowsingEnabled):
11902         (WebFrameLoaderClient::updateHistoryForStandardLoad):
11903         (WebFrameLoaderClient::resetAfterLoadError):
11904         (WebFrameLoaderClient::download):
11905         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
11906         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
11907         (WebFrameLoaderClient::dispatchWillSendRequest):
11908         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
11909         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
11910         (WebFrameLoaderClient::dispatchDidReceiveResponse):
11911         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
11912         (WebFrameLoaderClient::dispatchDidFinishLoading):
11913         (WebFrameLoaderClient::dispatchDidFailLoading):
11914         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
11915         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
11916         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
11917         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
11918         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
11919         (WebFrameLoaderClient::dispatchWillClose):
11920         (WebFrameLoaderClient::dispatchDidReceiveIcon):
11921         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
11922         (WebFrameLoaderClient::dispatchDidReceiveTitle):
11923         (WebFrameLoaderClient::dispatchDidCommitLoad):
11924         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
11925         (WebFrameLoaderClient::dispatchDidFailLoad):
11926         (WebFrameLoaderClient::dispatchDidFinishLoad):
11927         (WebFrameLoaderClient::dispatchDidFirstLayout):
11928         (WebFrameLoaderClient::dispatchCreatePage):
11929         (WebFrameLoaderClient::dispatchShow):
11930         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
11931         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
11932         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
11933         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
11934         (WebFrameLoaderClient::dispatchWillSubmitForm):
11935         (WebFrameLoaderClient::dispatchDidLoadMainResource):
11936         (WebFrameLoaderClient::progressStarted):
11937         (WebFrameLoaderClient::progressCompleted):
11938         (WebFrameLoaderClient::incrementProgress):
11939         (WebFrameLoaderClient::completeProgress):
11940         (WebFrameLoaderClient::setMainFrameDocumentReady):
11941         (WebFrameLoaderClient::startDownload):
11942         (WebFrameLoaderClient::willChangeTitle):
11943         (WebFrameLoaderClient::didChangeTitle):
11944         (WebFrameLoaderClient::mainFrameURL):
11945         (WebFrameLoaderClient::frameLoadCompleted):
11946         * WebCoreSupport/WebPageBridge.h:
11947         * WebKit.xcodeproj/project.pbxproj:
11948         * WebView/WebFrame.mm:
11949         (frame):
11950         (core):
11951         (kit):
11952         (getWebView):
11953         (-[WebFrame _addBackForwardItemClippedAtTarget:]):
11954         (-[WebFrame _canCachePage]):
11955         (-[WebFrame _purgePageCache]):
11956         (-[WebFrame _loadItem:withLoadType:]):
11957         (-[WebFrame _goToItem:withLoadType:]):
11958         (-[WebFrame _updateBackground]):
11959         (-[WebFrame _clearSelectionInOtherFrames]):
11960         (-[WebFrame _isMainFrame]):
11961         (-[WebFrame webView]):
11962         * WebView/WebResourceLoadDelegatePrivate.h: Added.
11963         * WebView/WebView.mm:
11964         (-[WebView _cacheResourceLoadDelegateImplementations]):
11965         (WebViewGetResourceLoadDelegate):
11966         (WebViewGetResourceLoadDelegateImplementations):
11967         * WebView/WebViewInternal.h:
11968         * WebView/WebViewPrivate.h:
11969
11970 2006-10-27  Geoffrey Garen  <ggaren@apple.com>
11971
11972         Reviewed by Maciej.
11973         
11974         Moved some WebCoreFrameBridge functions into FrameLoader.
11975
11976         * WebView/WebFrame.mm:
11977         (-[WebFrame _numPendingOrLoadingRequests:]):
11978
11979 2006-10-27  Timothy Hatcher  <timothy@apple.com>
11980
11981         Reviewed by Beth.
11982
11983         Make a DerivedSource/Webkit directory to store migrated
11984         internal headers from WebCore.
11985
11986         * MigrateHeaders.make:
11987         * WebKit.xcodeproj/project.pbxproj:
11988         * WebView/WebFrame.mm: import the new migrated DOM*Internal.h headers
11989
11990 2006-10-27  John Sullivan  <sullivan@apple.com>
11991
11992         Reviewed by Anders
11993         
11994         - fixed http://bugs.webkit.org/show_bug.cgi?id=11439 
11995           REGRESSION: Another page loading crash
11996
11997         * WebView/WebFrame.mm:
11998         (-[WebFrame _createItem:]):
11999         Handle nil documentLoader the way we did before ObjC->C++ changes
12000
12001 2006-10-27  John Sullivan  <sullivan@apple.com>
12002
12003         Reviewed by Anders
12004
12005         * WebView/WebHTMLView.m:
12006         (-[NSArray checkSpelling:]):
12007         call advanceToNextMisspelling directly on FrameMac, bypassing bridge
12008         (-[NSArray showGuessPanel:]):
12009         ditto
12010
12011 2006-10-27  Darin Adler  <darin@apple.com>
12012
12013         - build fix
12014
12015         * WebCoreSupport/WebFrameLoaderClient.mm: Corrected header file name.
12016
12017 2006-10-27  Darin Adler  <darin@apple.com>
12018
12019         Reviewed by Maciej.
12020
12021         - moved methods that are there just to be called by the frame loader client into the client
12022           in an attempt to get back some of the speed we lost yesterday
12023
12024         * DefaultDelegates/WebDefaultResourceLoadDelegate.m:
12025         (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]):
12026         (-[WebDefaultResourceLoadDelegate webView:resource:didCancelAuthenticationChallenge:fromDataSource:]):
12027         * WebCoreSupport/WebFrameLoaderClient.h:
12028         * WebCoreSupport/WebFrameLoaderClient.mm:
12029         (dataSource):
12030         (decisionListener):
12031         (WebFrameLoaderClient::WebFrameLoaderClient):
12032         (WebFrameLoaderClient::hasWebView):
12033         (WebFrameLoaderClient::hasFrameView):
12034         (WebFrameLoaderClient::hasBackForwardList):
12035         (WebFrameLoaderClient::resetBackForwardList):
12036         (WebFrameLoaderClient::provisionalItemIsTarget):
12037         (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
12038         (WebFrameLoaderClient::invalidateCurrentItemPageCache):
12039         (WebFrameLoaderClient::privateBrowsingEnabled):
12040         (WebFrameLoaderClient::makeDocumentView):
12041         (WebFrameLoaderClient::makeRepresentation):
12042         (WebFrameLoaderClient::setDocumentViewFromPageCache):
12043         (WebFrameLoaderClient::forceLayout):
12044         (WebFrameLoaderClient::forceLayoutForNonHTML):
12045         (WebFrameLoaderClient::updateHistoryForCommit):
12046         (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
12047         (WebFrameLoaderClient::updateHistoryForReload):
12048         (WebFrameLoaderClient::updateHistoryForStandardLoad):
12049         (WebFrameLoaderClient::updateHistoryForInternalLoad):
12050         (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
12051         (WebFrameLoaderClient::setCopiesOnScroll):
12052         (WebFrameLoaderClient::tokenForLoadErrorReset):
12053         (WebFrameLoaderClient::resetAfterLoadError):
12054         (WebFrameLoaderClient::doNotResetAfterLoadError):
12055         (WebFrameLoaderClient::detachedFromParent1):
12056         (WebFrameLoaderClient::detachedFromParent2):
12057         (WebFrameLoaderClient::detachedFromParent3):
12058         (WebFrameLoaderClient::detachedFromParent4):
12059         (WebFrameLoaderClient::loadedFromPageCache):
12060         (WebFrameLoaderClient::download):
12061         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
12062         (WebFrameLoaderClient::dispatchWillSendRequest):
12063         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
12064         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
12065         (WebFrameLoaderClient::dispatchDidReceiveResponse):
12066         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
12067         (WebFrameLoaderClient::dispatchDidFinishLoading):
12068         (WebFrameLoaderClient::dispatchDidFailLoading):
12069         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
12070         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
12071         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
12072         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
12073         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
12074         (WebFrameLoaderClient::dispatchWillClose):
12075         (WebFrameLoaderClient::dispatchDidReceiveIcon):
12076         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
12077         (WebFrameLoaderClient::dispatchDidReceiveTitle):
12078         (WebFrameLoaderClient::dispatchDidCommitLoad):
12079         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
12080         (WebFrameLoaderClient::dispatchDidFailLoad):
12081         (WebFrameLoaderClient::dispatchDidFinishLoad):
12082         (WebFrameLoaderClient::dispatchDidFirstLayout):
12083         (WebFrameLoaderClient::dispatchCreatePage):
12084         (WebFrameLoaderClient::dispatchShow):
12085         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
12086         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
12087         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
12088         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
12089         (WebFrameLoaderClient::dispatchWillSubmitForm):
12090         (WebFrameLoaderClient::dispatchDidLoadMainResource):
12091         (WebFrameLoaderClient::clearLoadingFromPageCache):
12092         (WebFrameLoaderClient::isLoadingFromPageCache):
12093         (WebFrameLoaderClient::revertToProvisionalState):
12094         (WebFrameLoaderClient::setMainDocumentError):
12095         (WebFrameLoaderClient::clearUnarchivingState):
12096         (WebFrameLoaderClient::progressStarted):
12097         (WebFrameLoaderClient::progressCompleted):
12098         (WebFrameLoaderClient::incrementProgress):
12099         (WebFrameLoaderClient::completeProgress):
12100         (WebFrameLoaderClient::setMainFrameDocumentReady):
12101         (WebFrameLoaderClient::startDownload):
12102         (WebFrameLoaderClient::willChangeTitle):
12103         (WebFrameLoaderClient::didChangeTitle):
12104         (WebFrameLoaderClient::committedLoad):
12105         (WebFrameLoaderClient::finishedLoading):
12106         (WebFrameLoaderClient::finalSetupForReplace):
12107         (WebFrameLoaderClient::cancelledError):
12108         (WebFrameLoaderClient::cannotShowURLError):
12109         (WebFrameLoaderClient::interruptForPolicyChangeError):
12110         (WebFrameLoaderClient::cannotShowMIMETypeError):
12111         (WebFrameLoaderClient::fileDoesNotExistError):
12112         (WebFrameLoaderClient::shouldFallBack):
12113         (WebFrameLoaderClient::mainFrameURL):
12114         (WebFrameLoaderClient::setDefersCallbacks):
12115         (WebFrameLoaderClient::willUseArchive):
12116         (WebFrameLoaderClient::isArchiveLoadPending):
12117         (WebFrameLoaderClient::cancelPendingArchiveLoad):
12118         (WebFrameLoaderClient::clearArchivedResources):
12119         (WebFrameLoaderClient::canHandleRequest):
12120         (WebFrameLoaderClient::canShowMIMEType):
12121         (WebFrameLoaderClient::representationExistsForURLScheme):
12122         (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
12123         (WebFrameLoaderClient::elementForEvent):
12124         (WebFrameLoaderClient::createPolicyDecider):
12125         (WebFrameLoaderClient::frameLoadCompleted):
12126         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
12127         (WebFrameLoaderClient::provisionalLoadStarted):
12128         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
12129         (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
12130         (WebFrameLoaderClient::didFinishLoad):
12131         (WebFrameLoaderClient::prepareForDataSourceReplacement):
12132         (WebFrameLoaderClient::createDocumentLoader):
12133         (WebFrameLoaderClient::setTitle):
12134         (WebFrameLoaderClient::canUseArchivedResource):
12135         (WebFrameLoaderClient::deliverArchivedResourcesAfterDelay):
12136         (WebFrameLoaderClient::deliverArchivedResources):
12137         (WebFrameLoaderClient::createPageCache):
12138         * WebView/WebFrame.mm:
12139         (-[NSView setWebFrame:]):
12140         (-[WebFrame _createItem:]):
12141         (-[WebFrame _loadItem:withLoadType:]):
12142         (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
12143         (-[WebFrame _loadURL:referrer:intoChild:]):
12144         (-[WebFrame _saveScrollPositionAndViewStateToItem:]):
12145         (-[WebFrame _hasSelection]):
12146         (-[WebFrame _clearSelection]):
12147         (-[WebFrame _setProvisionalItem:]):
12148         (-[WebFrame _setPreviousItem:]):
12149         (-[WebFrame _setCurrentItem:]):
12150         (-[WebFrame loadArchive:]):
12151         * WebView/WebFrameInternal.h:
12152         * WebView/WebHTMLView.m:
12153         (-[WebHTMLView _topHTMLView]):
12154         * WebView/WebHTMLViewPrivate.h:
12155
12156 2006-10-26  Geoffrey Garen  <ggaren@apple.com>
12157
12158         Reviewed by Darin, Maciej.
12159
12160         Removed many uses of NSString * from WebCore.
12161         
12162         Changed a few files to ObjC++ for compatiblity with new WebCore methods
12163         taking WebCore::Strings as arguments.
12164         
12165         Added a static_cast to make the c++ compiler happy.
12166
12167 2006-10-26  John Sullivan  <sullivan@apple.com>
12168
12169         Reviewed by Anders
12170
12171         * WebView/WebFrame.mm:
12172         now includes <WebCore/Document.h> and <WebCore/DocumentMarker.h>
12173         (-[WebFrame _unmarkAllBadGrammar]):
12174         filled in guts
12175         (-[WebFrame _unmarkAllMisspellings]):
12176         rewrote to call Document directly, bypassing bridge
12177
12178 2006-10-26  John Sullivan  <sullivan@apple.com>
12179
12180         * English.lproj/WebViewEditingContextMenu.nib/info.nib:
12181         * English.lproj/WebViewEditingContextMenu.nib/objects.nib:
12182         
12183         Changed "Spelling" to "Spelling and Grammar" in context menu for post-Tiger.
12184
12185 === Safari-521.29 ===
12186
12187 2006-10-26  John Sullivan  <sullivan@apple.com>
12188
12189         No review, just two localized string changes.
12190         
12191         * WebView/WebHTMLView.m:
12192         (-[NSArray validateUserInterfaceItem:]):
12193         changed "Show/Hide Spelling" to "Show/Hide Spelling and Grammar" post-Tiger to match framework change
12194
12195         * English.lproj/Localizable.strings:
12196         updated for these changes
12197
12198 2006-10-25  Darin Adler  <darin@apple.com>
12199
12200         Reviewed by Anders.
12201
12202         - removed 55 methods from WebCoreFrameBridge
12203         - changed callers to use Frame directly instead
12204         - put FrameLoaderTypes.h types into the WebCore namespace
12205         - first steps to get FrameLoader.h ready for cross-platform duty
12206
12207         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
12208         (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
12209         * Plugins/WebBaseNetscapePluginView.mm:
12210         (-[WebBaseNetscapePluginView requestWithURLCString:]):
12211         (-[WebBaseNetscapePluginView loadPluginRequest:]):
12212         (-[WebBaseNetscapePluginView getVariable:value:]):
12213         * Plugins/WebNetscapePluginEmbeddedView.m:
12214         (-[WebNetscapePluginEmbeddedView didStart]):
12215         * Plugins/WebNetscapePluginStream.mm:
12216         * Plugins/WebPluginContainerCheck.m:
12217         (-[WebPluginContainerCheck _continueWithPolicy:]):
12218         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
12219         * WebCoreSupport/WebEditorClient.mm:
12220         (WebEditorClient::shouldDeleteRange):
12221         (WebEditorClient::shouldShowDeleteInterface):
12222         * WebCoreSupport/WebFrameBridge.mm:
12223         (-[WebFrameBridge webView]):
12224         (-[WebFrameBridge finishInitializingWithFrameName:view:]):
12225         (-[WebFrameBridge createWindowWithURL:]):
12226         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
12227         (-[WebFrameBridge windowObjectCleared]):
12228         (-[WebFrameBridge createModalDialogWithURL:]):
12229         * WebCoreSupport/WebFrameLoaderClient.mm:
12230         (WebFrameLoaderClient::dispatchCreatePage):
12231         (WebFrameLoaderClient::dispatchWillSubmitForm):
12232         * WebKit.xcodeproj/project.pbxproj:
12233         * WebView/WebArchiver.m:
12234         (+[WebArchiver archiveSelectionInFrame:]):
12235         * WebView/WebDataSource.mm:
12236         (-[WebDataSource _documentFragmentWithImageResource:]):
12237         (-[WebDataSource _imageElementWithImageResource:]):
12238         * WebView/WebEditingDelegatePrivate.h:
12239         * WebView/WebFrame.mm:
12240         (core):
12241         (kit):
12242         (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):
12243         (-[WebFrame _canCachePage]):
12244         (-[WebFrame _childFramesMatchItem:]):
12245         (-[WebFrame _URLsMatchItem:]):
12246         (-[WebFrame _loadItem:withLoadType:]):
12247         (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
12248         (-[WebFrame _viewWillMoveToHostWindow:]):
12249         (-[WebFrame _viewDidMoveToHostWindow]):
12250         (-[WebFrame _addChild:]):
12251         (-[WebFrame _saveDocumentAndScrollState]):
12252         (-[WebFrame _numPendingOrLoadingRequests:]):
12253         (-[WebFrame _reloadForPluginChanges]):
12254         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
12255         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
12256         (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):
12257         (-[WebFrame _documentViews]):
12258         (-[WebFrame _updateBackground]):
12259         (-[WebFrame _unmarkAllMisspellings]):
12260         (-[WebFrame _hasSelection]):
12261         (-[WebFrame _atMostOneFrameHasSelection]):
12262         (-[WebFrame _findFrameWithSelection]):
12263         (-[WebFrame _frameLoader]):
12264         (-[WebFrame _isDescendantOfFrame:]):
12265         (-[WebFrame _setShouldCreateRenderers:]):
12266         (-[WebFrame _bodyBackgroundColor]):
12267         (-[WebFrame init]):
12268         (-[WebFrame initWithName:webFrameView:webView:]):
12269         (-[WebFrame dealloc]):
12270         (-[WebFrame finalize]):
12271         (-[WebFrame name]):
12272         (-[WebFrame webView]):
12273         (-[WebFrame DOMDocument]):
12274         (-[WebFrame frameElement]):
12275         (-[WebFrame findFrameNamed:]):
12276         (-[WebFrame parentFrame]):
12277         (-[WebFrame childFrames]):
12278         (-[WebFrame _invalidateCurrentItemPageCache]):
12279         (-[WebFrame _dispatchCreateWebViewWithRequest:]):
12280         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
12281         (-[WebFrame _prepareForDataSourceReplacement]):
12282         (-[WebFrame _provisionalLoadStarted]):
12283         * WebView/WebFrameInternal.h:
12284         * WebView/WebHTMLRepresentation.m:
12285         (-[WebHTMLRepresentation DOMDocument]):
12286         (-[WebHTMLRepresentation attributedText]):
12287         * WebView/WebHTMLView.m:
12288         (-[WebHTMLView _documentRange]):
12289         (-[WebHTMLView _documentFragmentWithPaths:]):
12290         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
12291         (-[WebHTMLView _selectedRange]):
12292         (-[WebHTMLView _updateMouseoverWithEvent:]):
12293         (-[WebHTMLView _canEditRichly]):
12294         (-[WebHTMLView _hasSelection]):
12295         (-[WebHTMLView _hasSelectionOrInsertionPoint]):
12296         (-[WebHTMLView _hasInsertionPoint]):
12297         (-[WebHTMLView _isEditable]):
12298         (-[WebHTMLView _isSelectionInPasswordField]):
12299         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
12300         (-[WebHTMLView _selectionDraggingImage]):
12301         (-[WebHTMLView _canIncreaseSelectionListLevel]):
12302         (-[WebHTMLView _canDecreaseSelectionListLevel]):
12303         (-[WebHTMLView _updateActiveState]):
12304         (-[NSArray readSelectionFromPasteboard:]):
12305         (-[NSArray validateUserInterfaceItem:]):
12306         (-[NSArray maintainsInactiveSelection]):
12307         (-[NSArray menuForEvent:]):
12308         (-[NSArray scrollWheel:]):
12309         (-[NSArray acceptsFirstMouse:]):
12310         (-[NSArray shouldDelayWindowOrderingForEvent:]):
12311         (-[NSArray mouseDown:]):
12312         (-[NSArray mouseDragged:]):
12313         (-[NSArray mouseUp:]):
12314         (-[NSArray keyDown:]):
12315         (-[NSArray keyUp:]):
12316         (-[NSArray centerSelectionInVisibleArea:]):
12317         (-[NSArray _selectionStartFontAttributesAsRTF]):
12318         (-[NSArray _emptyStyle]):
12319         (-[NSArray performKeyEquivalent:]):
12320         (-[NSArray indent:]):
12321         (-[NSArray outdent:]):
12322         (-[WebHTMLView cut:]):
12323         (-[WebHTMLView paste:]):
12324         (-[WebHTMLView _selectRangeInMarkedText:]):
12325         (-[WebTextCompleteController doCompletion]):
12326         (-[WebHTMLView selectionRect]):
12327         (-[WebHTMLView selectionImageForcingWhiteText:]):
12328         (-[WebHTMLView selectionImageRect]):
12329         (-[WebHTMLView attributedString]):
12330         (-[WebHTMLView _isMoveDrag]):
12331         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
12332         * WebView/WebPolicyDelegate.mm:
12333         (-[WebPolicyDecisionListener _usePolicy:]):
12334         (-[WebPolicyDecisionListener use]):
12335         (-[WebPolicyDecisionListener ignore]):
12336         (-[WebPolicyDecisionListener download]):
12337         (-[WebPolicyDecisionListener continue]):
12338         * WebView/WebScriptDebugDelegate.m:
12339         (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
12340         (-[WebScriptCallFrame globalObject]):
12341         * WebView/WebView.mm:
12342         (-[WebView _attachScriptDebuggerToAllFrames]):
12343         (-[WebView _detachScriptDebuggerFromAllFrames]):
12344         (-[WebView windowScriptObject]):
12345         (incrementFrame):
12346         (-[WebView searchFor:direction:caseSensitive:wrap:]):
12347         (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
12348         (-[WebView removeDragCaret]):
12349         (-[WebView setScriptDebugDelegate:]):
12350         (-[WebView scriptDebugDelegate]):
12351         (-[WebView shouldClose]):
12352         (-[WebView selectedDOMRange]):
12353         (-[WebView styleDeclarationWithText:]):
12354
12355 2006-10-25  Geoffrey Garen  <ggaren@apple.com>
12356
12357         Reviewed by Adam.
12358
12359         Renamed WebFrameLoader to FrameLoader, to match class name.
12360
12361         * Plugins/WebBaseNetscapePluginView.mm:
12362         * Plugins/WebNetscapePluginStream.mm:
12363         * Plugins/WebPluginController.mm:
12364         * WebCoreSupport/WebFrameBridge.mm:
12365         * WebView/WebDataSource.mm:
12366         * WebView/WebFrame.mm:
12367         * WebView/WebPDFView.mm:
12368         * WebView/WebPolicyDelegate.mm:
12369         * WebView/WebView.mm:
12370
12371 2006-10-25  Mark Rowe  <bdash@webkit.org>
12372
12373         Reviewed by Anders.
12374
12375         Build fix for the Buildbot.
12376
12377         * WebView/WebHTMLView.m:
12378         (-[NSArray _addToStyle:fontA:fontB:]): Explicit cast.
12379
12380 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
12381
12382         Reviewed by Anders.
12383         
12384         <rdar://problem/4785575> REGRESSION: form resubmission warning occurs twice, then Safari crashes in autorelease pool
12385         <rdar://problem/4799383> REGRESSION: Crash occurs when dismissing the "Would you like to save this password" sheet
12386
12387         * WebView/WebPolicyDeciderMac.m:
12388         (-[WebPolicyDeciderMac dealloc]): release the listener, don't dealloc it
12389
12390 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
12391
12392         Reviewed by Darin.
12393
12394         * WebKitPrefix.h:
12395         Include FastMalloc.h from C++ code.
12396
12397 2006-10-24  Darin Adler  <darin@apple.com>
12398
12399         Reviewed by Anders.
12400
12401         - converted WebFrameLoaderClient to C++
12402         - renamed frame->frameLoader() function to frame->loader()
12403         - renamed [bridge impl] to [bridge _frame]
12404         - removed some bridge methods
12405
12406         * Plugins/WebNetscapePluginStream.mm:
12407         * WebCoreSupport/WebEditorClient.mm:
12408         * WebCoreSupport/WebFrameLoaderClient.h: Added.
12409         (WebFrameLoaderClient::webFrame):
12410         * WebCoreSupport/WebFrameLoaderClient.mm: Added.
12411         (WebFrameLoaderClient::detachFrameLoader):
12412         (WebFrameLoaderClient::hasWebView):
12413         (WebFrameLoaderClient::hasFrameView):
12414         (WebFrameLoaderClient::hasBackForwardList):
12415         (WebFrameLoaderClient::resetBackForwardList):
12416         (WebFrameLoaderClient::provisionalItemIsTarget):
12417         (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
12418         (WebFrameLoaderClient::invalidateCurrentItemPageCache):
12419         (WebFrameLoaderClient::privateBrowsingEnabled):
12420         (WebFrameLoaderClient::makeDocumentView):
12421         (WebFrameLoaderClient::makeRepresentation):
12422         (WebFrameLoaderClient::setDocumentViewFromPageCache):
12423         (WebFrameLoaderClient::forceLayout):
12424         (WebFrameLoaderClient::forceLayoutForNonHTML):
12425         (WebFrameLoaderClient::updateHistoryForCommit):
12426         (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
12427         (WebFrameLoaderClient::updateHistoryForReload):
12428         (WebFrameLoaderClient::updateHistoryForStandardLoad):
12429         (WebFrameLoaderClient::updateHistoryForInternalLoad):
12430         (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
12431         (WebFrameLoaderClient::setCopiesOnScroll):
12432         (WebFrameLoaderClient::tokenForLoadErrorReset):
12433         (WebFrameLoaderClient::resetAfterLoadError):
12434         (WebFrameLoaderClient::doNotResetAfterLoadError):
12435         (WebFrameLoaderClient::detachedFromParent1):
12436         (WebFrameLoaderClient::detachedFromParent2):
12437         (WebFrameLoaderClient::detachedFromParent3):
12438         (WebFrameLoaderClient::detachedFromParent4):
12439         (WebFrameLoaderClient::loadedFromPageCache):
12440         (WebFrameLoaderClient::download):
12441         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
12442         (WebFrameLoaderClient::dispatchWillSendRequest):
12443         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
12444         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
12445         (WebFrameLoaderClient::dispatchDidReceiveResponse):
12446         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
12447         (WebFrameLoaderClient::dispatchDidFinishLoading):
12448         (WebFrameLoaderClient::dispatchDidFailLoading):
12449         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
12450         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
12451         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
12452         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
12453         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
12454         (WebFrameLoaderClient::dispatchWillClose):
12455         (WebFrameLoaderClient::dispatchDidReceiveIcon):
12456         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
12457         (WebFrameLoaderClient::dispatchDidReceiveTitle):
12458         (WebFrameLoaderClient::dispatchDidCommitLoad):
12459         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
12460         (WebFrameLoaderClient::dispatchDidFailLoad):
12461         (WebFrameLoaderClient::dispatchDidFinishLoad):
12462         (WebFrameLoaderClient::dispatchDidFirstLayout):
12463         (WebFrameLoaderClient::dispatchCreatePage):
12464         (WebFrameLoaderClient::dispatchShow):
12465         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
12466         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
12467         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
12468         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
12469         (WebFrameLoaderClient::dispatchWillSubmitForm):
12470         (WebFrameLoaderClient::dispatchDidLoadMainResource):
12471         (WebFrameLoaderClient::clearLoadingFromPageCache):
12472         (WebFrameLoaderClient::isLoadingFromPageCache):
12473         (WebFrameLoaderClient::revertToProvisionalState):
12474         (WebFrameLoaderClient::setMainDocumentError):
12475         (WebFrameLoaderClient::clearUnarchivingState):
12476         (WebFrameLoaderClient::progressStarted):
12477         (WebFrameLoaderClient::progressCompleted):
12478         (WebFrameLoaderClient::incrementProgress):
12479         (WebFrameLoaderClient::completeProgress):
12480         (WebFrameLoaderClient::setMainFrameDocumentReady):
12481         (WebFrameLoaderClient::startDownload):
12482         (WebFrameLoaderClient::willChangeTitle):
12483         (WebFrameLoaderClient::didChangeTitle):
12484         (WebFrameLoaderClient::committedLoad):
12485         (WebFrameLoaderClient::finishedLoading):
12486         (WebFrameLoaderClient::finalSetupForReplace):
12487         (WebFrameLoaderClient::cancelledError):
12488         (WebFrameLoaderClient::cannotShowURLError):
12489         (WebFrameLoaderClient::interruptForPolicyChangeError):
12490         (WebFrameLoaderClient::cannotShowMIMETypeError):
12491         (WebFrameLoaderClient::fileDoesNotExistError):
12492         (WebFrameLoaderClient::shouldFallBack):
12493         (WebFrameLoaderClient::mainFrameURL):
12494         (WebFrameLoaderClient::setDefersCallbacks):
12495         (WebFrameLoaderClient::willUseArchive):
12496         (WebFrameLoaderClient::isArchiveLoadPending):
12497         (WebFrameLoaderClient::cancelPendingArchiveLoad):
12498         (WebFrameLoaderClient::clearArchivedResources):
12499         (WebFrameLoaderClient::canHandleRequest):
12500         (WebFrameLoaderClient::canShowMIMEType):
12501         (WebFrameLoaderClient::representationExistsForURLScheme):
12502         (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
12503         (WebFrameLoaderClient::elementForEvent):
12504         (WebFrameLoaderClient::createPolicyDecider):
12505         (WebFrameLoaderClient::frameLoadCompleted):
12506         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
12507         (WebFrameLoaderClient::provisionalLoadStarted):
12508         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
12509         (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
12510         (WebFrameLoaderClient::didFinishLoad):
12511         (WebFrameLoaderClient::prepareForDataSourceReplacement):
12512         (WebFrameLoaderClient::createDocumentLoader):
12513         (WebFrameLoaderClient::setTitle):
12514         * WebKit.xcodeproj/project.pbxproj:
12515         * WebView/WebDataSource.mm:
12516         (-[WebDataSource webFrame]):
12517         * WebView/WebFrame.mm:
12518         (frame):
12519         (-[WebFrame _loadItem:withLoadType:]):
12520         (-[WebFrame _reloadForPluginChanges]):
12521         (-[WebFrame _initWithWebFrameView:webView:bridge:]):
12522         (-[WebFrame _frameLoader]):
12523         (-[WebFrame provisionalDataSource]):
12524         (-[WebFrame dataSource]):
12525         (-[WebFrame parentFrame]):
12526         (-[WebFrame _provisionalLoadStarted]):
12527         * WebView/WebFrameInternal.h:
12528         * WebView/WebHTMLRepresentation.m:
12529         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
12530         * WebView/WebHTMLView.m:
12531         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
12532         (-[NSArray validateUserInterfaceItem:]):
12533         (-[NSArray scrollWheel:]):
12534         (-[NSArray acceptsFirstMouse:]):
12535         (-[NSArray shouldDelayWindowOrderingForEvent:]):
12536         (-[NSArray _selectionStartFontAttributesAsRTF]):
12537         (-[NSArray changeBaseWritingDirection:]):
12538         (-[NSArray indent:]):
12539         (-[NSArray outdent:]):
12540         (-[WebHTMLView copy:]):
12541         (-[WebHTMLView cut:]):
12542         (-[WebHTMLView paste:]):
12543         * WebView/WebView.mm:
12544         (-[WebView _dashboardRegions]):
12545         (-[WebView setProhibitsMainFrameScrolling:]):
12546         (-[WebView _setInViewSourceMode:]):
12547         (-[WebView _inViewSourceMode]):
12548         (-[WebView setEditable:]):
12549
12550 2006-10-24  John Sullivan  <sullivan@apple.com>
12551
12552         Reviewed by Kevin Decker
12553         
12554         - fixed <rdar://problem/4801331> "Spelling..." menu item should be "Show/Hide Spelling" post-Tiger, to match AppKit
12555
12556         * WebView/WebHTMLView.m:
12557         (-[NSArray validateUserInterfaceItem:]):
12558         post-Tiger, update the menu item text to "Show Spelling"/"Hide Spelling" based on whether
12559         the spelling panel is already showing. Also, removed else's after returns, and removed
12560         braces around one-line if clauses.
12561         (-[NSArray showGuessPanel:]):
12562         post-Tiger, make this item hide the spelling panel if it's already showing
12563
12564         * English.lproj/Localizable.strings:
12565         updated for this change
12566         
12567 2006-10-24  Timothy Hatcher  <timothy@apple.com>
12568
12569         Reviewed by Anders.
12570
12571         <rdar://problem/4588878> 'WebHTMLView' may not respond to '-_webView'
12572
12573         * Misc/WebNSViewExtras.h:
12574         * Misc/WebNSViewExtras.m:
12575         (-[NSView _webView]):
12576
12577 2006-10-24  Brady Eidson  <beidson@apple.com>
12578
12579         Reviewed by Anders
12580
12581         http://bugs.webkit.org/show_bug.cgi?id=11406 - Crash in [WebFrame dataSource]
12582         In the transition to ObjC++ we lost alot of our free nil checking that we must now do manually
12583         to prevent null dereferencing.
12584
12585         * WebView/WebFrame.mm:
12586         (-[WebFrame provisionalDataSource]):
12587         (-[WebFrame dataSource]):
12588
12589 2006-10-24  John Sullivan  <sullivan@apple.com>
12590
12591         Reviewed by Darin
12592         
12593         Initial plumbing for grammar checking. No actual grammar are checked at this time.
12594
12595         * English.lproj/WebViewEditingContextMenu.nib/classes.nib:
12596         * English.lproj/WebViewEditingContextMenu.nib/info.nib:
12597         * English.lproj/WebViewEditingContextMenu.nib/objects.nib:
12598         Added grammar-checking item, reworded to match changes in framework. This will be used
12599         post-Tiger.
12600
12601         * English.lproj/WebViewEditingContextMenuOld.nib/classes.nib: Added.
12602         * English.lproj/WebViewEditingContextMenuOld.nib/info.nib: Added.
12603         * English.lproj/WebViewEditingContextMenuOld.nib/objects.nib: Added.
12604         Copy of WebViewEditingContextMenu.nib, unchanged. This will be used on Tiger.
12605
12606         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
12607         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
12608         Choose the right context menu based on BUILDING_ON_TIGER.
12609         
12610         * WebView/WebPreferenceKeysPrivate.h:
12611         declare grammar-related NSUserDefault value
12612
12613         * WebView/WebViewPrivate.h:
12614         declare grammar-related methods
12615
12616         * WebView/WebView.mm:
12617         declare static BOOL grammarCheckingEnabled
12618         (-[WebViewPrivate init]):
12619         initialize grammarCheckingEnabled to NSUserDefaults value
12620         (-[WebView validateUserInterfaceItem:]):
12621         validate toggleGrammarChecking: menu item
12622         (-[WebView isGrammarCheckingEnabled]):
12623         return value of grammarCheckingEnabled
12624         (-[WebView setGrammarCheckingEnabled:]):
12625         set value of grammarCheckingEnabled, call frame to remove existing bad grammar markers
12626         (-[WebView toggleGrammarChecking:]):
12627         flip the value
12628         
12629         * WebView/WebFrameInternal.h:
12630         * WebView/WebFrame.mm:
12631         (-[WebFrame _unmarkAllBadGrammar]):
12632         new placeholder method, does nothing yet
12633         
12634         * WebView/WebHTMLViewInternal.h:
12635         declare grammar-related methods
12636
12637         * WebView/WebHTMLView.m:
12638         (-[NSArray validateUserInterfaceItem:]):
12639         validate toggleGrammarChecking: menu item
12640         (-[WebHTMLView isGrammarCheckingEnabled]):
12641         new method, calls through to WebView
12642         (-[WebHTMLView setGrammarCheckingEnabled:]):
12643         ditto
12644         (-[WebHTMLView toggleGrammarChecking:]):
12645         ditto
12646                 
12647         * English.lproj/StringsNotToBeLocalized.txt:
12648         Updated for these changes
12649         
12650         * WebKit.xcodeproj/project.pbxproj:
12651         updated for new files        
12652
12653 2006-10-23  Darin Adler  <darin@apple.com>
12654
12655         Reviewed by Geoff.
12656
12657         - converted WebDocumentLoader to C++
12658
12659         * Plugins/WebPluginController.mm:
12660         (-[WebPluginController pluginView:receivedResponse:]):
12661         * WebKit.xcodeproj/project.pbxproj:
12662         * WebView/WebDataSource.mm:
12663         (-[WebDataSourcePrivate dealloc]):
12664         (-[WebDataSource _mainDocumentError]):
12665         (-[WebDataSource _URL]):
12666         (-[WebDataSource _loadFromPageCache:]):
12667         (-[WebDataSource _bridge]):
12668         (-[WebDataSource _URLForHistory]):
12669         (-[WebDataSource _documentLoader]):
12670         (-[WebDataSource _initWithDocumentLoader:]):
12671         (-[WebDataSource initWithRequest:]):
12672         (-[WebDataSource data]):
12673         (-[WebDataSource webFrame]):
12674         (-[WebDataSource initialRequest]):
12675         (-[WebDataSource request]):
12676         (-[WebDataSource response]):
12677         (-[WebDataSource textEncodingName]):
12678         (-[WebDataSource isLoading]):
12679         (-[WebDataSource unreachableURL]):
12680         (-[WebDataSource webArchive]):
12681         * WebView/WebDataSourceInternal.h:
12682         * WebView/WebDocumentLoaderMac.h:
12683         * WebView/WebDocumentLoaderMac.mm:
12684         (WebDocumentLoaderMac::WebDocumentLoaderMac):
12685         (WebDocumentLoaderMac::setDataSource):
12686         (WebDocumentLoaderMac::dataSource):
12687         (WebDocumentLoaderMac::attachToFrame):
12688         (WebDocumentLoaderMac::detachFromFrame):
12689         * WebView/WebFrame.mm:
12690         (-[WebFrame _createItem:]):
12691         (-[WebFrame _loadItem:withLoadType:]):
12692         (-[WebFrame _addChild:]):
12693         (dataSource):
12694         (-[WebFrame _dataSourceForDocumentLoader:]):
12695         (-[WebFrame _addDocumentLoader:toUnarchiveState:]):
12696         (-[WebFrame loadArchive:]):
12697         (-[WebFrame _updateHistoryForReload]):
12698         (-[WebFrame _updateHistoryForStandardLoad]):
12699         (-[WebFrame _updateHistoryForInternalLoad]):
12700         (-[WebFrame _dispatchIdentifierForInitialRequest:fromDocumentLoader:]):
12701         (-[WebFrame _dispatchResource:willSendRequest:redirectResponse:fromDocumentLoader:]):
12702         (-[WebFrame _dispatchDidReceiveAuthenticationChallenge:forResource:fromDocumentLoader:]):
12703         (-[WebFrame _dispatchDidCancelAuthenticationChallenge:forResource:fromDocumentLoader:]):
12704         (-[WebFrame _dispatchResource:didReceiveResponse:fromDocumentLoader:]):
12705         (-[WebFrame _dispatchResource:didReceiveContentLength:fromDocumentLoader:]):
12706         (-[WebFrame _dispatchResource:didFinishLoadingFromDocumentLoader:]):
12707         (-[WebFrame _dispatchResource:didFailLoadingWithError:fromDocumentLoader:]):
12708         (-[WebFrame _dispatchDidLoadMainResourceForDocumentLoader:]):
12709         (-[WebFrame _clearLoadingFromPageCacheForDocumentLoader:]):
12710         (-[WebFrame _isDocumentLoaderLoadingFromPageCache:]):
12711         (-[WebFrame _makeRepresentationForDocumentLoader:]):
12712         (-[WebFrame _revertToProvisionalStateForDocumentLoader:]):
12713         (-[WebFrame _setMainDocumentError:forDocumentLoader:]):
12714         (-[WebFrame _clearUnarchivingStateForLoader:]):
12715         (-[WebFrame _willChangeTitleForDocument:]):
12716         (-[WebFrame _didChangeTitleForDocument:]):
12717         (-[WebFrame _finishedLoadingDocument:]):
12718         (-[WebFrame _committedLoadWithDocumentLoader:data:]):
12719         (-[WebFrame _documentLoader:setMainDocumentError:]):
12720         (-[WebFrame _finalSetupForReplaceWithDocumentLoader:]):
12721         (-[WebFrame _createDocumentLoaderWithRequest:]):
12722         (-[WebFrame _provisionalLoadStarted]):
12723         * WebView/WebFrameInternal.h:
12724         * WebView/WebHTMLRepresentation.m:
12725         (-[WebHTMLRepresentation title]):
12726         * WebView/WebView.mm:
12727         (-[WebView _mainFrameOverrideEncoding]):
12728
12729 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
12730
12731         RS by Maciej.
12732         
12733         Gave ObjC++ files .mm extension instead of .m.
12734
12735         * WebCoreSupport/WebPageBridge.m: Removed.
12736         * WebKit.xcodeproj/project.pbxproj:
12737         * WebView/WebDocumentLoaderMac.m: Removed.
12738
12739 2006-10-23  Darin Adler  <darin@apple.com>
12740
12741         Reviewed by Maciej.
12742
12743         - converted WebFrameLoader to C++
12744
12745         * History/WebHistoryItem.m:
12746         (+[WebHistoryItem _closeObjectsInPendingPageCaches]):
12747         * Plugins/WebBaseNetscapePluginView.mm:
12748         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
12749         * Plugins/WebNetscapePluginStream.mm:
12750         (-[WebNetscapePluginStream start]):
12751         (-[WebNetscapePluginStream stop]):
12752         * Plugins/WebPluginController.mm:
12753         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
12754         (-[WebPluginController pluginView:receivedResponse:]):
12755         * WebCoreSupport/WebFrameBridge.h:
12756         * WebKit.xcodeproj/project.pbxproj:
12757         * WebView/WebDataSource.mm:
12758         (-[WebDataSource _loadFromPageCache:]):
12759         (-[WebDataSource _webView]):
12760         (-[WebDataSource webFrame]):
12761         * WebView/WebDocumentLoaderMac.h:
12762         * WebView/WebDocumentLoaderMac.m:
12763         (-[WebDocumentLoaderMac dealloc]):
12764         (-[WebDocumentLoaderMac attachToFrame]):
12765         (-[WebDocumentLoaderMac detachFromFrame]):
12766         * WebView/WebFrame.mm:
12767         (+[WebFrame _timeOfLastCompletedLoad]):
12768         (-[WebFrame _loadItem:withLoadType:]):
12769         (-[WebFrame _loadURL:referrer:intoChild:]):
12770         (-[WebFrame _currentBackForwardListItemToResetTo]):
12771         (-[WebFrame _itemForRestoringDocState]):
12772         (-[WebFrame _frameLoader]):
12773         (-[WebFrame _firstLayoutDone]):
12774         (-[WebFrame _loadType]):
12775         (-[WebFrame provisionalDataSource]):
12776         (-[WebFrame dataSource]):
12777         (-[WebFrame loadRequest:]):
12778         (-[WebFrame loadArchive:]):
12779         (-[WebFrame stopLoading]):
12780         (-[WebFrame reload]):
12781         (-[WebFrame _updateHistoryForCommit]):
12782         (-[WebFrame _updateHistoryForReload]):
12783         (-[WebFrame _updateHistoryForInternalLoad]):
12784         (-[WebFrame _deliverArchivedResourcesAfterDelay]):
12785         (-[WebFrame _willUseArchiveForRequest:originalURL:loader:]):
12786         (-[WebFrame _deliverArchivedResources]):
12787         (-[WebFrame _prepareForDataSourceReplacement]):
12788         (-[WebFrame _provisionalLoadStarted]):
12789         * WebView/WebFrameInternal.h:
12790         * WebView/WebHTMLView.m:
12791         (-[WebHTMLView _clearLastHitViewIfSelf]):
12792         (-[WebHTMLView _updateMouseoverWithEvent:]):
12793         (-[NSArray removeMouseMovedObserverUnconditionally]):
12794         (-[NSArray removeMouseMovedObserver]):
12795         (-[NSArray viewWillMoveToWindow:]):
12796         (-[NSArray viewDidMoveToWindow]):
12797         (-[WebHTMLView _canMakeTextSmaller]):
12798         (-[WebHTMLView _canMakeTextLarger]):
12799         (-[WebHTMLView _canMakeTextStandardSize]):
12800         * WebView/WebPDFView.mm:
12801         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
12802         * WebView/WebView.mm:
12803         (-[WebView _close]):
12804         (-[WebView setDefersCallbacks:]):
12805         (-[WebView setCustomTextEncodingName:]):
12806
12807 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
12808
12809         Reviewed by Bradee.
12810
12811         Moved some page-level operations from WebFrameBridge to WebPageBridge.
12812
12813         * WebCoreSupport/WebFrameBridge.m:
12814         * WebCoreSupport/WebPageBridge.m:
12815         (-[WebPageBridge createModalDialogWithURL:referrer:]):
12816         (-[WebPageBridge canRunModal]):
12817         (-[WebPageBridge canRunModalNow]):
12818         (-[WebPageBridge runModal]):
12819         * WebKit.xcodeproj/project.pbxproj: Made WebPageBridge.m ObjC++ to support
12820         WebCore #includes.
12821
12822 2006-10-23  John Sullivan  <sullivan@apple.com>
12823
12824         * WebKitPrefix.h:
12825         Removed redundant definition of BUILDING_ON_TIGER that I just added. It turns out this had
12826         already been added between the last time I updated in this tree and when I needed it locally.
12827
12828 2006-10-23  John Sullivan  <sullivan@apple.com>
12829
12830         Reviewed by Anders
12831
12832         * WebKit.xcodeproj/project.pbxproj:
12833         Move WebKitPrefix.h from Misc group to top level, to match WebCore
12834         
12835         * WebKitPrefix.h:
12836         defined BUILDING_ON_TIGER a la WebCore, in preparation for future use of post-Tiger API
12837
12838 2006-10-23  Timothy Hatcher  <timothy@apple.com>
12839
12840         Reviewed by Darin.
12841
12842         Rename the now ObjC++ files to be .mm and remove the explicit file types.
12843
12844         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
12845         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
12846         * English.lproj/StringsNotToBeLocalized.txt:
12847         * Plugins/WebBaseNetscapePluginView.m: Removed.
12848         * Plugins/WebNetscapePluginStream.m: Removed.
12849         * Plugins/WebPluginController.m: Removed.
12850         * WebCoreSupport/WebFrameBridge.m: Removed.
12851         * WebKit.xcodeproj/project.pbxproj:
12852         * WebView/WebDataSource.m: Removed.
12853         * WebView/WebFrame.m: Removed.
12854         * WebView/WebFrameView.m: Removed.
12855         * WebView/WebPDFView.m: Removed.
12856         * WebView/WebPolicyDelegate.m: Removed.
12857         * WebView/WebView.m: Removed.
12858
12859 2006-10-23  Timothy Hatcher  <timothy@apple.com>
12860
12861         Reviewed by Darin.
12862
12863         Move the undef try/catch to WebKitPrefix.h and include algorithm so we get
12864         exception_defines.h and so the undef of try/catch works.
12865
12866         Break off the BGRA to ARGB code into WebGraphicsExtras.c, this lets
12867         WebBaseNetscapePluginView.m safely compile as ObjC++ and not cause the Accelerate
12868         framework to complain about C++ exceptions being disabled.
12869
12870         * Misc/WebGraphicsExtras.c: Added.
12871         (WebConvertBGRAToARGB):
12872         * Misc/WebGraphicsExtras.h: Added.
12873         * Plugins/WebBaseNetscapePluginView.m:
12874         (-[WebBaseNetscapePluginView _aglOffscreenImageForDrawingInRect:]):
12875         * WebKit.xcodeproj/project.pbxproj:
12876         * WebKitPrefix.h:
12877         * WebView/WebView.m:
12878
12879 2006-10-22  Sam Weinig  <sam.weinig@gmail.com>
12880
12881         Reviewed by Tim H.
12882
12883         - Add DOMHTMLFormElementPrivate.h to the project.
12884
12885         * MigrateHeaders.make:
12886
12887 2006-10-21  Darin Adler  <darin@apple.com>
12888
12889         Reviewed by Adele.
12890
12891         - convert WebLoader and its 3 subclasses to C++
12892
12893         * Plugins/WebNetscapePluginStream.h:
12894         * Plugins/WebNetscapePluginStream.m:
12895         (-[WebNetscapePluginStream dealloc]):
12896         (-[WebNetscapePluginStream finalize]):
12897         (-[WebNetscapePluginStream start]):
12898         (-[WebNetscapePluginStream cancelLoadWithError:]):
12899         (-[WebNetscapePluginStream stop]):
12900         * WebCoreSupport/WebFrameBridge.m:
12901         (-[WebFrameBridge canRunModalNow]):
12902         * WebView/WebFrame.m:
12903         (-[WebFramePrivate dealloc]):
12904         (-[WebFramePrivate finalize]):
12905         (frame): Changed from uppercase to lowercase so that it won't conflict
12906         with the WebCore class named Frame.
12907         (-[WebFrame _firstChildFrame]):
12908         (-[WebFrame _lastChildFrame]):
12909         (-[WebFrame _previousSiblingFrame]):
12910         (-[WebFrame _nextSiblingFrame]):
12911         (-[WebFrame _traverseNextFrameStayWithin:]):
12912         (-[WebFrame _immediateChildFrameNamed:]):
12913         (-[WebFrame _nextFrameWithWrap:]):
12914         (-[WebFrame _previousFrameWithWrap:]):
12915         (-[WebFrame findFrameNamed:]):
12916         (-[WebFrame parentFrame]):
12917         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
12918         (-[WebFrame _deliverArchivedResourcesAfterDelay]):
12919         (-[WebFrame _willUseArchiveForRequest:originalURL:loader:]):
12920         (-[WebFrame _archiveLoadPendingForLoader:]):
12921         (-[WebFrame _cancelPendingArchiveLoadForLoader:]):
12922         (-[WebFrame _clearArchivedResources]):
12923         (-[WebFrame _deliverArchivedResources]):
12924
12925 2006-10-21  Darin Adler  <darin@apple.com>
12926
12927         Reviewed by Anders.
12928
12929         - fix http://bugs.webkit.org/show_bug.cgi?id=10328
12930           REGRESSION: frame leak reported by buildbot
12931
12932         * WebCoreSupport/WebEditorClient.mm:
12933         (WebEditorClient::WebEditorClient): Don't retain the web view.
12934         (WebEditorClient::~WebEditorClient): Don't release the web view.
12935         (WebEditorClient::setWebView): Ditto.
12936
12937         * WebCoreSupport/WebFrameBridge.m:
12938         (-[WebFrameBridge finishInitializingWithFrameName:view:]): Added. Common code for use by both
12939         init methods below.
12940         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]): Changed to use new method.
12941         Also added comment pointing out design flaw -- we attach the client to the web view here,
12942         but we need to be sure to detach in case the web view is deallocated first.
12943         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]): Ditto.
12944
12945 2006-10-21  Darin Adler  <darin@apple.com>
12946
12947         Reviewed by Adam.
12948
12949         - http://bugs.webkit.org/show_bug.cgi?id=11376
12950           build scripts should invoke make with "-j" option for multiple processors
12951
12952         * WebKit.xcodeproj/project.pbxproj: Pass -j `sysctl -n hw.ncpu` to make.
12953
12954 2006-10-21  Timothy Hatcher  <timothy@apple.com>
12955
12956         Reviewed by Geoff.
12957
12958         <rdar://problem/4478625> HTML Editing: Basic table editing and culling
12959
12960         Initial implementaltion of table deletion user interface:
12961         * Adds a new editing delegate method, webView:shouldShowDeleteInterfaceForElement:.
12962         * The new delegate method is called from the new shouldShowDeleteInterface EditorClient function.
12963
12964         * DefaultDelegates/WebDefaultEditingDelegate.m:
12965         (-[WebDefaultEditingDelegate webView:shouldShowDeleteInterfaceForElement:]):
12966         * WebCoreSupport/WebEditorClient.h:
12967         * WebCoreSupport/WebEditorClient.mm:
12968         (WebEditorClient::WebEditorClient):
12969         (WebEditorClient::shouldDeleteRange):
12970         (WebEditorClient::shouldShowDeleteInterface):
12971         * WebKit.xcodeproj/project.pbxproj:
12972         * WebView/WebEditingDelegatePrivate.h: Added.
12973
12974 2006-10-21  Alice Liu  <alice.liu@apple.com>
12975
12976         Reviewed by Maciej.
12977
12978         fix leaks.
12979
12980         * WebCoreSupport/WebEditorClient.mm:
12981         (WebEditorClient::setWebView):
12982         only change webview if its different
12983
12984         * WebCoreSupport/WebFrameBridge.m:
12985         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
12986         actually use the client allocated in the line above instead of
12987         allocation again, duh. 
12988
12989 2006-10-21  Alice Liu  <alice.liu@apple.com>
12990
12991         Build fix.
12992
12993         * WebCoreSupport/WebEditorClient.h:
12994         * WebCoreSupport/WebEditorClient.mm:
12995         (WebEditorClient::setWebView):
12996
12997 2006-10-20  Alice Liu  <alice.liu@apple.com>
12998
12999         Reviewed by Tim Hatcher.
13000
13001         Fixed a problem where the webview passed to the EditorClient wasn't valid yet.  
13002
13003         * WebCoreSupport/WebEditorClient.h:
13004         (WebEditorClient::setWebView):
13005         added webview setter
13006
13007         * WebCoreSupport/WebEditorClient.mm:
13008         (WebEditorClient::WebEditorClient):
13009         add default constructor
13010
13011         * WebCoreSupport/WebFrameBridge.m:
13012         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
13013         use [page webView] since _webview isn't valid yet
13014         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
13015         use webview setter on editorclient
13016
13017 2006-10-20  David Hyatt  <hyatt@apple.com>
13018
13019         Tweak cache sizes so that they are back to the way they were,
13020         except for < 512, which will stay doubled.
13021
13022         Reviewed by Tim H.
13023
13024         * WebCoreSupport/WebFrameBridge.m:
13025         (-[WebFrameBridge getObjectCacheSize]):
13026
13027 2006-10-20  Alice Liu  <alice.liu@apple.com>
13028
13029         Reviewed by Maciej.
13030
13031         Adding knowledge of EditorClient to WebKit
13032
13033         * WebCoreSupport/WebEditorClient.h: Added.
13034
13035         * WebCoreSupport/WebEditorClient.mm: Added.
13036         (WebEditorClient::WebEditorClient):
13037         (WebEditorClient::~WebEditorClient):
13038         (WebEditorClient::shouldDeleteRange):
13039         Implementation of mac EditorClient
13040
13041         * WebCoreSupport/WebFrameBridge.m:
13042         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
13043         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
13044         create an editor client to pass down the chain of constructors
13045
13046         * WebKit.xcodeproj/project.pbxproj:
13047         Added related EditorClient files
13048
13049         * WebKitPrefix.h:
13050         Added tiger build flag in order to make certain private headers from webcore compile successfully
13051
13052 2006-10-20  Darin Adler  <darin@apple.com>
13053
13054         - rolled out my loader change; caused world leak and possibly a plug-in crash
13055
13056 2006-10-20  Darin Adler  <darin@apple.com>
13057
13058         Reviewed by Adele.
13059
13060         - convert WebLoader and its 3 subclasses to C++
13061
13062         * Plugins/WebNetscapePluginStream.h:
13063         * Plugins/WebNetscapePluginStream.m:
13064         (-[WebNetscapePluginStream dealloc]):
13065         (-[WebNetscapePluginStream finalize]):
13066         (-[WebNetscapePluginStream start]):
13067         (-[WebNetscapePluginStream cancelLoadWithError:]):
13068         (-[WebNetscapePluginStream stop]):
13069         * WebCoreSupport/WebFrameBridge.m:
13070         (-[WebFrameBridge canRunModalNow]):
13071         * WebView/WebFrame.m:
13072         (-[WebFramePrivate dealloc]):
13073         (-[WebFramePrivate finalize]):
13074         (frame): Changed from uppercase to lowercase so that it won't conflict
13075         with the WebCore class named Frame.
13076         (-[WebFrame _firstChildFrame]):
13077         (-[WebFrame _lastChildFrame]):
13078         (-[WebFrame _previousSiblingFrame]):
13079         (-[WebFrame _nextSiblingFrame]):
13080         (-[WebFrame _traverseNextFrameStayWithin:]):
13081         (-[WebFrame _immediateChildFrameNamed:]):
13082         (-[WebFrame _nextFrameWithWrap:]):
13083         (-[WebFrame _previousFrameWithWrap:]):
13084         (-[WebFrame findFrameNamed:]):
13085         (-[WebFrame parentFrame]):
13086         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
13087         (-[WebFrame _deliverArchivedResourcesAfterDelay]):
13088         (-[WebFrame _willUseArchiveForRequest:originalURL:loader:]):
13089         (-[WebFrame _archiveLoadPendingForLoader:]):
13090         (-[WebFrame _cancelPendingArchiveLoadForLoader:]):
13091         (-[WebFrame _clearArchivedResources]):
13092         (-[WebFrame _deliverArchivedResources]):
13093
13094 2006-10-20  John Sullivan  <sullivan@apple.com>
13095
13096         Reviewed by Darin
13097         
13098         - fixed <rdar://problem/4794935> setAcceptsMouseMovedEvents: is called for every layout, 
13099           taking ~1% on the PLT test
13100
13101         * WebView/WebHTMLView.m:
13102         (-[NSArray layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
13103         Don't call setAcceptsMouseMovedEvents: and WKSetNSWindowShouldPostEventNotifications() here
13104         because this is called too often.
13105         
13106         * WebView/WebView.m:
13107         (-[WebView viewWillMoveToWindow:]):
13108         Do call them here, because this is guaranteed to be called at least once for each window
13109         containing a webview, but isn't called too often. Also restructured this method a little.
13110
13111 2006-10-19  Timothy Hatcher  <timothy@apple.com>
13112
13113         Reviewed by Anders.
13114
13115         Bug 11366: Web Inspector should show user agent style rules
13116         http://bugs.webkit.org/show_bug.cgi?id=11366
13117
13118         * WebInspector/WebInspector.m:
13119         (-[WebInspector init]):
13120         (-[WebInspector showOptionsMenu]):
13121         (-[WebInspector _toggleShowUserAgentStyles:]):
13122         * WebInspector/WebInspectorInternal.h:
13123         * WebInspector/webInspector/inspector.js:
13124
13125 2006-10-19  Brady Eidson <beidson@apple.com>
13126
13127         Build fix - 2gig is on that pesky signed/unsigned limit...
13128
13129         * WebCoreSupport/WebFrameBridge.m:
13130         (-[WebFrameBridge getObjectCacheSize]):
13131
13132 2006-10-19  Brady Eidson  <beidson@apple.com>
13133
13134         Reviewed by Hyatt.
13135
13136         Death to 16777216.  Long live 33554432.
13137         (Cache size changed needs to be reflected in localization file)
13138
13139         * English.lproj/StringsNotToBeLocalized.txt:
13140
13141 2006-10-19  Brady Eidson  <beidson@apple.com>
13142
13143         Reviewed by Hyatt
13144
13145         Added an larger in-memory level of cache for machines with 2+gb ram
13146
13147         * WebCoreSupport/WebFrameBridge.m:
13148         (-[WebFrameBridge getObjectCacheSize]):
13149
13150 2006-10-19  Brady Eidson  <beidson@apple.com>
13151
13152         Reviewed by Hyatt
13153
13154         Double the default memory cache size
13155
13156         * WebView/WebPreferences.m:
13157         (+[WebPreferences initialize]):
13158
13159 2006-10-19  John Sullivan  <sullivan@apple.com>
13160
13161         Reviewed by Kevin D and Geoff
13162
13163         * WebKit.xcodeproj/project.pbxproj:
13164         version wars
13165         
13166         Cleaned up this file, as follows:
13167         - renamed all file-internal methods to start with underscores
13168         - moved all file-internal methods into a FileInternal category block, and alphabetized them
13169         - grouped all other methods by where/how they were defined (delegate methods, protocol methods, overrides, etc.)
13170         - removed unstylish braces around one-line clauses
13171         
13172         * WebView/WebPDFView.m:
13173         (_applicationInfoForMIMEType):
13174         (_PDFSelectionsAreEqual):
13175         (+[WebPDFView supportedMIMETypes]):
13176         (-[WebPDFView setPDFDocument:]):
13177         (-[WebPDFView dealloc]):
13178         (-[WebPDFView centerSelectionInVisibleArea:]):
13179         (-[WebPDFView scrollPageDown:]):
13180         (-[WebPDFView scrollPageUp:]):
13181         (-[WebPDFView scrollLineDown:]):
13182         (-[WebPDFView scrollLineUp:]):
13183         (-[WebPDFView scrollToBeginningOfDocument:]):
13184         (-[WebPDFView scrollToEndOfDocument:]):
13185         (-[WebPDFView jumpToSelection:]):
13186         (-[WebPDFView acceptsFirstResponder]):
13187         (-[WebPDFView becomeFirstResponder]):
13188         (-[WebPDFView hitTest:]):
13189         (-[WebPDFView initWithFrame:]):
13190         (-[WebPDFView menuForEvent:]):
13191         (-[WebPDFView setNextKeyView:]):
13192         (-[WebPDFView viewDidMoveToWindow]):
13193         (-[WebPDFView viewWillMoveToWindow:]):
13194         (-[WebPDFView validateUserInterfaceItem:]):
13195         (-[WebPDFView copy:]):
13196         (-[WebPDFView takeFindStringFromSelection:]):
13197         (-[WebPDFView canPrintHeadersAndFooters]):
13198         (-[WebPDFView printOperationWithPrintInfo:]):
13199         (-[WebPDFView viewWillMoveToHostWindow:]):
13200         (-[WebPDFView viewDidMoveToHostWindow]):
13201         (-[WebPDFView elementAtPoint:]):
13202         (-[WebPDFView elementAtPoint:allowShadowContent:]):
13203         (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
13204         (-[WebPDFView viewState]):
13205         (-[WebPDFView setViewState:]):
13206         (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
13207         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
13208         (+[WebPDFView _PDFPreviewViewClass]):
13209         (+[WebPDFView _PDFViewClass]):
13210         (-[WebPDFView _anyPDFTagsFoundInMenu:]):
13211         (-[WebPDFView _applyPDFDefaults]):
13212         (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
13213         (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
13214         (-[WebPDFView _openWithFinder:]):
13215         (-[WebPDFView _path]):
13216         (-[WebPDFView _PDFSubview]):
13217         (-[WebPDFView _pointIsInSelection:]):
13218         (-[WebPDFView _receivedPDFKitLaunchNotification:]):
13219         (-[WebPDFView _scaledAttributedString:]):
13220         (-[WebPDFView _trackFirstResponder]):
13221         (-[PDFPrefUpdatingProxy forwardInvocation:]):
13222         (-[PDFPrefUpdatingProxy methodSignatureForSelector:]):
13223
13224 2006-10-19  John Sullivan  <sullivan@apple.com>
13225
13226         Reviewed by Kevin Decker
13227         
13228         - fixed <rdar://problem/4792761> Safari should use fancier embedded PDFKit stuff when it's available
13229
13230         * WebKit.xcodeproj/project.pbxproj:
13231         version wars
13232         
13233         * WebView/WebFrameView.m:
13234         (-[WebFrameView _makeDocumentViewForDataSource:]):
13235         initialize document view with frame view's rect instead of empty rect. This avoids some problems when 
13236         constructing view hierarchies from nibs
13237         
13238         * WebView/WebPreferencesPrivate.h:
13239         declare new _usePDFPreviewView and _setUsePDFPreviewView:, used for debugging
13240         * WebView/WebPreferenceKeysPrivate.h:
13241         declare new preference key string
13242         * WebView/WebPreferences.m:
13243         (+[WebPreferences initialize]):
13244         initialize new preference to true (we will by default use the new view if it's available)
13245         (-[WebPreferences _usePDFPreviewView]):
13246         new accessor for new pref
13247         (-[WebPreferences _setUsePDFPreviewView:]):
13248         ditto
13249
13250         * WebView/WebPDFView.h:
13251         new previewView ivar
13252         
13253         * WebView/WebPDFView.m:
13254         (+[WebPDFView PDFPreviewViewClass]):
13255         new method, returns class to use for fancier embedded PDFKit stuff, or nil if fancy stuff isn't available
13256         (-[WebPDFView initWithFrame:]):
13257         now tries to use fancier embedded PDFKit stuff if it's available and the pref is set to use it; falls back
13258         to old behavior otherwise
13259         (-[WebPDFView dealloc]):
13260         release new previewView ivar (retained in initWithFrame:)
13261         (-[WebPDFView viewWillMoveToWindow:]):
13262         stop observing PDFKit notification when we're removed from window
13263         (-[WebPDFView viewDidMoveToWindow]):
13264         start observing PDFKit notification when we're added to window
13265         (-[WebPDFView _receivedPDFKitLaunchNotification:]):
13266         respond to this new PDFKit notification by opening the document via NSWorkspace
13267         
13268         * English.lproj/StringsNotToBeLocalized.txt:
13269         updated for lots of recent changes
13270         
13271 2006-10-19  Sam Weinig  <sam.weinig@gmail.com>
13272
13273         Reviewed by ap.
13274
13275         Win32 build fix.
13276
13277         * COM/WebFrame.cpp:
13278         (WebFrame::initWithName):
13279         (WebFrame::createNewWindow):
13280
13281 2006-10-19  Mitz Pettel  <mitz@webkit.org>
13282
13283         Reviewed and landed by ap.
13284
13285         - fixed the inspector's tree popup
13286
13287         * WebInspector/webInspector/inspector.html:
13288
13289 2006-10-18  Sam Weinig  <sam.weinig@gmail.com>
13290
13291         Reviewed by Maciej.
13292
13293         Win32 build fix.
13294
13295         * COM/WebFrame.cpp:
13296         (WebFrame::createNewWindow):
13297         * COM/WebFrame.h:
13298
13299 2006-10-18  Anders Carlsson  <acarlsson@apple.com>
13300
13301         Reviewed by Adam.
13302
13303         http://bugs.webkit.org/show_bug.cgi?id=11000
13304         REGRESSION (r16101): css2.1/t0801-c412-hz-box-00-b-a is failing because the QuickTime plugin is taking over but not rendering the png
13305         
13306         * WebCoreSupport/WebFrameBridge.m:
13307         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
13308         Return ObjectElementFrame if the MIME type is one of the image ones we support.
13309
13310 2006-10-17  Justin Garcia  <justin.garcia@apple.com>
13311
13312         Reviewed by harrison
13313         
13314         <rdar://problem/4765600>
13315         REGRESSION: Mail.app: smart deletion of words does not work
13316         
13317         Regressed when we pushed selecion expansion down into WebCore.  It's OK
13318         to try a smart delete from _deleteWithDirection:, which is called by
13319         deleteFoward: and deleteBackward: if the current selection is a 
13320         range.
13321     
13322         * WebView/WebHTMLView.m:
13323         (-[NSArray _deleteWithDirection:granularity:killRing:isTypingAction:]):
13324
13325 2006-10-13  Justin Garcia  <justin.garcia@apple.com>
13326
13327         Reviewed by harrison
13328         
13329         <rdar://problem/3655385>
13330         Editing: -indent: method unimplemented
13331
13332         * WebView/WebHTMLView.m:
13333         (-[NSArray validateUserInterfaceItem:]): Only allow indent:/outdent: in
13334         richly editable areas.
13335         (-[NSArray indent:]):
13336         (-[NSArray outdent:]):
13337
13338 2006-10-13  Maciej Stachowiak  <mjs@apple.com>
13339
13340         Not reviewed, build fix.
13341         
13342         * icu/unicode/putil.h: Added - needed for build if you don't have apple internal headers.
13343
13344 2006-10-13  Maciej Stachowiak  <mjs@apple.com>
13345
13346         Not reviewed, build fix.
13347         
13348         * icu/unicode/ustring.h: Added - needed for build if you don't have apple internal headers.
13349
13350 2006-10-13  Maciej Stachowiak  <mjs@apple.com>
13351
13352         Reviewed by Anders.
13353         
13354         - add a bunch of casts to get this compiling with older Xcode versions
13355         
13356         (I used static_cast so it will be easier to find and remove these once we have completely moved
13357         on to a new enough compiler version.)
13358
13359         * Plugins/WebBaseNetscapePluginView.m:
13360         (+[WebBaseNetscapePluginView getCarbonEvent:]):
13361         (-[WebBaseNetscapePluginView getCarbonEvent:withEvent:]):
13362         (-[WebBaseNetscapePluginView fixWindowPort]):
13363         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
13364         (-[WebBaseNetscapePluginView _createWindowlessAGLContext]):
13365         (-[WebBaseNetscapePluginView _reshapeAGLWindow]):
13366         (-[WebBaseNetscapePluginView _aglOffscreenImageForDrawingInRect:]):
13367         * WebKit.xcodeproj/project.pbxproj:
13368
13369 2006-10-13  Kevin McCullough  <KMcCullough@apple.com>
13370
13371         Changed by Darin, reviewed by me.
13372
13373         * Plugins/WebNetscapePluginStream.m: Fixed case of import so we can compile on
13374         case-sensitive file system.
13375
13376 2006-10-13  Darin Adler  <darin@apple.com>
13377
13378         Reviewed by Adele.
13379
13380         - converted WebFormState from Objective-C to C++
13381
13382         * ForwardingHeaders: Added an entire copy of WebCore's forwarding headers here.
13383         We should eventually come up with a more-elegant solution.
13384
13385         * WebKit.xcodeproj/project.pbxproj: Added ForwardingHeaders to the include paths.
13386         Converted many files from Objective-C to Objective-C++. In a later check-in, I'll
13387         rename them to .mm instead of .m. Removed C-only warning options for now. In a
13388         later check-in I will add these back in a way that omits them for C++.
13389
13390         * Plugins/WebPluginContainerCheck.m: Updated for header changes.
13391
13392         * WebView/WebFrameInternal.h: Updated for header changes. Removed WebFrameLoaderClient category
13393         so this file can still be used by Objective-C code (not just Objective-C++).
13394
13395         * WebView/WebFrame.m: Put WebFrameLoaderClient category in here.
13396         (-[WebFrame _loadItem:withLoadType:]): Changed to use 0 instead of nil for FormState and fixed
13397         enum code for C++ compatibility.
13398         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added call to setFrameLoaderClient: here.
13399         (-[WebFrame _updateHistoryForCommit]): Fixed enum code for C++ compatibility.
13400         (-[WebFrame _updateHistoryForReload]): Ditto.
13401
13402         * WebCoreSupport/WebFrameBridge.m:
13403         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]): Removed call to setFrameLoaderClient:.
13404         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]): Ditto.
13405         (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]): Fixed enum code for C++ compatibility.
13406         (-[WebFrameBridge runModal]): Changed code to not use "namespace" as a local variable name.
13407
13408         * WebView/WebPDFView.m: Added extern "C" so this can compile as Objective-C++.
13409
13410 2006-10-12  Maciej Stachowiak  <mjs@apple.com>
13411
13412         Reviewed by Oliver.
13413         
13414         - liberate more WebKit code down to WebCore
13415
13416         * WebCoreSupport/WebFrameBridge.h:
13417         * WebCoreSupport/WebFrameBridge.m:
13418
13419 2006-10-12  Adele Peterson  <adele@apple.com>
13420
13421         Reviewed by Maciej.
13422
13423         WebKit part of fix for <rdar://problem/4450613> need a means to attach user data to any menu that is popuped up in HTML
13424
13425         Added private delegate method for clients that want access to a PopupMenu's NSMenu.
13426
13427         * DefaultDelegates/WebDefaultUIDelegate.m: (-[NSApplication webView:willPopupMenu:]):
13428         * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge willPopupMenu:]):
13429         * WebView/WebUIDelegatePrivate.h:
13430
13431 2006-10-12  MorganL  <morganl.webkit@yahoo.com>
13432
13433         Reviewed/landed by Adam.
13434
13435         Fixes http://bugs.webkit.org/show_bug.cgi?id=11264
13436         Windows build busted
13437
13438         * COM/WebFrame.cpp:
13439         (WebFrame::receivedResponse):
13440
13441 2006-10-11  Darin Adler  <darin@apple.com>
13442
13443         Reviewed by Adele.
13444
13445         - preparations for making more code C++
13446
13447         * WebKitPrefix.h: Fixed ifdef so that C++ files get all the precompiled stuff
13448         that non-C++ files get.
13449
13450         * Misc/WebKitLogging.h:
13451         * Misc/WebKitSystemBits.h:
13452         * Misc/WebLocalizableStrings.h:
13453         * WebCoreSupport/WebSystemInterface.h:
13454         Added extern "C".
13455
13456         * Misc/WebNSViewExtras.h:
13457         * WebView/WebDataSource.m: (addTypesFromClass):
13458         * WebView/WebFrameView.m: (addTypesFromClass):
13459         Eliminated use of the identifier "class".
13460
13461         * WebView/WebView.m: (-[WebView _goToItem:withLoadType:]): Added a type cast.
13462
13463         * Plugins/WebBaseNetscapePluginView.m: Added lots of type casts.
13464
13465 2006-10-10  Brady Eidson  <beidson@apple.com>
13466
13467         Reviewed by Maciej.
13468
13469         Moved WebFrameLoader into WebCoreFrameBridge
13470
13471         * WebCoreSupport/WebFrameBridge.h:
13472         * WebCoreSupport/WebFrameBridge.m:
13473         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
13474         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
13475         (-[WebFrameBridge dealloc]):
13476         (-[WebFrameBridge setTitle:]):
13477         (-[WebFrameBridge receivedData:textEncodingName:]):
13478         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
13479         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
13480         (-[WebFrameBridge objectLoadedFromCacheWithURL:response:data:]):
13481         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
13482         (-[WebFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
13483         (-[WebFrameBridge reportClientRedirectCancelled:]):
13484         (-[WebFrameBridge close]):
13485         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
13486         (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
13487         (-[WebFrameBridge tokenizerProcessedData]):
13488         (-[WebFrameBridge frameDetached]):
13489         (-[WebFrameBridge didFirstLayout]):
13490         (-[WebFrameBridge notifyIconChanged:]):
13491         (-[WebFrameBridge originalRequestURL]):
13492         (-[WebFrameBridge isLoadTypeReload]):
13493
13494 2006-10-10  Adele Peterson  <adele@apple.com>
13495
13496         Reviewed by Beth.
13497
13498         Removed handleAutoscrollForMouseDragged.  Except for autoscroll caused by drag and drop, all other
13499         autoscrolling should be done in WebCore instead of in AppKit.
13500
13501         * WebCoreSupport/WebFrameBridge.m:
13502         * WebView/WebHTMLView.m:
13503         * WebView/WebHTMLViewPrivate.h:
13504
13505 2006-10-10  Darin Adler  <darin@apple.com>
13506
13507         - corrected an archive regression caused by loader refactoring
13508           (pointed out by Graham Dennis)
13509
13510         * WebView/WebFrame.m: (-[WebFrame _deliverArchivedResourcesAfterDelay]):
13511         Fix selector name.
13512
13513 2006-10-10  Maciej Stachowiak  <mjs@apple.com>
13514
13515         Rubber stamped by Eric.
13516         
13517         - moved a whole bunch of stuff over to WebCore - updated includes appropriately
13518
13519         * Loader/LoaderNSURLExtras.h: Removed.
13520         * Loader/LoaderNSURLExtras.m: Removed.
13521         * Loader/WebDataProtocol.h: Removed.
13522         * Loader/WebDataProtocol.m: Removed.
13523         * Loader/WebDocumentLoader.h: Removed.
13524         * Loader/WebDocumentLoader.m: Removed.
13525         * Loader/WebFormDataStream.h: Removed.
13526         * Loader/WebFormDataStream.m: Removed.
13527         * Loader/WebFormState.h: Removed.
13528         * Loader/WebFormState.m: Removed.
13529         * Loader/WebFrameLoader.h: Removed.
13530         * Loader/WebFrameLoader.m: Removed.
13531         * Loader/WebFrameLoaderClient.h: Removed.
13532         * Loader/WebLoader.h: Removed.
13533         * Loader/WebLoader.m: Removed.
13534         * Loader/WebMainResourceLoader.h: Removed.
13535         * Loader/WebMainResourceLoader.m: Removed.
13536         * Loader/WebNetscapePlugInStreamLoader.h: Removed.
13537         * Loader/WebNetscapePlugInStreamLoader.m: Removed.
13538         * Loader/WebPlugInStreamLoaderDelegate.h: Removed.
13539         * Loader/WebPolicyDecider.h: Removed.
13540         * Loader/WebPolicyDecider.m: Removed.
13541         * Loader/WebSubresourceLoader.h: Removed.
13542         * Loader/WebSubresourceLoader.m: Removed.
13543         * Misc/WebNSURLExtras.m:
13544         * Plugins/WebBaseNetscapePluginStream.h:
13545         * Plugins/WebBaseNetscapePluginView.m:
13546         * Plugins/WebNetscapePluginStream.m:
13547         * Plugins/WebPluginContainerCheck.m:
13548         * Plugins/WebPluginController.m:
13549         * WebCoreSupport/WebFrameBridge.m:
13550         * WebKit.xcodeproj/project.pbxproj:
13551         * WebView/WebDataSource.m:
13552         * WebView/WebDocumentLoaderMac.h:
13553         * WebView/WebFrame.m:
13554         * WebView/WebFrameInternal.h:
13555         * WebView/WebHTMLView.m:
13556         * WebView/WebPolicyDeciderMac.h:
13557         * WebView/WebPolicyDelegate.m:
13558         * WebView/WebView.m:
13559
13560 2006-10-10  Mark Rowe  <bdash@webkit.org>
13561
13562         Reviewed by Maciej.
13563
13564         Fix crash on launch in nightly builds after r16965.
13565
13566         Safari will sometimes call through to -[NSURL _webkit_canonicalize] before creating a WebView.  If this happens,
13567         InitWebCoreSystemInterface has not yet been called so the call to wkNSURLProtocolClassForReqest is via a garbage
13568         pointer.
13569
13570         * Misc/WebNSURLExtras.m:
13571         (-[NSURL _webkit_canonicalize]): Ensure InitWebCoreSystemInterface is called prior to canonicalURL.
13572
13573 2006-10-10  Maciej Stachowiak  <mjs@apple.com>
13574
13575         Reviewed by Oliver.
13576         
13577         - split out some NSURL extras to be moved to WebCore
13578
13579         * Loader/LoaderNSURLExtras.h: Added.
13580         * Loader/LoaderNSURLExtras.m: Added.
13581         (urlByRemovingComponent):
13582         (urlByRemovingFragment):
13583         (urlOriginalDataAsString):
13584         (urlOriginalData):
13585         (urlWithData):
13586         (WebCFAutorelease):
13587         (urlWithDataRelativeToURL):
13588         (urlByRemovingResourceSpecifier):
13589         (urlIsFileURL):
13590         (stringIsFileURL):
13591         (urlIsEmpty):
13592         (canonicalURL):
13593         * Loader/WebFrameLoader.m:
13594         (-[WebFrameLoader shouldReloadForCurrent:andDestination:]):
13595         (setHTTPReferrer):
13596         (-[WebFrameLoader commitProvisionalLoad:]):
13597         (-[WebFrameLoader _notifyIconChanged:]):
13598         (-[WebFrameLoader didChangeTitleForDocument:]):
13599         (-[WebFrameLoader checkNavigationPolicyForRequest:documentLoader:formState:andCall:withSelector:]):
13600         (-[WebFrameLoader safeLoadURL:]):
13601         * Misc/WebNSURLExtras.m:
13602         (+[NSURL _web_URLWithData:]):
13603         (+[NSURL _web_URLWithData:relativeToURL:]):
13604         (-[NSURL _web_originalData]):
13605         (-[NSURL _web_originalDataAsString]):
13606         (-[NSURL _web_isEmpty]):
13607         (-[NSURL _webkit_canonicalize]):
13608         (-[NSURL _webkit_URLByRemovingComponent:]):
13609         (-[NSURL _webkit_URLByRemovingFragment]):
13610         (-[NSURL _webkit_URLByRemovingResourceSpecifier]):
13611         (-[NSURL _webkit_isFileURL]):
13612         (-[NSString _webkit_isFileURL]):
13613         * WebCoreSupport/WebSystemInterface.m:
13614         (InitWebCoreSystemInterface):
13615         * WebKit.xcodeproj/project.pbxproj:
13616
13617 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13618
13619         Reviewed by Anders.
13620         
13621         - sever final WebFrame dependencies
13622
13623         * Loader/WebFrameLoader.h:
13624         * Loader/WebFrameLoader.m:
13625         (-[WebFrameLoader initWithFrame:client:]):
13626         (-[WebFrameLoader defersCallbacksChanged]):
13627         (-[WebFrameLoader subframeIsLoading]):
13628         (-[WebFrameLoader transitionToCommitted:]):
13629         (-[WebFrameLoader detachChildren]):
13630         (-[WebFrameLoader checkLoadComplete]):
13631
13632 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13633
13634         Reviewed by Brady.
13635         
13636         - convert more WebFrameLoader stuff to be independent of WebFrame
13637
13638         * Loader/WebFrameLoader.h:
13639         * Loader/WebFrameLoader.m:
13640         (-[WebFrameLoader stopLoadingSubframes]):
13641         (-[WebFrameLoader _receivedMainResourceError:complete:]):
13642         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
13643         (-[WebFrameLoader closeOldDataSources]):
13644         (-[WebFrameLoader isHostedByObjectElement]):
13645         (-[WebFrameLoader isLoadingMainFrame]):
13646         (-[WebFrameLoader loadDocumentLoader:withLoadType:formState:]):
13647         (-[WebFrameLoader transitionToCommitted:]):
13648         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
13649         (-[WebFrameLoader continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
13650         (-[WebFrameLoader loadRequest:inFrameNamed:]):
13651         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
13652         (-[WebFrameLoader actionInformationForNavigationType:event:originalURL:]):
13653         (-[WebFrameLoader client]):
13654         * Loader/WebFrameLoaderClient.h:
13655         * WebView/WebDataSource.m:
13656         (-[WebDataSource _webView]):
13657         (-[WebDataSource webFrame]):
13658         * WebView/WebFrame.m:
13659         (-[WebFrame _dispatchCreateWebViewWithRequest:]):
13660
13661 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13662
13663         Reviewed by Anders and Oliver.
13664         
13665         - move a bunch of WebFrame methods from the Internal category to the WebFrameLoader protocol
13666
13667         * Loader/WebFrameLoader.h:
13668         * Loader/WebFrameLoader.m:
13669         (-[WebFrameLoader loadRequest:]):
13670         (-[WebFrameLoader loadRequest:inFrameNamed:]):
13671         * Loader/WebFrameLoaderClient.h:
13672         * WebView/WebFrame.m:
13673         (-[WebFrame loadRequest:]):
13674         (-[WebFrame _dispatchDidCommitLoadForFrame]):
13675         (-[WebFrame _hasFrameView]):
13676         (-[WebFrame _frameLoadCompleted]):
13677         (-[WebFrame _restoreScrollPositionAndViewState]):
13678         (-[WebFrame _setTitle:forURL:]):
13679         (-[WebFrame _createDocumentLoaderWithRequest:]):
13680         (-[WebFrame _prepareForDataSourceReplacement]):
13681         (-[WebFrame _didFinishLoad]):
13682         (-[WebFrame _addHistoryItemForFragmentScroll]):
13683         (-[WebFrame _shouldTreatURLAsSameAsCurrent:]):
13684         (-[WebFrame _provisionalLoadStarted]):
13685         * WebView/WebFrameInternal.h:
13686
13687 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13688
13689         Not reviewed, build fix.
13690         
13691         - added forgotten files
13692
13693         * Loader/WebPolicyDecider.h: Added.
13694         * Loader/WebPolicyDecider.m: Added.
13695         (-[WebPolicyDecider invalidate]):
13696
13697 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13698
13699         Reviewed by Brady.
13700         
13701         - add wrapper for WebPolicyDecisionListener so we can remove the dependency from WebFrameLoader.
13702
13703         * Loader/WebFrameLoader.h:
13704         * Loader/WebFrameLoader.m:
13705         (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
13706         (-[WebFrameLoader cancelContentPolicy]):
13707         (-[WebFrameLoader invalidatePendingPolicyDecisionCallingDefaultAction:]):
13708         (-[WebFrameLoader checkNewWindowPolicyForRequest:action:frameName:formState:andCall:withSelector:]):
13709         (-[WebFrameLoader checkNavigationPolicyForRequest:documentLoader:formState:andCall:withSelector:]):
13710         (-[WebFrameLoader continueAfterWillSubmitForm:]):
13711         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
13712         * Loader/WebFrameLoaderClient.h:
13713         * WebKit.xcodeproj/project.pbxproj:
13714         * WebView/WebFrame.m:
13715         (-[WebFrame _createPolicyDeciderWithTarget:action:]):
13716         (decisionListener):
13717         (-[WebFrame _dispatchDecidePolicyForMIMEType:request:decider:]):
13718         (-[WebFrame _dispatchDecidePolicyForNewWindowAction:request:newFrameName:decider:]):
13719         (-[WebFrame _dispatchDecidePolicyForNavigationAction:request:decider:]):
13720         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
13721         * WebView/WebPolicyDeciderMac.h: Added.
13722         * WebView/WebPolicyDeciderMac.m: Added.
13723         (-[WebPolicyDeciderMac initWithTarget:action:]):
13724         (-[WebPolicyDeciderMac dealloc]):
13725         (-[WebPolicyDeciderMac decisionListener]):
13726         (-[WebPolicyDeciderMac invalidate]):
13727
13728 2006-10-09  Brady Eidson  <beidson@apple.com>
13729
13730         Reviewed by John
13731
13732         http://bugs.webkit.org/show_bug.cgi?id=11195
13733         Added the WebIconDatabaseDelegate.  This allows the ability to allow customization of 
13734         IconDatabase behavior in the future, starting now with the ability to override the 
13735         default icon fairly flexibly
13736
13737         * Misc/WebIconDatabase.h: Added setIconDatabaseDelegate:
13738         * Misc/WebIconDatabase.m:
13739         (-[WebIconDatabase iconForURL:withSize:cache:]): Call the delegate for the default icon if delegate is set
13740         (-[WebIconDatabase defaultIconForURL:withSize:]): Get the default icon through the delegate if available, built-in if not
13741         (-[WebIconDatabase setDelegate:]):
13742         (-[WebIconDatabase delegate]):
13743         * Misc/WebIconDatabaseDelegate.h: Added.
13744         * Misc/WebIconDatabasePrivate.h: Added the delegate, nuked an unused class definition
13745         * WebKit.xcodeproj/project.pbxproj:
13746
13747 2006-10-09  Darin Adler  <darin@apple.com>
13748
13749         Reviewed by Maciej.
13750
13751         - eliminated uses of WebResource and WebView from WebFrameLoader
13752
13753         * Loader/WebFrameLoader.h:
13754         * Loader/WebFrameLoader.m:
13755         (-[WebFrameLoader setDefersCallbacks:]):
13756         (-[WebFrameLoader stopLoading]):
13757         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
13758         (-[WebFrameLoader archiveLoadPendingForLoader:]):
13759         (-[WebFrameLoader cancelPendingArchiveLoadForLoader:]):
13760         (-[WebFrameLoader _canShowMIMEType:]):
13761         (-[WebFrameLoader _representationExistsForURLScheme:]):
13762         (-[WebFrameLoader _generatedMIMETypeForURLScheme:]):
13763         (-[WebFrameLoader loadDocumentLoader:]):
13764         (-[WebFrameLoader continueAfterNavigationPolicy:]):
13765         (-[WebFrameLoader sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
13766         (-[WebFrameLoader actionInformationForNavigationType:event:originalURL:]):
13767         * Loader/WebFrameLoaderClient.h:
13768         * Loader/WebMainResourceLoader.m:
13769         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
13770         (-[WebMainResourceLoader loadWithRequestNow:]):
13771         * WebView/WebFrame.m:
13772         (-[WebFramePrivate dealloc]):
13773         (-[WebFrame loadRequest:]):
13774         (-[WebFrame loadArchive:]):
13775         (-[WebFrame _canUseResourceForRequest:]):
13776         (-[WebFrame _canUseResourceWithResponse:]):
13777         (-[WebFrame _deliverArchivedResourcesAfterDelay]):
13778         (-[WebFrame _willUseArchiveForRequest:originalURL:loader:]):
13779         (-[WebFrame _archiveLoadPendingForLoader:]):
13780         (-[WebFrame _cancelPendingArchiveLoadForLoader:]):
13781         (-[WebFrame _clearArchivedResources]):
13782         (-[WebFrame _deliverArchivedResources]):
13783         (-[WebFrame _setDefersCallbacks:]):
13784         (-[WebFrame _canHandleRequest:]):
13785         (-[WebFrame _canShowMIMEType:]):
13786         (-[WebFrame _representationExistsForURLScheme:]):
13787         (-[WebFrame _generatedMIMETypeForURLScheme:]):
13788         (-[WebFrame _elementForEvent:]):
13789
13790 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13791
13792         Reviewed by Darin.
13793         
13794         - do all the stuff that setting the referrer should
13795
13796         * Loader/WebFrameLoader.m:
13797         (setHTTPReferrer):
13798         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
13799         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
13800         * WebKit.xcodeproj/project.pbxproj:
13801
13802 2006-10-09  Brady Eidson  <beidson@apple.com>
13803
13804         Reviewed by Maciej
13805
13806         Fix to elminate WebIconDatabaseBridge.h from WebFrameLoader
13807
13808         * Loader/WebFrameLoader.m:
13809         (-[WebFrameLoader _notifyIconChanged:]):
13810         * WebCoreSupport/WebIconDatabaseBridge.m:
13811         (+[WebIconDatabaseBridge createInstance]):
13812
13813 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13814
13815         Reviewed by Darin.
13816         
13817         (Was reviewed as part of a larger patch but it looks like Darin already did the rest of it)
13818         
13819         - avoid a needless use of WebFrame
13820
13821         * Loader/WebFrameLoader.m:
13822         (-[WebFrameLoader loadDocumentLoader:withLoadType:formState:]):
13823
13824 2006-10-09  Brady Eidson  <beidson@apple.com>
13825
13826         A *real* fake fix for the layouttest problem until the real fix
13827
13828         * Loader/WebFrameLoader.m:
13829         (-[WebFrameLoader _notifyIconChanged:]):
13830
13831 2006-10-09  Brady Eidson  <beidson@apple.com>
13832
13833         Quick layouttest fix until I make the real fix
13834
13835         * Loader/WebFrameLoader.m:
13836
13837 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13838
13839         Reviewed by Darin.
13840         
13841         - wean WebFrameLoader from WebDataSource private stuff
13842         
13843         (actually just tweaks tot he above to make merging my future
13844         patches easier since Darin did a lot of the same stuff)
13845
13846         * Loader/WebDocumentLoader.h:
13847         * Loader/WebDocumentLoader.m:
13848         (-[WebDocumentLoader URLForHistory]):
13849         * Loader/WebFrameLoader.m:
13850         (-[WebFrameLoader _loadRequest:archive:]):
13851         (-[WebFrameLoader revertToProvisionalWithDocumentLoader:]):
13852         (-[WebFrameLoader documentLoader:setMainDocumentError:]):
13853         (-[WebFrameLoader finalSetupForReplaceWithDocumentLoader:]):
13854         (-[WebFrameLoader didChangeTitleForDocument:]):
13855         (-[WebFrameLoader loadDocumentLoader:withLoadType:formState:]):
13856         * Loader/WebFrameLoaderClient.h:
13857         * WebView/WebDataSource.m:
13858         (-[WebDataSource _URLForHistory]):
13859         * WebView/WebFrame.m:
13860         (-[WebFrame _addDocumentLoader:toUnarchiveState:]):
13861         (-[WebFrame _revertToProvisionalStateForDocumentLoader:]):
13862         (-[WebFrame _setMainDocumentError:forDocumentLoader:]):
13863         (-[WebFrame _clearUnarchivingStateForLoader:]):
13864
13865 2006-10-09  Darin Adler  <darin@apple.com>
13866
13867         Reviewed by Brady.
13868
13869         - eliminated WebFrameLoader dependency on WebDataSourceInternal.h,
13870           WebIconDatabasePrivate.h, and WebKitErrorsPrivate.h, along with
13871           most but not all references to WebView
13872
13873         * Loader/WebFrameLoader.h:
13874         * Loader/WebFrameLoader.m:
13875         (-[WebFrameLoader removePlugInStreamLoader:]):
13876         (-[WebFrameLoader _receivedMainResourceError:complete:]):
13877         (-[WebFrameLoader _notifyIconChanged:]):
13878         (-[WebFrameLoader cancelledErrorWithRequest:]):
13879         (-[WebFrameLoader fileDoesNotExistErrorWithResponse:]):
13880         (-[WebFrameLoader handleUnimplementablePolicyWithError:]):
13881         (-[WebFrameLoader cannotShowMIMETypeWithResponse:]):
13882         (-[WebFrameLoader interruptForPolicyChangeErrorWithRequest:]):
13883         (-[WebFrameLoader _loadRequest:archive:]):
13884         (-[WebFrameLoader finishedLoadingDocument:]):
13885         (-[WebFrameLoader committedLoadWithDocumentLoader:data:]):
13886         (-[WebFrameLoader revertToProvisionalWithDocumentLoader:]):
13887         (-[WebFrameLoader documentLoader:setMainDocumentError:]):
13888         (-[WebFrameLoader finalSetupForReplaceWithDocumentLoader:]):
13889         (-[WebFrameLoader didChangeTitleForDocument:]):
13890         (-[WebFrameLoader continueAfterNavigationPolicy:]):
13891         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
13892         (-[WebFrameLoader loadDocumentLoader:withLoadType:formState:]):
13893         (-[WebFrameLoader transitionToCommitted:]):
13894         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
13895         (-[WebFrameLoader requestFromDelegateForRequest:identifier:error:]):
13896         (-[WebFrameLoader addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
13897         (-[WebFrameLoader checkLoadComplete]):
13898         * Loader/WebFrameLoaderClient.h:
13899         * Loader/WebMainResourceLoader.m:
13900         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
13901         * WebView/WebFrame.m:
13902         (-[WebFrame _addDocumentLoader:toUnarchiveState:]):
13903         (-[WebFrame _formDelegate]):
13904         (-[WebFrame _finishedLoadingDocument:]):
13905         (-[WebFrame _committedLoadWithDocumentLoader:data:]):
13906         (-[WebFrame _revertToProvisionalWithDocumentLoader:]):
13907         (-[WebFrame _documentLoader:setMainDocumentError:]):
13908         (-[WebFrame _finalSetupForReplaceWithDocumentLoader:]):
13909         (-[WebFrame _URLForHistoryForDocumentLoader:]):
13910         (-[WebFrame _cancelledErrorWithRequest:]):
13911         (-[WebFrame _cannotShowURLErrorWithRequest:]):
13912         (-[WebFrame _interruptForPolicyChangeErrorWithRequest:]):
13913         (-[WebFrame _cannotShowMIMETypeErrorWithResponse:]):
13914         (-[WebFrame _fileDoesNotExistErrorWithResponse:]):
13915         (-[WebFrame _shouldFallBackForError:]):
13916         (-[WebFrame _hasWebView]):
13917         (-[WebFrame _mainFrameURL]):
13918         * WebView/WebFrameInternal.h:
13919
13920 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
13921
13922         Reviewed, landed, tweaked a bit by Darin.
13923
13924         - removed most uses of WebFrameBridge from WebFrameLoader
13925           (WebCoreFrameBridge use is OK)
13926
13927         * Loader/WebDocumentLoader.m:
13928         (-[WebDocumentLoader bridge]):
13929         * Loader/WebFrameLoader.h:
13930         * Loader/WebFrameLoader.m:
13931         (-[WebFrameLoader initWithFrame:client:]):
13932         (-[WebFrameLoader defersCallbacksChanged]):
13933         (-[WebFrameLoader defersCallbacks]):
13934         (-[WebFrameLoader provisionalLoadStarted]):
13935         (-[WebFrameLoader stopLoadingSubframes]):
13936         (-[WebFrameLoader _willSendRequest:forResource:redirectResponse:]):
13937         (-[WebFrameLoader _receivedMainResourceError:complete:]):
13938         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
13939         (-[WebFrameLoader continueFragmentScrollAfterNavigationPolicy:formState:]):
13940         (-[WebFrameLoader closeOldDataSources]):
13941         (-[WebFrameLoader commitProvisionalLoad:]):
13942         (-[WebFrameLoader bridge]):
13943         (-[WebFrameLoader _handleFallbackContent]):
13944         (-[WebFrameLoader _finishedLoading]):
13945         (-[WebFrameLoader reload]):
13946         (-[WebFrameLoader checkNavigationPolicyForRequest:documentLoader:formState:andCall:withSelector:]):
13947         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
13948         (-[WebFrameLoader transitionToCommitted:]):
13949         (-[WebFrameLoader continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
13950         (-[WebFrameLoader loadRequest:inFrameNamed:]):
13951         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
13952         (-[WebFrameLoader detachFromParent]):
13953         (-[WebFrameLoader addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
13954         (-[WebFrameLoader safeLoadURL:]):
13955         (-[WebFrameLoader actionInformationForLoadType:isFormSubmission:event:originalURL:]):
13956         * WebCoreSupport/WebFrameBridge.m:
13957         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
13958         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
13959         * WebView/WebFrame.m:
13960         (-[WebFrame _atMostOneFrameHasSelection]):
13961         * WebView/WebFrameInternal.h:
13962
13963 2006-10-09  Darin Adler  <darin@apple.com>
13964
13965         Reviewed by Brady.
13966
13967         - removed almost all direct use of WebView from WebFrameLoader
13968
13969         * Loader/WebFrameLoader.m:
13970         (-[WebFrameLoader defersCallbacksChanged]):
13971         (-[WebFrameLoader defersCallbacks]):
13972         (-[WebFrameLoader clearProvisionalLoad]):
13973         (-[WebFrameLoader _willSendRequest:forResource:redirectResponse:]):
13974         (-[WebFrameLoader _didReceiveResponse:forResource:]):
13975         (-[WebFrameLoader _didReceiveData:contentLength:forResource:]):
13976         (-[WebFrameLoader _didFinishLoadingForResource:]):
13977         (-[WebFrameLoader _didFailLoadingWithError:forResource:]):
13978         (-[WebFrameLoader closeOldDataSources]):
13979         (-[WebFrameLoader _notifyIconChanged:]):
13980         (-[WebFrameLoader prepareForLoadStart]):
13981         (-[WebFrameLoader willChangeTitleForDocument:]):
13982         (-[WebFrameLoader didChangeTitleForDocument:]):
13983         (-[WebFrameLoader continueAfterNewWindowPolicy:]):
13984         (-[WebFrameLoader continueAfterNavigationPolicy:]):
13985         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
13986         (-[WebFrameLoader didFirstLayout]):
13987         (-[WebFrameLoader transitionToCommitted:]):
13988         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
13989         (-[WebFrameLoader addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
13990         * Loader/WebFrameLoaderClient.h:
13991         * WebKit.xcodeproj/project.pbxproj:
13992         * WebView/WebFrame.m:
13993         (-[WebFrame _currentBackForwardListItemToResetTo]):
13994         (-[WebFrame _hasBackForwardList]):
13995         (-[WebFrame _resetBackForwardList]):
13996         (-[WebFrame _dispatchDidReceiveIcon:]):
13997         (-[WebFrame _dispatchDidStartProvisionalLoadForFrame]):
13998         (-[WebFrame _dispatchDidCommitLoadForFrame]):
13999         (-[WebFrame _dispatchDidFailProvisionalLoadWithError:]):
14000         (-[WebFrame _dispatchDidFailLoadWithError:]):
14001         (-[WebFrame _dispatchDidFinishLoadForFrame]):
14002         (-[WebFrame _progressStarted]):
14003         (-[WebFrame _progressCompleted]):
14004         (-[WebFrame _incrementProgressForIdentifier:response:]):
14005         (-[WebFrame _incrementProgressForIdentifier:data:]):
14006         (-[WebFrame _completeProgressForIdentifier:]):
14007         (-[WebFrame _setMainFrameDocumentReady:]):
14008         (-[WebFrame _willChangeTitleForDocument:]):
14009         (-[WebFrame _didChangeTitleForDocument:]):
14010         (-[WebFrame _startDownloadWithRequest:]):
14011
14012 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
14013
14014         Reviewed by Alice.
14015
14016         - moved WebFormState into Loader directory and tweaked to avoid WebKit dependencies
14017         
14018         * Loader/WebDocumentLoader.h:
14019         * Loader/WebFormState.h: Added.
14020         * Loader/WebFormState.m: Added.
14021         (-[WebFormState initWithForm:values:sourceFrame:]):
14022         (-[WebFormState dealloc]):
14023         (-[WebFormState form]):
14024         (-[WebFormState values]):
14025         (-[WebFormState sourceFrame]):
14026         * Loader/WebFrameLoader.h:
14027         * Loader/WebFrameLoader.m:
14028         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14029         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14030         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14031         * WebKit.xcodeproj/project.pbxproj:
14032         * WebView/WebFrame.m:
14033         * WebView/WebFrameInternal.h:
14034
14035 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
14036
14037         Reviewed by Oliver.
14038
14039         - remove dependency on WebNSURLRequestExtras.h
14040         
14041         * Loader/WebFrameLoader.h:
14042         * Loader/WebFrameLoader.m:
14043         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14044         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14045         (-[WebFrameLoader addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
14046
14047 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
14048
14049         Reviewed by Oliver.
14050         
14051         - removed unneeded logging code so I can take WebKitLogging.h out and remove a WebKit dependency
14052
14053         * Loader/WebFrameLoader.m:
14054         (-[WebFrameLoader setState:]):
14055         (-[WebFrameLoader clientRedirectCancelledOrFinished:]):
14056         (-[WebFrameLoader clientRedirectedTo:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
14057         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14058         (-[WebFrameLoader continueFragmentScrollAfterNavigationPolicy:formState:]):
14059         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14060         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
14061
14062 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
14063
14064         Reviewed by Oliver.
14065         
14066         - remove WebDataSource from the WebFrameLoader interface (and thereby from a lot of internal use)
14067
14068         * Loader/WebDocumentLoader.h:
14069         * Loader/WebDocumentLoader.m:
14070         (-[WebDocumentLoader dealloc]):
14071         (-[WebDocumentLoader initialRequest]):
14072         (-[WebDocumentLoader URL]):
14073         (-[WebDocumentLoader unreachableURL]):
14074         * Loader/WebFrameLoader.h:
14075         * Loader/WebFrameLoader.m:
14076         (-[WebFrameLoader setState:]):
14077         (-[WebFrameLoader startLoading]):
14078         (-[WebFrameLoader startProvisionalLoad:]):
14079         (-[WebFrameLoader clientRedirectedTo:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
14080         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14081         (-[WebFrameLoader opened]):
14082         (-[WebFrameLoader commitProvisionalLoad:]):
14083         (-[WebFrameLoader initialRequest]):
14084         (-[WebFrameLoader _finishedLoading]):
14085         (-[WebFrameLoader _notifyIconChanged:]):
14086         (-[WebFrameLoader _URL]):
14087         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
14088         (-[WebFrameLoader _checkNavigationPolicyForRequest:andCall:withSelector:]):
14089         (-[WebFrameLoader shouldReloadToHandleUnreachableURLFromRequest:]):
14090         (-[WebFrameLoader _loadRequest:archive:]):
14091         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
14092         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
14093         (-[WebFrameLoader reload]):
14094         (-[WebFrameLoader checkNavigationPolicyForRequest:documentLoader:formState:andCall:withSelector:]):
14095         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14096         (-[WebFrameLoader loadDocumentLoader:withLoadType:formState:]):
14097         (-[WebFrameLoader frameLoadCompleted]):
14098         (-[WebFrameLoader transitionToCommitted:]):
14099         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
14100         (-[WebFrameLoader safeLoadURL:]):
14101         * Loader/WebFrameLoaderClient.h:
14102         * Plugins/WebBaseNetscapePluginView.m:
14103         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
14104         * WebCoreSupport/WebFrameBridge.m:
14105         (-[WebFrameBridge originalRequestURL]):
14106         * WebView/WebDataSource.m:
14107         (-[WebDataSource _URL]):
14108         (-[WebDataSource dealloc]):
14109         (-[WebDataSource initialRequest]):
14110         (-[WebDataSource unreachableURL]):
14111         * WebView/WebFrame.m:
14112         (-[WebFrame _loadItem:withLoadType:]):
14113         (-[WebFrame _prepareForDataSourceReplacement]):
14114         (-[WebFrame provisionalDataSource]):
14115         (-[WebFrame dataSource]):
14116         (-[WebFrame _makeDocumentView]):
14117         (-[WebFrame _updateHistoryForReload]):
14118         (-[WebFrame _updateHistoryForStandardLoad]):
14119         (-[WebFrame _updateHistoryForInternalLoad]):
14120         (-[WebFrame _forceLayoutForNonHTML]):
14121         (-[WebFrame _clearLoadingFromPageCacheForDocumentLoader:]):
14122         (-[WebFrame _isDocumentLoaderLoadingFromPageCache:]):
14123         (-[WebFrame _archivedSubresourceForURL:fromDocumentLoader:]):
14124         (-[WebFrame _makeRepresentationForDocumentLoader:]):
14125
14126 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
14127
14128         Reviewed by Darin.
14129
14130         - removed need for WebFrameLoader to now about WebDocumentLoaderMac 
14131
14132         * Loader/WebFrameLoader.m:
14133         (-[WebFrameLoader loadDataSource:withLoadType:formState:]):
14134         * WebView/WebDocumentLoaderMac.h:
14135         * WebView/WebDocumentLoaderMac.m:
14136         (-[WebDocumentLoaderMac setFrameLoader:]):
14137         (-[WebDocumentLoaderMac detachFromFrameLoader]):
14138
14139 2006-10-09  Darin Adler  <darin@apple.com>
14140
14141         Reviewed by Maciej.
14142
14143         - passed calls that require WebScriptDebugServer across the client interface
14144
14145         * Loader/WebFrameLoader.m:
14146         (-[WebFrameLoader _finishedLoading]):
14147         (-[WebFrameLoader documentLoader:mainReceivedCompleteError:]):
14148         * Loader/WebFrameLoaderClient.h:
14149         * WebView/WebFrame.m:
14150         (-[WebFrame _dispatchDidLoadMainResourceForDocumentLoader:]):
14151
14152 2006-10-08  Darin Adler  <darin@apple.com>
14153
14154         Reviewed by Maciej.
14155
14156         - passed calls that require WebHTMLView or WebFrameView calls across
14157           the client interface
14158
14159         * Loader/WebFrameLoader.h:
14160         * Loader/WebFrameLoader.m:
14161         (isCaseInsensitiveEqual):
14162         (isBackForwardLoadType):
14163         (-[WebFrameLoader opened]):
14164         (-[WebFrameLoader cancelledErrorWithRequest:]):
14165         (-[WebFrameLoader fileDoesNotExistErrorWithResponse:]):
14166         (-[WebFrameLoader reload]):
14167         (-[WebFrameLoader transitionToCommitted:]):
14168         * Loader/WebFrameLoaderClient.h:
14169         * WebView/WebFrame.m:
14170         (-[WebFrame _forceLayout]):
14171         (-[WebFrame _setDocumentViewFromPageCache:]):
14172         (-[WebFrame _setCopiesOnScroll]):
14173
14174 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14175
14176         Reviewed by Darin.
14177         
14178         - pass remaining delegate methods across client interface
14179
14180         * Loader/WebFrameLoader.m:
14181         (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
14182         (-[WebFrameLoader checkNewWindowPolicyForRequest:action:frameName:formState:andCall:withSelector:]):
14183         (-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
14184         (-[WebFrameLoader handleUnimplementablePolicyWithErrorCode:forURL:]):
14185         (-[WebFrameLoader didFirstLayout]):
14186         (-[WebFrameLoader continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
14187         * Loader/WebFrameLoaderClient.h:
14188         * WebView/WebFrame.m:
14189         (-[WebFrame _dispatchDidFirstLayoutInFrame]):
14190         (-[WebFrame _dispatchCreateWebViewWithRequest:]):
14191         (-[WebFrame _dispatchShow]):
14192         (-[WebFrame _dispatchDecidePolicyForMIMEType:request:decisionListener:]):
14193         (-[WebFrame _dispatchDecidePolicyForNewWindowAction:request:newFrameName:decisionListener:]):
14194         (-[WebFrame _dispatchDecidePolicyForNavigationAction:request:decisionListener:]):
14195         (-[WebFrame _dispatchUnableToImplementPolicyWithError:]):
14196
14197 2006-10-08  Darin Adler  <darin@apple.com>
14198
14199         Reviewed by Maciej.
14200
14201         - use WebCoreSystemInterface instead of WebSystemInterface in Loader directory
14202
14203         * Loader/WebFrameLoader.m: Update includes.
14204         (-[WebFrameLoader commitProvisionalLoad:]): Use wk calls istead of WK.
14205         (-[WebFrameLoader _canUseResourceWithResponse:]): Ditto.
14206
14207         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
14208         Added the three new symbols, and resorted the list.
14209
14210         * Loader/WebDataProtocol.m:
14211         * Loader/WebLoader.m:
14212         * Loader/WebMainResourceLoader.h:
14213         * Loader/WebMainResourceLoader.m:
14214         * Loader/WebNetscapePlugInStreamLoader.h:
14215         * Loader/WebNetscapePlugInStreamLoader.m:
14216         * Loader/WebSubresourceLoader.h:
14217         * Loader/WebSubresourceLoader.m:
14218         Changed import statements to consistently use the "" format.
14219
14220 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14221
14222         Not reviewed.
14223         
14224         - fix accidental build break due to editing while committing
14225
14226         * Loader/WebFrameLoader.m:
14227
14228 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14229
14230         Reviewed by Darin.
14231         
14232         - move all WebFrameLoadDelegate methods across client interface
14233
14234         * Loader/WebFrameLoader.m:
14235         (-[WebFrameLoader clientRedirectCancelledOrFinished:]):
14236         (-[WebFrameLoader clientRedirectedTo:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
14237         (-[WebFrameLoader continueFragmentScrollAfterNavigationPolicy:formState:]):
14238         (-[WebFrameLoader closeOldDataSources]):
14239         (-[WebFrameLoader _notifyIconChanged:]):
14240         (-[WebFrameLoader prepareForLoadStart]):
14241         (-[WebFrameLoader didChangeTitleForDocument:]):
14242         (-[WebFrameLoader transitionToCommitted:]):
14243         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
14244         * Loader/WebFrameLoaderClient.h:
14245         * WebView/WebFrame.m:
14246         (-[WebFrame _dispatchDidCancelClientRedirectForFrame]):
14247         (-[WebFrame _dispatchWillPerformClientRedirectToURL:delay:fireDate:]):
14248         (-[WebFrame _dispatchDidChangeLocationWithinPageForFrame]):
14249         (-[WebFrame _dispatchWillCloseFrame]):
14250         (-[WebFrame _dispatchDidReceiveIcon:]):
14251         (-[WebFrame _dispatchDidStartProvisionalLoadForFrame]):
14252         (-[WebFrame _dispatchDidReceiveTitle:]):
14253         (-[WebFrame _dispatchDidCommitLoadForFrame]):
14254         (-[WebFrame _dispatchDidFailProvisionalLoadWithError:]):
14255         (-[WebFrame _dispatchDidFailLoadWithError:]):
14256         (-[WebFrame _dispatchDidFinishLoadForFrame]):
14257
14258 2006-10-08  Darin Adler  <darin@apple.com>
14259
14260         Reviewed by Maciej.
14261
14262         - removed some of the WebKit dependencies in WebFrameLoader
14263
14264         * Loader/WebFrameLoader.m:
14265         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14266         (-[WebFrameLoader _downloadWithLoadingConnection:request:response:proxy:]):
14267         (-[WebFrameLoader reload]):
14268         (-[WebFrameLoader didChangeTitleForDocument:]):
14269         * Loader/WebFrameLoaderClient.h:
14270         * WebView/WebFrame.m:
14271         (-[WebFrame _loadItem:withLoadType:]):
14272         (-[WebFrame _loadURL:referrer:intoChild:]):
14273         (-[WebFrame _setTitle:forURL:]):
14274         (-[WebFrame _downloadWithLoadingConnection:request:response:proxy:]):
14275         * WebView/WebFrameInternal.h:
14276
14277         - some other tweaks
14278
14279         * Misc/WebNSURLRequestExtras.m:
14280         (-[NSMutableURLRequest _web_setHTTPReferrer:]):
14281         (-[NSMutableURLRequest _web_setHTTPUserAgent:]):
14282
14283 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14284
14285         Reviewed by Darin.
14286         
14287         - pass all WebResourceLoadDelegate methods across client, removing need to include related headers
14288
14289         * Loader/WebFrameLoader.m:
14290         (-[WebFrameLoader _willSendRequest:forResource:redirectResponse:]):
14291         (-[WebFrameLoader _didReceiveAuthenticationChallenge:forResource:]):
14292         (-[WebFrameLoader _didCancelAuthenticationChallenge:forResource:]):
14293         (-[WebFrameLoader _didReceiveResponse:forResource:]):
14294         (-[WebFrameLoader _didReceiveData:contentLength:forResource:]):
14295         (-[WebFrameLoader _didFinishLoadingForResource:]):
14296         (-[WebFrameLoader _didFailLoadingWithError:forResource:]):
14297         (-[WebFrameLoader sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
14298         (-[WebFrameLoader requestFromDelegateForRequest:identifier:error:]):
14299         * Loader/WebFrameLoaderClient.h:
14300         * WebView/WebFrame.m:
14301         (-[WebFrame _dispatchDidHandleOnloadEventsForFrame]):
14302         (-[WebFrame _dispatchDidReceiveServerRedirectForProvisionalLoadForFrame]):
14303         (-[WebFrame _dispatchIdentifierForInitialRequest:fromDocumentLoader:]):
14304         (-[WebFrame _dispatchResource:willSendRequest:redirectResponse:fromDocumentLoader:]):
14305         (-[WebFrame _dispatchDidReceiveAuthenticationChallenge:forResource:fromDocumentLoader:]):
14306         (-[WebFrame _dispatchDidCancelAuthenticationChallenge:forResource:fromDocumentLoader:]):
14307         (-[WebFrame _dispatchResource:didReceiveResponse:fromDocumentLoader:]):
14308         (-[WebFrame _dispatchResource:didReceiveContentLength:fromDocumentLoader:]):
14309         (-[WebFrame _dispatchResource:didFinishLoadingFromDocumentLoader:]):
14310         (-[WebFrame _dispatchResource:didFailLoadingWithError:fromDocumentLoader:]):
14311
14312 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14313
14314         Reviewed by Darin.
14315         
14316         - started adding some _dispatch methods to WebFrameLoaderClient for delegate dispatch
14317
14318         * Loader/WebFrameLoader.m:
14319         (-[WebFrameLoader startLoading]):
14320         (-[WebFrameLoader didReceiveServerRedirectForProvisionalLoadForFrame]):
14321         * Loader/WebFrameLoaderClient.h:
14322         * WebCoreSupport/WebFrameBridge.m:
14323         (-[WebFrameBridge handledOnloadEvents]):
14324         * WebView/WebFrame.m:
14325         (dataSource):
14326         (-[WebFrame _dataSourceForDocumentLoader:]):
14327         (-[WebFrame _dispatchDidHandleOnloadEventsForFrame]):
14328         (-[WebFrame _dispatchDidReceiveServerRedirectForProvisionalLoadForFrame]):
14329         (-[WebFrame _dispatchIdentifierForInitialRequest:fromDocumentLoader:]):
14330         * WebView/WebFrameInternal.h:
14331
14332 2006-10-08  Darin Adler  <darin@apple.com>
14333
14334         Reviewed by Maciej.
14335
14336         - moved more methods to WebFrameLoader from WebFrame
14337
14338         * Loader/WebFrameLoader.h:
14339         * Loader/WebFrameLoader.m:
14340         (-[WebFrameLoader defersCallbacksChanged]):
14341         (-[WebFrameLoader startLoadingMainResourceWithRequest:identifier:]):
14342         (-[WebFrameLoader setState:]):
14343         (-[WebFrameLoader clearProvisionalLoad]):
14344         (-[WebFrameLoader markLoadComplete]):
14345         (-[WebFrameLoader commitProvisionalLoad]):
14346         (-[WebFrameLoader stopLoading]):
14347         (-[WebFrameLoader startProvisionalLoad:]):
14348         (-[WebFrameLoader setupForReplace]):
14349         (-[WebFrameLoader _identifierForInitialRequest:]):
14350         (-[WebFrameLoader _finishedLoadingResource]):
14351         (-[WebFrameLoader _receivedError:]):
14352         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14353         (-[WebFrameLoader continueFragmentScrollAfterNavigationPolicy:formState:]):
14354         (-[WebFrameLoader opened]):
14355         (-[WebFrameLoader commitProvisionalLoad:]):
14356         (-[WebFrameLoader _finishedLoading]):
14357         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
14358         (-[WebFrameLoader _loadRequest:archive:]):
14359         (-[WebFrameLoader reload]):
14360         (-[WebFrameLoader documentLoader:mainReceivedCompleteError:]):
14361         (-[WebFrameLoader subframeIsLoading]):
14362         (-[WebFrameLoader checkNewWindowPolicyForRequest:action:frameName:formState:andCall:withSelector:]):
14363         (-[WebFrameLoader continueAfterNewWindowPolicy:]):
14364         (-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
14365         (-[WebFrameLoader sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
14366         (-[WebFrameLoader loadRequest:inFrameNamed:]):
14367         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14368         (-[WebFrameLoader detachChildren]):
14369         (-[WebFrameLoader detachFromParent]):
14370         (-[WebFrameLoader addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
14371         (-[WebFrameLoader safeLoadURL:]):
14372         (-[WebFrameLoader actionInformationForLoadType:isFormSubmission:event:originalURL:]):
14373         (-[WebFrameLoader actionInformationForNavigationType:event:originalURL:]):
14374         (-[WebFrameLoader checkLoadComplete]):
14375         * Loader/WebFrameLoaderClient.h:
14376         * Loader/WebSubresourceLoader.m:
14377         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]):
14378         * WebCoreSupport/WebFrameBridge.m:
14379         (-[WebFrameBridge close]):
14380         (-[WebFrameBridge tokenizerProcessedData]):
14381         (-[WebFrameBridge frameDetached]):
14382         * WebView/WebDataSourceInternal.h:
14383         * WebView/WebFrame.m:
14384         (-[WebFrame _loadItem:withLoadType:]):
14385         (-[WebFrame _prepareForDataSourceReplacement]):
14386         (-[WebFrame _detachedFromParent1]):
14387         (-[WebFrame _detachedFromParent2]):
14388         (-[WebFrame _detachedFromParent3]):
14389         (-[WebFrame _detachedFromParent4]):
14390         (-[WebFrame _updateHistoryAfterClientRedirect]):
14391         (-[WebFrame _loadedFromPageCache]):
14392         * WebView/WebFrameInternal.h:
14393         * WebView/WebPDFView.m:
14394         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
14395         * WebView/WebView.m:
14396         (-[WebView _close]):
14397         (-[WebView setDefersCallbacks:]):
14398
14399 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14400
14401         Reviewed by Darin.
14402         
14403         - avoid need for WebKitSystemInterface in loader code, via WebCore cover for wkSupportsMultipartXMixedReplace
14404
14405         * Loader/WebDocumentLoader.m:
14406         (-[WebDocumentLoader initWithRequest:]):
14407         * Loader/WebMainResourceLoader.m:
14408         * Loader/WebSubresourceLoader.m:
14409         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]):
14410         * WebCoreSupport/WebSystemInterface.m:
14411         (InitWebCoreSystemInterface):
14412         * WebView/WebDataSource.m:
14413         (-[WebDataSource _initWithDocumentLoader:]):
14414
14415 2006-10-08  Darin Adler  <darin@apple.com>
14416
14417         - build fix (also a fix for a crasher I forgot to commit before)
14418
14419         * Loader/WebFrameLoader.m: Added some missing includes.
14420         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
14421         Added a needed retain/release.
14422
14423 2006-10-08  Darin Adler  <darin@apple.com>
14424
14425         Reviewed by Anders.
14426         
14427         - quick fix to loader problem causing layout test failures
14428
14429         * Loader/WebFrameLoader.m:
14430         (-[WebFrameLoader _finishedLoading]): Use a local variable for the bridge
14431         that we retain/release.
14432         (-[WebFrameLoader continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
14433         Same here.
14434
14435 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14436
14437         Reviewed by Adam.
14438         
14439         - removed a few includes from WebFrameLoader, fixed up as appropriate
14440         - segregated header includes into ones that need to go away to move the code and ones that don't
14441
14442         * Loader/WebFrameLoader.m:
14443         (-[WebFrameLoader _privateBrowsingEnabled]):
14444         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
14445         * Loader/WebFrameLoaderClient.h:
14446         * WebView/WebFrame.m:
14447         (-[WebFrame _privateBrowsingEnabled]):
14448
14449 2006-10-08  Darin Adler  <darin@apple.com>
14450
14451         Reviewed by Maciej.
14452
14453         - moved a few methods from WebFrame to WebFrameLoader
14454
14455         * Loader/WebFrameLoader.h:
14456         * Loader/WebFrameLoader.m:
14457         (-[WebFrameLoader _setState:]):
14458         (-[WebFrameLoader stopLoadingSubframes]):
14459         (-[WebFrameLoader _receivedMainResourceError:complete:]):
14460         (-[WebFrameLoader closeOldDataSources]):
14461         (-[WebFrameLoader commitProvisionalLoad:]):
14462         (-[WebFrameLoader _finishedLoading]):
14463         (isBackForwardLoadType):
14464         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14465         (-[WebFrameLoader didFirstLayout]):
14466         (-[WebFrameLoader frameLoadCompleted]):
14467         (-[WebFrameLoader transitionToCommitted:]):
14468         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
14469         (-[WebFrameLoader continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
14470         (-[WebFrameLoader sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
14471         (-[WebFrameLoader requestFromDelegateForRequest:identifier:error:]):
14472         (-[WebFrameLoader loadRequest:inFrameNamed:]):
14473         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14474         * Loader/WebFrameLoaderClient.h:
14475         * Plugins/WebPluginController.m:
14476         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
14477         * WebCoreSupport/WebFrameBridge.h:
14478         * WebCoreSupport/WebFrameBridge.m:
14479         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
14480         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
14481         (-[WebFrameBridge dealloc]):
14482         (-[WebFrameBridge frameLoader]):
14483         (-[WebFrameBridge setTitle:]):
14484         (-[WebFrameBridge receivedData:textEncodingName:]):
14485         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
14486         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
14487         (-[WebFrameBridge objectLoadedFromCacheWithURL:response:data:]):
14488         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
14489         (-[WebFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
14490         (-[WebFrameBridge reportClientRedirectCancelled:]):
14491         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
14492         (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14493         (-[WebFrameBridge didFirstLayout]):
14494         (-[WebFrameBridge notifyIconChanged:]):
14495         (-[WebFrameBridge originalRequestURL]):
14496         (-[WebFrameBridge isLoadTypeReload]):
14497         * WebView/WebFrame.m:
14498         (-[WebFrame _opened]):
14499         (-[WebFrame _checkLoadComplete]):
14500         (-[WebFrame _loadItem:withLoadType:]):
14501         (-[WebFrame _actionInformationForLoadType:isFormSubmission:event:originalURL:]):
14502         (-[WebFrame _loadURL:referrer:intoChild:]):
14503         (-[WebFrame _currentBackForwardListItemToResetTo]):
14504         (-[WebFrame _updateBackground]):
14505         (-[WebFrame _frameLoader]):
14506         (-[WebFrame _frameLoadCompleted]):
14507         (-[WebFrame _makeDocumentView]):
14508         (-[WebFrame _updateHistoryForCommit]):
14509         (-[WebFrame _updateHistoryForReload]):
14510         (-[WebFrame _updateHistoryForStandardLoad]):
14511         (-[WebFrame _updateHistoryForBackForwardNavigation]):
14512         (-[WebFrame _updateHistoryForInternalLoad]):
14513         (-[WebFrame _tokenForLoadErrorReset]):
14514         (-[WebFrame _resetAfterLoadError:]):
14515         (-[WebFrame _doNotResetAfterLoadError:]):
14516         * WebView/WebFrameInternal.h:
14517
14518 2006-10-09  Mark Rowe  <bdash@webkit.org>
14519
14520         Rubber-stamped by Darin.
14521
14522         * WebCoreSupport/WebFrameBridge.m:
14523         (-[WebFrameBridge imageTitleForFilename:size:]): Revert accidental change to a UI_STRING that
14524         is triggering an assertion failure.
14525
14526 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14527
14528         Reviewed by Darin.
14529         
14530         - remove unneeded non-Loader header includes from WebFrameLoader.h (split WebFrameLoadType into
14531         two coincidentally matching enums)
14532
14533         * Loader/WebFrameLoader.h:
14534         * Loader/WebFrameLoader.m:
14535         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14536         (-[WebFrameLoader commitProvisionalLoad:]):
14537         (isBackForwardLoadType):
14538         (-[WebFrameLoader _loadRequest:archive:]):
14539         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
14540         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
14541         (-[WebFrameLoader reload]):
14542         (-[WebFrameLoader isReplacing]):
14543         (-[WebFrameLoader setReplacing]):
14544         (-[WebFrameLoader loadType]):
14545         (-[WebFrameLoader setLoadType:]):
14546         (-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
14547         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14548         (-[WebFrameLoader loadDataSource:withLoadType:formState:]):
14549         (-[WebFrameLoader didFirstLayout]):
14550         * WebCoreSupport/WebFrameBridge.m:
14551         * WebView/WebFrame.m:
14552         (-[WebFrame _transitionToCommitted:]):
14553         (-[WebFrame _provisionalLoadStarted]):
14554         (-[WebFrame _opened]):
14555         (-[WebFrame _checkLoadCompleteForThisFrame]):
14556         (-[WebFrame _loadItem:withLoadType:]):
14557         (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
14558         (-[WebFrame _goToItem:withLoadType:]):
14559         (-[WebFrame _actionInformationForLoadType:isFormSubmission:event:originalURL:]):
14560         (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
14561         (-[WebFrame _loadURL:referrer:intoChild:]):
14562         (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14563         (-[WebFrame _currentBackForwardListItemToResetTo]):
14564         (-[WebFrame _itemForRestoringDocState]):
14565         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
14566         (-[WebFrame _loadType]):
14567         (-[WebFrame loadRequest:]):
14568         * WebView/WebFrameInternal.h:
14569         * WebView/WebView.m:
14570
14571 2006-10-08  Darin Adler  <darin@apple.com>
14572
14573         Reviewed by Maciej.
14574
14575         - move WebFrameLoader creation and ownership from WebFrame to WebFrameBridge
14576
14577         * Loader/WebFrameLoader.m:
14578         (-[WebFrameLoader stopLoadingSubframes]):
14579         (-[WebFrameLoader closeOldDataSources]):
14580         * WebCoreSupport/WebFrameBridge.h:
14581         * WebCoreSupport/WebFrameBridge.m:
14582         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
14583         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
14584         (-[WebFrameBridge dealloc]):
14585         (-[WebFrameBridge loader]):
14586         (-[WebFrameBridge setTitle:]):
14587         (-[WebFrameBridge receivedData:textEncodingName:]):
14588         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
14589         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
14590         (-[WebFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
14591         (-[WebFrameBridge reportClientRedirectCancelled:]):
14592         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
14593         (-[WebFrameBridge didFirstLayout]):
14594         (-[WebFrameBridge imageTitleForFilename:size:]):
14595         (-[WebFrameBridge notifyIconChanged:]):
14596         (-[WebFrameBridge originalRequestURL]):
14597         (-[WebFrameBridge isLoadTypeReload]):
14598         * WebView/WebFrame.m:
14599         (-[NSView setWebFrame::]):
14600         (-[WebFramePrivate dealloc]):
14601         (-[WebFramePrivate setWebFrameView:]):
14602         (-[WebFramePrivate setProvisionalItem:]):
14603         (-[WebFrame _webDataRequestForData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
14604         (-[WebFrame _createItem:]):
14605         (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):
14606         (-[WebFrame _detachFromParent]):
14607         (-[WebFrame _makeDocumentView]):
14608         (-[WebFrame _transitionToCommitted:]):
14609         (-[WebFrame _provisionalLoadStarted]):
14610         (-[WebFrame _opened]):
14611         (-[WebFrame _checkLoadCompleteForThisFrame]):
14612         (-[WebFrame _loadItem:withLoadType:]):
14613         (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
14614         (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
14615         (-[WebFrame _loadURL:referrer:intoChild:]):
14616         (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14617         (-[WebFrame _setTitle:]):
14618         (-[WebFrame _defersCallbacksChanged]):
14619         (-[WebFrame _currentBackForwardListItemToResetTo]):
14620         (-[WebFrame _itemForSavingDocState]):
14621         (-[WebFrame _itemForRestoringDocState]):
14622         (-[WebFrame _saveDocumentAndScrollState]):
14623         (-[WebFrame _shouldTreatURLAsSameAsCurrent:]):
14624         (-[WebFrame _loadRequest:inFrameNamed:]):
14625         (-[WebFrame _initWithWebFrameView:webView:bridge:]):
14626         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
14627         (-[WebFrame _frameLoader]):
14628         (-[WebFrame _prepareForDataSourceReplacement]):
14629         (-[WebFrame _restoreScrollPositionAndViewState]):
14630         (-[WebFrame _firstLayoutDone]):
14631         (-[WebFrame _loadType]):
14632         (-[WebFrame frameView]):
14633         (-[WebFrame provisionalDataSource]):
14634         (-[WebFrame dataSource]):
14635         (-[WebFrame loadRequest:]):
14636         (-[WebFrame loadArchive:]):
14637         (-[WebFrame stopLoading]):
14638         (-[WebFrame reload]):
14639         (-[WebFrame _resetBackForwardList]):
14640         (-[WebFrame _invalidateCurrentItemPageCache]):
14641         (-[WebFrame _provisionalItemIsTarget]):
14642         (-[WebFrame _loadProvisionalItemFromPageCache]):
14643         * WebView/WebFrameInternal.h:
14644
14645 2006-10-08  Maciej Stachowiak  <mjs@apple.com>
14646
14647         Reviewed by Darin.
14648         
14649         - move remaining movable data fields from WebFrameLoader to WebFrame
14650
14651         * Loader/WebDocumentLoadState.m:
14652         (-[WebDocumentLoadState commitIfReady]):
14653         * Loader/WebFrameLoader.h:
14654         * Loader/WebFrameLoader.m:
14655         (-[WebFrameLoader provisionalLoadStarted]):
14656         (-[WebFrameLoader _setState:]):
14657         (-[WebFrameLoader stopLoadingSubframes]):
14658         (-[WebFrameLoader stopLoading]):
14659         (-[WebFrameLoader startLoading]):
14660         (-[WebFrameLoader _receivedMainResourceError:complete:]):
14661         (-[WebFrameLoader clientRedirectCancelledOrFinished:]):
14662         (-[WebFrameLoader clientRedirectedTo:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
14663         (-[WebFrameLoader shouldReloadForCurrent:andDestination:]):
14664         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14665         (-[WebFrameLoader continueFragmentScrollAfterNavigationPolicy:formState:]):
14666         (-[WebFrameLoader closeOldDataSources]):
14667         (-[WebFrameLoader commitProvisionalLoad:]):
14668         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14669         (-[WebFrameLoader isQuickRedirectComing]):
14670         * Loader/WebFrameLoaderClient.h:
14671         * WebCoreSupport/WebFrameBridge.h:
14672         * WebCoreSupport/WebFrameBridge.m:
14673         (-[WebFrameBridge frameLoader]):
14674         (-[WebFrameBridge setTitle:]):
14675         (-[WebFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
14676         (-[WebFrameBridge reportClientRedirectCancelled:]):
14677         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
14678         * WebView/WebDataSource.m:
14679         (-[WebDataSource _loadFromPageCache:]):
14680         * WebView/WebFrame.m:
14681         (-[NSView setWebFrame::]):
14682         (-[WebFrame _addHistoryItemForFragmentScroll]):
14683         (-[WebFrame _didFinishLoad]):
14684         (-[WebFrame _provisionalLoadStarted]):
14685         (-[WebFrame _checkLoadCompleteForThisFrame]):
14686         (-[WebFrame _loadItem:withLoadType:]):
14687         (-[WebFrame _loadURL:referrer:intoChild:]):
14688         (-[WebFrame _frameLoadCompleted]):
14689         (-[WebFrame stopLoading]):
14690         (-[WebFrame _invalidateCurrentItemPageCache]):
14691         * WebView/WebFrameInternal.h:
14692
14693 2006-10-08  Darin Adler  <darin@apple.com>
14694
14695         Rubber stamped by Maciej.
14696
14697         - changed "document load state" to "document loader"
14698
14699         * Loader/WebDocumentLoadState.h: Removed.
14700         * Loader/WebDocumentLoadState.m: Removed.
14701         * Loader/WebDocumentLoader.h: Added.
14702         * Loader/WebDocumentLoader.m: Added.
14703         (-[WebDocumentLoader setMainDocumentError:]):
14704         (-[WebDocumentLoader mainReceivedError:complete:]):
14705         (-[WebDocumentLoader finishedLoading]):
14706         (-[WebDocumentLoader commitLoadWithData:]):
14707         (-[WebDocumentLoader setupForReplaceByMIMEType:]):
14708         (-[WebDocumentLoader updateLoading]):
14709         (-[WebDocumentLoader setTitle:]):
14710         * Loader/WebFrameLoader.h:
14711         * Loader/WebFrameLoader.m:
14712         (-[WebFrameLoader dealloc]):
14713         (-[WebFrameLoader activeDocumentLoader]):
14714         (-[WebFrameLoader activeDataSource]):
14715         (-[WebFrameLoader addPlugInStreamLoader:]):
14716         (-[WebFrameLoader removePlugInStreamLoader:]):
14717         (-[WebFrameLoader addSubresourceLoader:]):
14718         (-[WebFrameLoader removeSubresourceLoader:]):
14719         (-[WebFrameLoader dataSource]):
14720         (-[WebFrameLoader setDocumentLoader:]):
14721         (-[WebFrameLoader documentLoader]):
14722         (-[WebFrameLoader policyDataSource]):
14723         (-[WebFrameLoader setPolicyDocumentLoader:]):
14724         (-[WebFrameLoader clearDataSource]):
14725         (-[WebFrameLoader provisionalDataSource]):
14726         (-[WebFrameLoader provisionalDocumentLoader]):
14727         (-[WebFrameLoader setProvisionalDocumentLoader:]):
14728         (-[WebFrameLoader _clearProvisionalDataSource]):
14729         (-[WebFrameLoader _setState:]):
14730         (-[WebFrameLoader clearProvisionalLoad]):
14731         (-[WebFrameLoader commitProvisionalLoad]):
14732         (-[WebFrameLoader stopLoading]):
14733         (-[WebFrameLoader startLoading]):
14734         (-[WebFrameLoader startProvisionalLoad:]):
14735         (-[WebFrameLoader setupForReplace]):
14736         (-[WebFrameLoader _didReceiveResponse:forResource:]):
14737         (-[WebFrameLoader _originalRequest]):
14738         (-[WebFrameLoader _receivedMainResourceError:complete:]):
14739         (-[WebFrameLoader _receivedData:]):
14740         (-[WebFrameLoader _setRequest:]):
14741         (-[WebFrameLoader _isStopping]):
14742         (-[WebFrameLoader _setupForReplaceByMIMEType:]):
14743         (-[WebFrameLoader _setResponse:]):
14744         (-[WebFrameLoader _mainReceivedError:complete:]):
14745         (-[WebFrameLoader _finishedLoading]):
14746         (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
14747         (-[WebFrameLoader _loadRequest:archive:]):
14748         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
14749         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
14750         (-[WebFrameLoader reload]):
14751         (-[WebFrameLoader finishedLoadingDocument:]):
14752         (-[WebFrameLoader committedLoadWithDocumentLoader:data:]):
14753         (-[WebFrameLoader revertToProvisionalWithDocumentLoader:]):
14754         (-[WebFrameLoader documentLoader:setMainDocumentError:]):
14755         (-[WebFrameLoader documentLoader:mainReceivedCompleteError:]):
14756         (-[WebFrameLoader finalSetupForReplaceWithDocumentLoader:]):
14757         (-[WebFrameLoader willChangeTitleForDocument:]):
14758         (-[WebFrameLoader didChangeTitleForDocument:]):
14759         (-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
14760         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14761         (-[WebFrameLoader loadDataSource:withLoadType:formState:]):
14762         * Plugins/WebPluginController.m:
14763         (-[WebPluginController pluginView:receivedResponse:]):
14764         * WebCoreSupport/WebFrameBridge.m:
14765         (-[WebFrameBridge setTitle:]):
14766         (-[WebFrameBridge receivedData:textEncodingName:]):
14767         * WebKit.xcodeproj/project.pbxproj:
14768         * WebView/WebDataSource.m:
14769         (-[WebDataSourcePrivate dealloc]):
14770         (-[WebDataSource _mainDocumentError]):
14771         (-[WebDataSource _loadFromPageCache:]):
14772         (-[WebDataSource _bridge]):
14773         (-[WebDataSource _webView]):
14774         (-[WebDataSource _URLForHistory]):
14775         (-[WebDataSource _documentLoader]):
14776         (-[WebDataSource _initWithDocumentLoader:]):
14777         (-[WebDataSource initWithRequest:]):
14778         (-[WebDataSource dealloc]):
14779         (-[WebDataSource data]):
14780         (-[WebDataSource webFrame]):
14781         (-[WebDataSource initialRequest]):
14782         (-[WebDataSource request]):
14783         (-[WebDataSource response]):
14784         (-[WebDataSource textEncodingName]):
14785         (-[WebDataSource isLoading]):
14786         (-[WebDataSource unreachableURL]):
14787         (-[WebDataSource webArchive]):
14788         * WebView/WebDataSourceInternal.h:
14789         * WebView/WebDocumentLoadStateMac.h: Removed.
14790         * WebView/WebDocumentLoadStateMac.m: Removed.
14791         * WebView/WebDocumentLoaderMac.h: Added.
14792         * WebView/WebDocumentLoaderMac.m: Added.
14793         * WebView/WebFrame.m:
14794         (-[WebFrame _createItem:]):
14795         (-[WebFrame _receivedMainResourceError:]):
14796         (-[WebFrame _transitionToCommitted:]):
14797         (-[WebFrame _opened]):
14798         (-[WebFrame _checkLoadCompleteForThisFrame]):
14799         (-[WebFrame _loadItem:withLoadType:]):
14800         (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formState:]):
14801         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14802         (-[WebFrame _addChild:]):
14803         (-[WebFrame _provisionalLoadStarted]):
14804         (-[WebFrame _dataSourceForDocumentLoader:]):
14805         (-[WebFrame _createDocumentLoaderWithRequest:]):
14806         * WebView/WebFrameInternal.h:
14807         * WebView/WebHTMLRepresentation.m:
14808         (-[WebHTMLRepresentation title]):
14809         * WebView/WebView.m:
14810         (-[WebView _mainFrameOverrideEncoding]):
14811
14812 2006-10-08  Darin Adler  <darin@apple.com>
14813
14814         Reviewed by Mitz.
14815
14816         - fix http://bugs.webkit.org/show_bug.cgi?id=11218
14817           REGRESSION: Assertion failure in WebFrameLoader when going back from a file: or data: URL
14818
14819         Also added a helper function in WebFrameLoader so that checks for back/forward load types
14820         are easier to read.
14821
14822         * Loader/WebFrameLoader.m:
14823         (-[WebFrameLoader _setPolicyDocumentLoadState:]): Fixed line of code that was setting the load
14824         state to nil instead of the passed-in object.
14825         (isBackForwardLoadType): Added.
14826         (-[WebFrameLoader shouldReloadToHandleUnreachableURLFromRequest:]): Use isBackForwardLoadType.
14827         (-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
14828         Ditto.
14829         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]): Ditto.
14830
14831 2006-10-08  Darin Adler  <darin@apple.com>
14832
14833         Reviewed by Maciej.
14834
14835         - fix two recently introduced leaks: one of an NSString, the other of a WebDataSource
14836
14837         * Loader/WebDocumentLoadState.m: (-[WebDocumentLoadState setTitle:]):
14838         Rearranged code to avoid storage leak in case of identical title.
14839
14840         * Loader/WebFrameLoader.h: Removed _setPolicyDocumentLoadState: method
14841         from the header.
14842         * Loader/WebFrameLoader.m:
14843         (-[WebFrameLoader _setPolicyDocumentLoadState:]): Added logic to call detachFromFrameLoader
14844         as needed if this load state is going away rather than moving on to become the provisional
14845         load state.
14846         (-[WebFrameLoader shouldReloadToHandleUnreachableURLFromRequest:]): Tweaked formatting.
14847         (-[WebFrameLoader _loadRequest:archive:]): Added an assertion.
14848         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]): Added an assertion.
14849         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]): Added an assertion.
14850         (-[WebFrameLoader reload]): Added an assertion.
14851         (-[WebFrameLoader loadDataSource:withLoadType:formState:]): Added a local variable to avoid
14852         calling _documentLoadState over and over again.
14853
14854 2006-10-07  Peter Kasting  <pkasting@google.com>
14855
14856         Reviewed/landed by Adam.
14857
14858         http://bugs.webkit.org/show_bug.cgi?id=11199
14859         Update Session History when a load is committed rather than completed.
14860
14861         * COM/WebFrame.cpp:
14862         (WebFrame::receivedResponse):
14863         (WebFrame::receivedAllData):
14864
14865 2006-10-07  Sam Weinig  <sam.weinig@gmail.com>
14866
14867         Reviewed by Tim H.
14868
14869         Patch for http://bugs.webkit.org/show_bug.cgi?id=11198
14870         Auto-generate a few more Objective-C DOM interfaces
14871
14872         * MigrateHeaders.make:
14873
14874 2006-10-07  Mark Rowe  <bdash@webkit.org>
14875
14876         Reviewed by Mitz.
14877
14878         Fix memory leak from -[WebDocumentLoadState setTitle:].
14879
14880         * Loader/WebDocumentLoadState.m:
14881         (-[WebDocumentLoadState setTitle:]): Ensure 'trimmed' is released even when length is
14882         zero, and untangle the confusing logic around this case.
14883
14884 2006-10-06  Brady Eidson  <beidson@apple.com>
14885
14886         Reviewed by Darin
14887
14888         Refactored a whole bunch of WebFramePrivate.h SPI to WebFrameInternal
14889
14890         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
14891         * History/WebHistoryItem.m:
14892         * Loader/WebFrameLoader.h:
14893         * Misc/WebCoreStatistics.m:
14894         * Misc/WebElementDictionary.m:
14895         * Plugins/WebNetscapePluginEmbeddedView.m:
14896         * Plugins/WebPluginController.m:
14897         * WebCoreSupport/WebViewFactory.m:
14898         * WebView/WebArchiver.m:
14899         * WebView/WebDataSource.m:
14900         * WebView/WebFrame.m:
14901         (-[WebFrame _isDescendantOfFrame:]):
14902         (-[WebFrame _setShouldCreateRenderers:]):
14903         (-[WebFrame _bodyBackgroundColor]):
14904         (-[WebFrame _isFrameSet]):
14905         (-[WebFrame _firstLayoutDone]):
14906         (-[WebFrame _loadType]):
14907         * WebView/WebFrameInternal.h:
14908         * WebView/WebFramePrivate.h:
14909         * WebView/WebHTMLRepresentation.m:
14910         * WebView/WebScriptDebugDelegate.m:
14911
14912 2006-10-06  Maciej Stachowiak  <mjs@apple.com>
14913
14914         Reviewed by Darin.
14915         
14916         - Move all delegate dispatching code out of WebDataSource.
14917
14918         * Loader/WebFrameLoader.m:
14919         (-[WebFrameLoader startLoading]):
14920         (-[WebFrameLoader _identifierForInitialRequest:]):
14921         (-[WebFrameLoader _willSendRequest:forResource:redirectResponse:]):
14922         (-[WebFrameLoader _didReceiveAuthenticationChallenge:forResource:]):
14923         (-[WebFrameLoader _didCancelAuthenticationChallenge:forResource:]):
14924         (-[WebFrameLoader _didReceiveResponse:forResource:]):
14925         (-[WebFrameLoader _didReceiveData:contentLength:forResource:]):
14926         (-[WebFrameLoader _didFinishLoadingForResource:]):
14927         (-[WebFrameLoader _didFailLoadingWithError:forResource:]):
14928         (-[WebFrameLoader _receivedMainResourceError:complete:]):
14929         (-[WebFrameLoader _downloadWithLoadingConnection:request:response:proxy:]):
14930         (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
14931         * WebView/WebDataSource.m:
14932         (-[WebDataSource _setLoadingFromPageCache:]):
14933         (-[WebDataSource _stopLoadingWithError:]):
14934         * WebView/WebDataSourceInternal.h:
14935
14936 2006-10-06  Darin Adler  <darin@apple.com>
14937
14938         Reviewed by Maciej.
14939
14940         - moved firstLayoutDone BOOL from WebFrame to WebFrameLoader
14941
14942         * Loader/WebFrameLoader.h:
14943         * Loader/WebFrameLoader.m:
14944         (-[WebFrameLoader didFirstLayout]):
14945         (-[WebFrameLoader provisionalLoadStarted]):
14946         (-[WebFrameLoader frameLoadCompleted]):
14947         (-[WebFrameLoader firstLayoutDone]):
14948         * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge didFirstLayout]):
14949         * WebView/WebFrame.m:
14950         (-[WebFrame _firstLayoutDone]):
14951         (-[WebFrame _provisionalLoadStarted]):
14952         (-[WebFrame _frameLoadCompleted]):
14953         (-[WebFrame _restoreScrollPositionAndViewState]):
14954         * WebView/WebFrameInternal.h:
14955
14956 2006-10-06  Darin Adler  <darin@apple.com>
14957
14958         Reviewed by Maciej.
14959
14960         - moved more data and the corresponding code from WebFrame to WebFrameLoader
14961
14962         * Loader/WebFrameLoader.h:
14963         * Loader/WebFrameLoader.m:
14964         (-[WebFrameLoader cannotShowMIMETypeForURL:]):
14965         (-[WebFrameLoader _checkNavigationPolicyForRequest:andCall:withSelector:]):
14966         (-[WebFrameLoader shouldReloadToHandleUnreachableURLFromRequest:]):
14967         (-[WebFrameLoader _loadRequest:archive:]):
14968         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
14969         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
14970         (-[WebFrameLoader reload]):
14971         (-[WebFrameLoader invalidatePendingPolicyDecisionCallingDefaultAction:]):
14972         (-[WebFrameLoader checkNewWindowPolicyForRequest:action:frameName:formState:andCall:withSelector:]):
14973         (-[WebFrameLoader _continueAfterNewWindowPolicy:]):
14974         (-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
14975         (-[WebFrameLoader continueAfterNavigationPolicy:]):
14976         (-[WebFrameLoader continueAfterWillSubmitForm:]):
14977         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
14978         (-[WebFrameLoader loadDataSource:withLoadType:formState:]):
14979         (-[WebFrameLoader handleUnimplementablePolicyWithErrorCode:forURL:]):
14980         (-[WebFrameLoader delegateIsHandlingProvisionalLoadError]):
14981         (-[WebFrameLoader setDelegateIsHandlingProvisionalLoadError:]):
14982         * Loader/WebFrameLoaderClient.h:
14983         * WebView/WebFrame.m:
14984         (-[NSView setWebFrame::]):
14985         (-[WebFramePrivate dealloc]):
14986         (-[WebFrame _checkLoadCompleteForThisFrame]):
14987         (-[WebFrame _loadItem:withLoadType:]):
14988         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
14989         (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
14990         (-[WebFrame _loadRequest:inFrameNamed:]):
14991         (-[WebFrame stopLoading]):
14992         (-[WebFrame _resetBackForwardList]):
14993         (-[WebFrame _quickRedirectComing]):
14994         (-[WebFrame _provisionalItemIsTarget]):
14995         (-[WebFrame _loadProvisionalItemFromPageCache]):
14996         * WebView/WebFrameInternal.h:
14997         * WebView/WebFramePrivate.h:
14998
14999         * WebKit.xcodeproj/project.pbxproj:
15000
15001 2006-10-06  Maciej Stachowiak  <mjs@apple.com>
15002
15003         Rubber stamped by Darin.
15004         
15005         - removed includes of unused headers.
15006
15007         * WebView/WebDataSource.m:
15008
15009 2006-10-06  Maciej Stachowiak  <mjs@apple.com>
15010
15011         Not reviewed.
15012         
15013         - fix build breakage
15014
15015         * Loader/WebFrameLoader.m:
15016         (-[WebFrameLoader willChangeTitleForDocumentLoadState:]):
15017         (-[WebFrameLoader didChangeTitleForDocumentLoadState:]):
15018
15019 2006-10-06  Maciej Stachowiak  <mjs@apple.com>
15020
15021         Reviewed by Darin.
15022         
15023         - move remaining movable WebDataSource fields to WebDocumentLoadState
15024
15025         * Loader/WebDocumentLoadState.h:
15026         * Loader/WebDocumentLoadState.m:
15027         (-[WebDocumentLoadState dealloc]):
15028         (-[WebDocumentLoadState isLoadingInAPISense]):
15029         (-[WebDocumentLoadState addResponse:]):
15030         (-[WebDocumentLoadState stopRecordingResponses]):
15031         (-[WebDocumentLoadState title]):
15032         (-[WebDocumentLoadState setLastCheckedRequest:]):
15033         (-[WebDocumentLoadState lastCheckedRequest]):
15034         (-[WebDocumentLoadState triggeringAction]):
15035         (-[WebDocumentLoadState setTriggeringAction:]):
15036         (-[WebDocumentLoadState responses]):
15037         (-[WebDocumentLoadState setOverrideEncoding:]):
15038         (-[WebDocumentLoadState overrideEncoding]):
15039         (-[WebDocumentLoadState setTitle:]):
15040         * Loader/WebFrameLoader.h:
15041         * Loader/WebFrameLoader.m:
15042         (-[WebFrameLoader _setState:]):
15043         (-[WebFrameLoader _loadRequest:archive:]):
15044         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
15045         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
15046         (-[WebFrameLoader reload]):
15047         (-[WebFrameLoader willChangeTitleForDocumentLoadState:]):
15048         (-[WebFrameLoader didChangeTitleForDocumentLoadState:]):
15049         * WebCoreSupport/WebFrameBridge.m:
15050         (-[WebFrameBridge setTitle:]):
15051         (-[WebFrameBridge receivedData:textEncodingName:]):
15052         * WebView/WebDataSource.m:
15053         (-[WebDataSourcePrivate dealloc]):
15054         (-[WebDataSource _didReceiveResponse:forResource:]):
15055         (-[WebDataSource textEncodingName]):
15056         * WebView/WebDataSourceInternal.h:
15057         * WebView/WebFrame.m:
15058         (-[WebFrame _opened]):
15059         (-[WebFrame _checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
15060         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
15061         (-[WebFrame _addChild:]):
15062         (-[WebFrame _loadDataSource:withLoadType:formState:]):
15063         * WebView/WebHTMLRepresentation.m:
15064         (-[WebHTMLRepresentation title]):
15065         * WebView/WebView.m:
15066         (-[WebView _mainFrameOverrideEncoding]):
15067
15068 2006-10-06  Darin Adler  <darin@apple.com>
15069
15070         Reviewed by Maciej.
15071
15072         - moved loadType into WebFrameLoader
15073
15074         * WebView/WebFramePrivate.h: Removed _setLoadType, but not _loadType because it's
15075         currently used by Safari.
15076
15077         * Loader/WebFrameLoader.h:
15078         * Loader/WebFrameLoader.m:
15079         (-[WebFrameLoader _loadRequest:archive:]):
15080         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
15081         (-[WebFrameLoader isReplacing]):
15082         (-[WebFrameLoader setReplacing]):
15083         (-[WebFrameLoader loadType]):
15084         (-[WebFrameLoader setLoadType:]):
15085         * WebCoreSupport/WebFrameBridge.m:
15086         (-[WebFrameBridge isLoadTypeReload]):
15087         * WebView/WebFrame.m:
15088         (-[WebFrame _loadType]):
15089         (-[WebFrame _transitionToCommitted:]):
15090         (-[WebFrame _commitProvisionalLoad:]):
15091         (-[WebFrame _opened]):
15092         (-[WebFrame _checkLoadCompleteForThisFrame]):
15093         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
15094         (-[WebFrame _loadURL:referrer:intoChild:]):
15095         (-[WebFrame _currentBackForwardListItemToResetTo]):
15096         (-[WebFrame _itemForRestoringDocState]):
15097         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
15098         (-[WebFrame _didFirstLayout]):
15099         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
15100         (-[WebFrame _provisionalLoadStarted]):
15101         (-[WebFrame loadRequest:]):
15102
15103 2006-10-06  Darin Adler  <darin@apple.com>
15104
15105         Reviewed by Maciej.
15106
15107         - added WebFrameLoaderClient protocol -- to be used to make WebFrameLoader forget all about WebFrame
15108
15109         * Loader/WebDocumentLoadState.h: Added comment about Maciej's planned renaming here.
15110         * Loader/WebFrameLoader.h:
15111         * Loader/WebFrameLoader.m: Renamed webFrame to client and added the new protocol.
15112         Eventually we'll be removing the dependency on WebFrame entirely.
15113         * WebView/WebFrame.m: (-[WebFrame _initWithWebFrameView:webView:bridge:]): Update to call the method
15114         by its new name.
15115
15116         * Loader/WebFrameLoaderClient.h: Added.
15117         * WebKit.xcodeproj/project.pbxproj: Updated for new file, sorted things.
15118
15119 2006-10-06  Maciej Stachowiak  <mjs@apple.com>
15120
15121         Reviewed by Darin.
15122         
15123         - segregate WebFrame methods into ones that should be moved into WebFrameLoader and ones that don't need to
15124         
15125         Also removed useless WebFrameLoader part
15126
15127         * WebView/WebFrame.m:
15128         (-[WebFramePrivate dealloc]): 
15129
15130 2006-10-06  Maciej Stachowiak  <mjs@apple.com>
15131
15132         Reviewed by Anders.
15133         
15134         - moved more data from WebDataSource to WebDocumentLoadState
15135
15136         * Loader/WebDocumentLoadState.h:
15137         * Loader/WebDocumentLoadState.m:
15138         (-[WebDocumentLoadState commitLoadWithData:]):
15139         (-[WebDocumentLoadState prepareForLoadStart]):
15140         (-[WebDocumentLoadState loadingStartedTime]):
15141         (-[WebDocumentLoadState setIsClientRedirect:]):
15142         (-[WebDocumentLoadState isClientRedirect]):
15143         (-[WebDocumentLoadState setPrimaryLoadComplete:]):
15144         (-[WebDocumentLoadState isLoadingInAPISense]):
15145         * Loader/WebFrameLoader.h:
15146         * Loader/WebFrameLoader.m:
15147         (-[WebFrameLoader _setState:]):
15148         (-[WebFrameLoader _finishedLoading]):
15149         (-[WebFrameLoader documentLoadState:mainReceivedCompleteError:]):
15150         (-[WebFrameLoader prepareForLoadStart]):
15151         (-[WebFrameLoader subframeIsLoading]):
15152         * WebView/WebDataSource.m:
15153         (-[WebDataSource _fileWrapperForURL:]):
15154         (-[WebDataSource _startLoading]):
15155         (-[WebDataSource _loadFromPageCache:]):
15156         (-[WebDataSource isLoading]):
15157         * WebView/WebDataSourceInternal.h:
15158         * WebView/WebFrame.m:
15159         (-[WebFrame _transitionToCommitted:]):
15160         (-[WebFrame _opened]):
15161         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
15162
15163 2006-10-06  Alexey Proskuryakov  <ap@nypop.com>
15164
15165         Reviewed by Darin.
15166
15167         http://bugs.webkit.org/show_bug.cgi?id=11183
15168         REGRESSION: Safari loads error pages unstyled
15169
15170         * WebView/WebFrame.m:
15171         (-[WebFrame _loadHTMLString:baseURL:unreachableURL:]):
15172         Use utf-8 encoding instead of the string's "fastest" encoding.
15173
15174 2006-10-06  Maciej Stachowiak  <mjs@apple.com>
15175
15176         Reviewed by Adam.
15177         
15178         - fixed the following bugs:
15179         
15180         http://bugs.webkit.org/show_bug.cgi?id=11136
15181         "REGRESSION: Safari snippet editor doesn't work"
15182         http://bugs.webkit.org/show_bug.cgi?id=11140
15183         "REGRESSION: view source window blank"
15184         http://bugs.webkit.org/show_bug.cgi?id=11146
15185         "REGRESSION: Instead of showing the error page, Safari opens its Resources folder in the Finder"
15186         
15187         Possibly more.
15188
15189         * Loader/WebDocumentLoadState.h:
15190         * Loader/WebDocumentLoadState.m:
15191         (-[WebDocumentLoadState actualRequest]): New method.
15192         * WebView/WebDataSource.m:
15193         (-[WebDataSource _startLoading]): We need to make sure not to start loading the main
15194         resource with the fake external request for an applewebdata: request.
15195
15196 2006-10-05  Adele Peterson  <adele@apple.com>
15197
15198         Reviewed by the letter 'B'.
15199
15200         More build fixes.
15201
15202         * WebKit.xcodeproj/project.pbxproj:
15203         * WebView/WebDynamicScrollBarsView.h:
15204         * WebView/WebDynamicScrollBarsView.m:
15205         (-[WebDynamicScrollBarsView updateScrollers]):
15206         (-[WebDynamicScrollBarsView setAllowsScrolling:]):
15207         (-[WebDynamicScrollBarsView allowsScrolling]):
15208         (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]):
15209         (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]):
15210         (-[WebDynamicScrollBarsView allowsHorizontalScrolling]):
15211         (-[WebDynamicScrollBarsView allowsVerticalScrolling]):
15212         (-[WebDynamicScrollBarsView horizontalScrollingMode]):
15213         (-[WebDynamicScrollBarsView verticalScrollingMode]):
15214         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
15215         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
15216         (-[WebDynamicScrollBarsView setScrollingMode:]):
15217         * WebView/WebView.m:
15218         (-[WebView setAlwaysShowVerticalScroller:]):
15219         (-[WebView alwaysShowVerticalScroller]):
15220         (-[WebView setAlwaysShowHorizontalScroller:]):
15221         (-[WebView alwaysShowHorizontalScroller]):
15222
15223 2006-10-05  Vladimir Olexa  <vladimir.olexa@gmail.com>
15224
15225         Reviewed by Timothy.
15226
15227         Bug: http://bugs.webkit.org/show_bug.cgi?id=9887
15228         Continuous spell checking now remembers user's setting. The change is applied globally,
15229         meaning, both TextArea and TextField are affected when either of them enables/disables
15230         spell checking. 
15231
15232         * WebView/WebPreferenceKeysPrivate.h: added a define for WebContinuousSpellCheckingEnabled
15233         * WebView/WebView.m:
15234         (-[WebViewPrivate init]): reads WebContinuousSpellCheckingEnabled from NSUserDefaults
15235         (-[WebView setContinuousSpellCheckingEnabled:]):
15236         (-[WebView isContinuousSpellCheckingEnabled]):
15237
15238 2006-10-05  MorganL  <morganl.webkit@yahoo.com>
15239
15240         Reviewed by Darin.
15241
15242         Fixes http://bugs.webkit.org/show_bug.cgi?id=11162
15243
15244         * COM/WebFrame.cpp:
15245         (WebFrame::loadDataSource):
15246         (WebFrame::receivedResponse):
15247
15248 2006-10-05  Peter Kasting  <pkasting@google.com>
15249
15250         Reviewed by Darin, landed by Adam.
15251
15252         http://bugs.webkit.org/show_bug.cgi?id=11176
15253         Fix win32 build, adapt to Maciej's ResourceLoader changes.
15254
15255         * COM/WebFrame.cpp:
15256         (WebFrame::loadDataSource):
15257
15258 2006-10-05  Marvin Decker  <marv.decker@gmail.com>
15259
15260         Reviewed by Darin.
15261
15262         http://bugs.webkit.org/show_bug.cgi?id=10989
15263         Provide a way for embedders to implement BrowserExtensionWin
15264
15265         * COM/Interfaces/IWebUIDelegate.idl:
15266         * COM/WebFrame.cpp:
15267         (WebFrame::createNewWindow):
15268         * COM/WebFrame.h:
15269
15270 2006-10-04  Mark Rowe  <bdash@webkit.org>
15271
15272         Reviewed by NOBODY (build fix).
15273
15274         * WebView/WebView.m:
15275         (-[WebView scrollDOMRangeToVisible:]): Move scrollDOMRangeToVisible: into the correct category.
15276
15277 2006-09-26  David Smith  <catfish.man@gmail.com>
15278
15279         Reviewed by Timothy.
15280
15281         http://bugs.webkit.org/show_bug.cgi?id=3723
15282         Add -scrollDOMRangeToVisible:
15283
15284         * WebView/WebView.m:
15285         (-[WebView scrollDOMRangeToVisible:]):
15286         * WebView/WebViewPrivate.h:
15287
15288 2006-10-03  Graham Dennis  <graham.dennis@gmail.com>
15289
15290         Reviewed by Timothy.
15291
15292         <http://bugs.webkit.org/show_bug.cgi?id=10338>
15293         When contentEditable, cursor doesn't change to hand
15294         
15295         Allow the behaviour of editable links to be specified by a WebPreference
15296         The preference WebKitEditableLinkBehavior has four options:
15297          - AlwaysLive: Safari 2.0 behaviour
15298          - OnlyLiveWithShiftKey: Firefox/WinIE behaviour (and prior WebKit-ToT behaviour)
15299          - LiveWhenNotFocused: Editable links are live only when their editable block is not
15300              focused, or when the shift key is pressed
15301          - DefaultBehavior: This is the same as OnlyLiveWithShiftKey.
15302          
15303         No layout tests, just a modification of a manual-test as it isn't possible to test
15304         this automatically.
15305
15306         * WebView/WebPreferenceKeysPrivate.h:
15307         * WebView/WebPreferences.m:
15308         (+[WebPreferences initialize]):
15309         (-[WebPreferences editableLinkBehavior]):
15310         (-[WebPreferences setEditableLinkBehavior:]):
15311         * WebView/WebPreferencesPrivate.h:
15312         * WebView/WebView.m:
15313         (-[WebView _updateWebCoreSettingsFromPreferences:]):
15314
15315 2006-10-03  Justin Garcia  <justin.garcia@apple.com>
15316
15317         Reviewed by harrison
15318         
15319         execCommand("Cut"/"Copy"/"Paste") broken in editable subframes.
15320
15321         * WebCoreSupport/WebFrameBridge.m:
15322         (-[WebFrameBridge issueCutCommand]): Issue the command on the WebHTMLView, not the WebView.
15323         (-[WebFrameBridge issueCopyCommand]): Ditto.
15324         (-[WebFrameBridge issuePasteCommand]): Ditto.
15325         (-[WebFrameBridge issuePasteAndMatchStyleCommand]): Ditto.
15326         (-[WebFrameBridge issueTransposeCommand]): Fixed formatting.
15327         (-[WebFrameBridge canPaste]): Ask the WebHTMLView, not the WebView.
15328         * WebView/WebHTMLView.m:
15329         (-[WebHTMLView copy:]): Moved to WebInternal
15330         (-[WebHTMLView cut:]): Ditto.
15331         (-[WebHTMLView paste:]): Ditto.
15332         (-[WebHTMLView pasteAsPlainText:]): Ditto.
15333         * WebView/WebHTMLViewInternal.h:
15334         * WebView/WebView.m: Removed the now unused _canPaste.
15335         * WebView/WebViewInternal.h: Ditto.
15336
15337 2006-10-03  Justin Garcia  <justin.garcia@apple.com>
15338
15339         Reviewed by geoff
15340         
15341         <rdar://problem/4763519> REGRESSION: Multipart/x-mixed-replace sub-resources fail to load
15342
15343         * Loader/WebSubresourceLoader.m:
15344         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]): 
15345         Enable multipart/x-mixed-replace support on the request.  This line was accidently removed during 
15346         some loader refactoring.
15347
15348 2006-10-02  Adam Roben  <aroben@apple.com>
15349
15350         Reviewed by Maciej.
15351
15352         Add message paramter to WebView::mouse* methods to pass down to
15353         PlatformMouseEvent.
15354
15355         * COM/WebView.cpp:
15356         (WebView::mouseMoved):
15357         (WebView::mouseDown):
15358         (WebView::mouseUp):
15359         (WebView::mouseDoubleClick):
15360         (WebViewWndProc):
15361         * COM/WebView.h:
15362
15363 2006-10-02  Maciej Stachowiak  <mjs@apple.com>
15364
15365         Reviewed by Alice.
15366         
15367         - take away direct knowledge of WebFrame from WebDataSource
15368
15369         * Loader/WebDocumentLoadState.h:
15370         * Loader/WebDocumentLoadState.m:
15371         (-[WebDocumentLoadState setFrameLoader:]):
15372         (-[WebDocumentLoadState detachFromFrameLoader]):
15373         * Loader/WebFrameLoader.m:
15374         (-[WebFrameLoader _setDocumentLoadState:]):
15375         (-[WebFrameLoader _setProvisionalDocumentLoadState:]):
15376         * WebView/WebDataSource.m:
15377         * WebView/WebDataSourceInternal.h:
15378         * WebView/WebDocumentLoadStateMac.m:
15379         (-[WebDocumentLoadStateMac detachFromFrameLoader]):
15380         * WebView/WebFrame.m:
15381         (-[WebFrame _loadDataSource:withLoadType:formState:]):
15382
15383 2006-10-02  Maciej Stachowiak  <mjs@apple.com>
15384
15385         Reviewed by Darin.
15386         
15387         - move a big slice of data and logic from WebDataSource to WebDocumentLoadState
15388         
15389         * Loader/WebDocumentLoadState.h:
15390         * Loader/WebDocumentLoadState.m:
15391         (-[WebDocumentLoadState initWithRequest:]):
15392         (-[WebDocumentLoadState dealloc]):
15393         (-[WebDocumentLoadState originalRequestCopy]):
15394         (-[WebDocumentLoadState request]):
15395         (-[WebDocumentLoadState replaceRequestURLForAnchorScrollWithURL:]):
15396         (-[WebDocumentLoadState setRequest:]):
15397         (-[WebDocumentLoadState setResponse:]):
15398         (-[WebDocumentLoadState isStopping]):
15399         (-[WebDocumentLoadState bridge]):
15400         (-[WebDocumentLoadState setMainDocumentError:]):
15401         (-[WebDocumentLoadState mainDocumentError]):
15402         (-[WebDocumentLoadState clearErrors]):
15403         (-[WebDocumentLoadState mainReceivedError:complete:]):
15404         (-[WebDocumentLoadState stopLoading]):
15405         (-[WebDocumentLoadState setupForReplace]):
15406         (-[WebDocumentLoadState commitIfReady]):
15407         (-[WebDocumentLoadState finishedLoading]):
15408         (-[WebDocumentLoadState setCommitted:]):
15409         (-[WebDocumentLoadState isCommitted]):
15410         (-[WebDocumentLoadState setLoading:]):
15411         (-[WebDocumentLoadState isLoading]):
15412         (-[WebDocumentLoadState commitLoadWithData:]):
15413         (-[WebDocumentLoadState doesProgressiveLoadWithMIMEType:]):
15414         (-[WebDocumentLoadState receivedData:]):
15415         (-[WebDocumentLoadState setupForReplaceByMIMEType:]):
15416         (-[WebDocumentLoadState updateLoading]):
15417         (-[WebDocumentLoadState response]):
15418         * Loader/WebFrameLoader.h:
15419         * Loader/WebFrameLoader.m:
15420         (-[WebFrameLoader activeDocumentLoadState]):
15421         (-[WebFrameLoader activeDataSource]):
15422         (-[WebFrameLoader _archivedSubresourceForURL:]):
15423         (-[WebFrameLoader addPlugInStreamLoader:]):
15424         (-[WebFrameLoader removePlugInStreamLoader:]):
15425         (-[WebFrameLoader addSubresourceLoader:]):
15426         (-[WebFrameLoader removeSubresourceLoader:]):
15427         (-[WebFrameLoader documentLoadState]):
15428         (-[WebFrameLoader provisionalDocumentLoadState]):
15429         (-[WebFrameLoader stopLoading]):
15430         (-[WebFrameLoader _originalRequest]):
15431         (-[WebFrameLoader _receivedData:]):
15432         (-[WebFrameLoader _setRequest:]):
15433         (-[WebFrameLoader bridge]):
15434         (-[WebFrameLoader _handleFallbackContent]):
15435         (-[WebFrameLoader _isStopping]):
15436         (-[WebFrameLoader _setupForReplaceByMIMEType:]):
15437         (-[WebFrameLoader _setResponse:]):
15438         (-[WebFrameLoader _mainReceivedError:complete:]):
15439         (-[WebFrameLoader _finishedLoading]):
15440         (-[WebFrameLoader didReceiveServerRedirectForProvisionalLoadForFrame]):
15441         (-[WebFrameLoader finishedLoadingDocumentLoadState:]):
15442         (-[WebFrameLoader commitProvisitionalLoad]):
15443         (-[WebFrameLoader committedLoadWithDocumentLoadState:data:]):
15444         (-[WebFrameLoader isReplacing]):
15445         (-[WebFrameLoader setReplacing]):
15446         (-[WebFrameLoader revertToProvisionalWithDocumentLoadState:]):
15447         (-[WebFrameLoader documentLoadState:setMainDocumentError:]):
15448         (-[WebFrameLoader documentLoadState:mainReceivedCompleteError:]):
15449         (-[WebFrameLoader finalSetupForReplaceWithDocumentLoadState:]):
15450         * WebView/WebDataSource.m:
15451         (-[WebDataSourcePrivate dealloc]):
15452         (-[WebDataSource _prepareForLoadStart]):
15453         (-[WebDataSource _mainDocumentError]):
15454         (-[WebDataSource _finishedLoading]):
15455         (-[WebDataSource _receivedData:]):
15456         (-[WebDataSource _setMainDocumentError:]):
15457         (-[WebDataSource _clearUnarchivingState]):
15458         (-[WebDataSource _revertToProvisionalState]):
15459         (-[WebDataSource _receivedMainResourceError:complete:]):
15460         (-[WebDataSource _startLoading]):
15461         (-[WebDataSource _loadFromPageCache:]):
15462         (-[WebDataSource _bridge]):
15463         (-[WebDataSource _setPrimaryLoadComplete:]):
15464         (-[WebDataSource _URLForHistory]):
15465         (-[WebDataSource _setTitle:]):
15466         (-[WebDataSource _initWithDocumentLoadState:]):
15467         (-[WebDataSource request]):
15468         (-[WebDataSource response]):
15469         (-[WebDataSource isLoading]):
15470         (-[WebDataSource webArchive]):
15471         * WebView/WebDataSourceInternal.h:
15472         * WebView/WebDocumentLoadStateMac.m:
15473         (-[WebDocumentLoadStateMac initWithRequest:]):
15474         * WebView/WebFrame.m:
15475         (-[WebFrame _createItem:]):
15476         (-[WebFrame _receivedMainResourceError:]):
15477         (-[WebFrame _transitionToCommitted:]):
15478         (-[WebFrame _commitProvisionalLoad:]):
15479         (-[WebFrame _checkLoadCompleteForThisFrame]):
15480         (-[WebFrame _loadItem:withLoadType:]):
15481         (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formState:]):
15482         (-[WebFrame _didReceiveServerRedirectForProvisionalLoadForFrame]):
15483         (-[WebFrame _provisionalLoadStarted]):
15484         * WebView/WebFrameInternal.h:
15485
15486 2006-10-02  Justin Garcia  <justin.garcia@apple.com>
15487
15488         Reviewed by john
15489         
15490         <rdar://problem/4757583>
15491         REGRESSION: tabbing into page focuses wrong control on 2nd pass
15492         <rdar://problem/4757594>
15493         REGRESSION: Form field is left with secondary selection after tabbing out of WebView
15494
15495         * WebView/WebHTMLView.m:
15496         (-[NSArray maintainsInactiveSelection]): Replace code that I removed in error in the patch
15497         for 9642.  Only leave inactive editable selections in the WebHTMLView if the nextResponder 
15498         is in the same WebView.
15499
15500 2006-10-02  Maciej Stachowiak  <mjs@apple.com>
15501
15502         Reviewed by Anders.
15503         
15504         - remove webFrame field from WebDataSourcePrivate, it can get it from WebDocumentLoadState now
15505
15506         * Loader/WebDocumentLoadState.h:
15507         * Loader/WebDocumentLoadState.m:
15508         (-[WebDocumentLoadState frameLoader]):
15509         * WebView/WebDataSource.m:
15510         (-[WebDataSourcePrivate dealloc]):
15511         (-[WebDataSource _revertToProvisionalState]):
15512         (-[WebDataSource _setupForReplaceByMIMEType:]):
15513         (-[WebDataSource _updateLoading]):
15514         (-[WebDataSource _startLoading]):
15515         (-[WebDataSource _setWebFrame:]):
15516         (-[WebDataSource _defersCallbacksChanged]):
15517         (-[WebDataSource _stopLoading]):
15518         (-[WebDataSource _webView]):
15519         (-[WebDataSource _stopLoadingWithError:]):
15520         (-[WebDataSource _setPrimaryLoadComplete:]):
15521         (-[WebDataSource dealloc]):
15522         (-[WebDataSource webFrame]):
15523         (-[WebDataSource isLoading]):
15524
15525 2006-10-02  Maciej Stachowiak  <mjs@apple.com>
15526
15527         Reviewed by Anders.
15528         
15529         - fix crash on back/forward - reattach WebDocumentLoadState to data source when needed
15530
15531         * WebView/WebDataSource.m:
15532         (-[WebDataSource _setWebFrame:]):
15533         (-[WebDataSource _initWithDocumentLoadState:]):
15534         * WebView/WebDataSourceInternal.h:
15535
15536 2006-10-02  Maciej Stachowiak  <mjs@apple.com>
15537
15538         Build fix, not reviewed.
15539         
15540         - Added missing files to fix build.
15541
15542         * WebView/WebDocumentLoadStateMac.h: Added.
15543         * WebView/WebDocumentLoadStateMac.m: Added.
15544         (-[WebDocumentLoadStateMac initWithRequest:]):
15545         (-[WebDocumentLoadStateMac dealloc]):
15546         (-[WebDocumentLoadStateMac setDataSource:]):
15547         (-[WebDocumentLoadStateMac dataSource]):
15548         (-[WebDocumentLoadStateMac setFrameLoader:]):
15549
15550 2006-10-01  Maciej Stachowiak  <mjs@apple.com>
15551
15552         Reviewed by Brady and Oliver.
15553         
15554         - move things around so that WebDataSource and WebDocumentLoadState know about each other in
15555         the right way. This lines things up to move nearly all functionality down to WebDocumentLoadState.
15556
15557         * Loader/WebDocumentLoadState.h:
15558         * Loader/WebDocumentLoadState.m:
15559         (-[WebDocumentLoadState initWithRequest:]):
15560         (-[WebDocumentLoadState dealloc]):
15561         (-[WebDocumentLoadState originalRequest]):
15562         * Loader/WebFrameLoader.h:
15563         * Loader/WebFrameLoader.m:
15564         (-[WebFrameLoader dealloc]):
15565         (-[WebFrameLoader addSubresourceLoader:]):
15566         (-[WebFrameLoader startLoadingMainResourceWithRequest:identifier:]):
15567         (-[WebFrameLoader dataSource]):
15568         (-[WebFrameLoader _setDocumentLoadState:]):
15569         (-[WebFrameLoader policyDataSource]):
15570         (-[WebFrameLoader _setPolicyDocumentLoadState:]):
15571         (-[WebFrameLoader clearDataSource]):
15572         (-[WebFrameLoader provisionalDataSource]):
15573         (-[WebFrameLoader _setProvisionalDocumentLoadState:]):
15574         (-[WebFrameLoader _clearProvisionalDataSource]):
15575         (-[WebFrameLoader _setState:]):
15576         (-[WebFrameLoader clearProvisionalLoad]):
15577         (-[WebFrameLoader commitProvisionalLoad]):
15578         (-[WebFrameLoader stopLoading]):
15579         (-[WebFrameLoader startLoading]):
15580         (-[WebFrameLoader startProvisionalLoad:]):
15581         (-[WebFrameLoader setupForReplace]):
15582         (-[WebFrameLoader activeDocumentLoadState]):
15583         (-[WebFrameLoader activeDataSource]):
15584         (-[WebFrameLoader _loadRequest:archive:]):
15585         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
15586         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
15587         (-[WebFrameLoader reload]):
15588         * WebKit.xcodeproj/project.pbxproj:
15589         * WebView/WebDataSource.m:
15590         (-[WebDataSourcePrivate dealloc]):
15591         (-[WebDataSource _startLoading]):
15592         (-[WebDataSource _setWebFrame:]):
15593         (-[WebDataSource _documentLoadState]):
15594         (-[WebDataSource _initWithDocumentLoadState:]):
15595         (-[WebDataSource initWithRequest:]):
15596         (-[WebDataSource initialRequest]):
15597         (-[WebDataSource unreachableURL]):
15598         * WebView/WebDataSourceInternal.h:
15599         * WebView/WebFrame.m:
15600         (-[WebFramePrivate dealloc]):
15601         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
15602         (-[WebFrame _loadDataSource:withLoadType:formState:]):
15603         (-[WebFrame _policyDataSource]):
15604         (-[WebFrame _shouldReloadToHandleUnreachableURLFromRequest:]):
15605         (-[WebFrame _dataSourceForDocumentLoadState:]):
15606         (-[WebFrame _createDocumentLoadStateWithRequest:]):
15607         * WebView/WebFrameInternal.h:
15608
15609 2006-09-29  David Hyatt  <hyatt@apple.com>
15610
15611         Change the default minimum font size pref to 0 in order to allow
15612         font-size:0 to work.
15613
15614         * WebView/WebPreferences.m:
15615         (+[WebPreferences initialize]):
15616
15617 2006-09-28  Timothy Hatcher  <timothy@apple.com>
15618
15619         Reviewed by Maciej.
15620
15621         Switch the inspector over to use border-image with styled buttons and selects.
15622
15623         * WebInspector/WebInspector.m:
15624         (-[NSWindow window]):
15625         (-[NSWindow setWebFrame:]):
15626         (-[WebInspector _updateRoot]):
15627         * WebInspector/webInspector/Images/button.png: Added.
15628         * WebInspector/webInspector/Images/buttonDivider.png: Added.
15629         * WebInspector/webInspector/Images/buttonPressed.png: Added.
15630         * WebInspector/webInspector/Images/popup.png: Added.
15631         * WebInspector/webInspector/Images/popupFill.png: Removed.
15632         * WebInspector/webInspector/Images/popupFillPressed.png: Removed.
15633         * WebInspector/webInspector/Images/popupLeft.png: Removed.
15634         * WebInspector/webInspector/Images/popupLeftPressed.png: Removed.
15635         * WebInspector/webInspector/Images/popupPressed.png: Added.
15636         * WebInspector/webInspector/Images/popupRight.png: Removed.
15637         * WebInspector/webInspector/Images/popupRightPressed.png: Removed.
15638         * WebInspector/webInspector/Images/squareButtonRight.png: Removed.
15639         * WebInspector/webInspector/Images/squareButtonRightPressed.png: Removed.
15640         * WebInspector/webInspector/inspector.css:
15641         * WebInspector/webInspector/inspector.html:
15642         * WebInspector/webInspector/inspector.js:
15643
15644 2006-09-28  Alice Liu  <alice.liu@apple.com>
15645
15646         fixing the windows build
15647
15648         * COM/WebView.cpp:
15649         (WebView::mouseMoved):
15650         (WebView::mouseDown):
15651         (WebView::mouseUp):
15652         (WebView::mouseDoubleClick):
15653
15654 2006-09-27  Justin Garcia  <justin.garcia@apple.com>
15655
15656         Reviewed by thatcher
15657         
15658         <rdar://problem/4044271>
15659         Writing Direction menu doesn't reflect the current writing direction (9773)
15660
15661         * English.lproj/Localizable.strings: Added "Right to Left" and "Left to Right"
15662         * WebView/WebHTMLView.m:
15663         (-[NSArray validateUserInterfaceItem:]): Validate menu items that perform
15664         toggleBaseWritingDirection and changeBaseWritingDirection.  
15665         Disable the menu item that changes the writing direction to NSWritingDirectionNautral
15666         because NSWritingDirectionNatural's behavior can't be implemented with CSS.
15667         Take control of the title of the menu item that performs toggleBaseWritingDirection:
15668         instead of checking/unchecking it, otherwise we wouldn't know what a check means.
15669         (-[NSArray changeBaseWritingDirection:]): ASSERT that the requested writing
15670         direction is not NSWritingDirectionNatural, since we've disabled the
15671         menu item that performs it.
15672
15673 2006-09-27  MorganL  <morganl.webkit@yahoo.com>
15674
15675         Reviewed by Maciej, landed by Brady
15676
15677         Update URL request associated with provisional data source on redirect.
15678         Notify IWebFrameLoadDelegate of redirects for the provisional load.
15679         Notify IWebFrameLoadDelegate of a provisional load being commited.
15680
15681         * COM/WebDataSource.cpp:
15682         (WebDataSource::replaceRequest):
15683         * COM/WebDataSource.h:
15684         * COM/WebFrame.cpp:
15685         (WebFrame::receivedRedirect):
15686         (WebFrame::receivedResponse):
15687         (WebFrame::receivedData):
15688
15689 2006-09-26  John Sullivan  <sullivan@apple.com>
15690
15691         Reviewed by Darin
15692
15693         * WebView/WebHTMLViewPrivate.h:
15694         * WebView/WebHTMLView.m:
15695         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
15696         Added limit parameter, passed over the bridge. Stop the search if it hits limit.
15697
15698         * WebView/WebViewPrivate.h:
15699         * WebView/WebView.m:
15700         (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
15701         Added limit parameter, passed to WebHTMLView.
15702
15703 2006-09-26  David Harrison  <harrison@apple.com>
15704
15705         Reviewed by John and TimH.
15706
15707         <rdar://problem/4743256> Seed: Ctrl-Y key binding does nothing when kill ring is empty
15708
15709         Use deleteBackward: when the killring string is empty. Was always using insertText:,
15710         but that ends up early-returning if the string to insert is empty.
15711         
15712         * WebView/WebHTMLView.m:
15713         (-[NSArray yank:]):
15714         (-[NSArray yankAndSelect:]):
15715
15716 2006-09-25  Timothy Hatcher  <timothy@apple.com>
15717
15718         Reviewed by Brady.
15719
15720         Use the non-deprecated method names for getComputedStyle, setEnd and setStart.
15721
15722         * WebInspector/WebInspector.m:
15723         (-[WebInspector _highlightNode:]):
15724         * WebView/WebHTMLView.m:
15725         (unionDOMRanges):
15726         (-[WebHTMLView _selectRangeInMarkedText:]):
15727         (-[WebTextCompleteController doCompletion]):
15728         * WebView/WebView.m:
15729         (-[WebView computedStyleForElement:pseudoElement:]):
15730
15731 2006-09-22  Timothy Hatcher  <timothy@apple.com>
15732
15733         Reviewed by Darin.
15734
15735         Pass all headers through unifdef to filter out BUILDING_ON_TIGER blocks
15736         if MACOSX_DEPLOYMENT_TARGET is 10.4.
15737
15738         * MigrateHeaders.make:
15739
15740 2006-09-20  Justin Garcia  <justin.garcia@apple.com>
15741
15742         Reviewed by john
15743         
15744         <http://bugs.webkit.org/show_bug.cgi?id=7165>
15745         TinyMCE: Dragging & dropping content always leaves a copy when editing inside a subframe
15746         
15747         The top level WebHTMLView is responsible for performing dragging operations, but
15748         the inner view, the view that holds the drag caret, should be consulted to determine
15749         if the drag is a move drag.
15750
15751         * WebCoreSupport/WebFrameBridge.m:
15752         (-[WebFrameBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
15753         * WebKit.xcodeproj/project.pbxproj:
15754         * WebView/WebHTMLView.m:
15755         (-[NSArray dragImage:at:offset:event:pasteboard:source:slideBack:]): Don't set initatedDrag here, because
15756         it's only the top level WebHTMLView that performs this operation.
15757         (-[WebHTMLView _setInitiatedDrag:]): Added.
15758         (-[WebHTMLView _initiatedDrag]): Ditto.
15759         (-[WebHTMLView _canProcessDragWithDraggingInfo:]): Ask the innerView if it initiated the drag,
15760         not the top level view.
15761         (-[WebHTMLView _isMoveDrag]): The top level view asks the innerView if it should perform
15762         a move drag, so don't ASSERT _isTopHTMLView.
15763         (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Ask the innerView if _isMoveDrag.
15764         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Ditto.
15765         * WebView/WebHTMLViewInternal.h: Added two private SPI so that
15766         the top level WebHTMLView can set and get the initiatedDrag BOOL.
15767
15768 === Safari-521.27 ===
15769
15770 2006-09-20  Brady Eidson  <beidson@apple.com>
15771
15772         Reviewed by Tim Omernick
15773
15774         Fixing part of a crash Tim O showed me.  [WebIconDatabase init] should finish
15775         gracefully even if we can't open the database
15776
15777         * Misc/WebIconDatabase.m:
15778         (-[WebIconDatabase init]):
15779
15780 2006-09-20  Timothy Hatcher  <timothy@apple.com>
15781
15782         Reviewed by Tim O.
15783
15784         <rdar://problem/4741392> Develop a system to find what version of WebKit an app was linked with
15785
15786         * Misc/WebKitVersionChecks.h: Added.
15787         * Misc/WebKitVersionChecks.m: Added.
15788         (WebKitLinkedOnOrAfter): Added.
15789         (WebKitLinkTimeVersion): Added.
15790         (WebKitRunTimeVersion): Added.
15791         * WebKit.xcodeproj/project.pbxproj:
15792
15793 2006-09-20  Tim Omernick  <timo@apple.com>
15794
15795         Reviewed by Darin.
15796
15797         * Misc/WebIconDatabase.m:
15798         (-[WebIconDatabase init]):
15799         Fixed a typo.
15800
15801 2006-09-20  Brady Eidson  <beidson@apple.com>
15802
15803         Reviewed by Darin
15804
15805         Preparing to make the WebIconDatabase disabled by default - this patch tells the bridge whether its enabled or not
15806
15807         * Misc/WebIconDatabase.m:
15808         (-[WebIconDatabase init]):
15809
15810 2006-09-19  Brady Eidson <beidson@apple.com>
15811
15812         Reviewed by Sarge Decker
15813
15814         <rdar://problem/4739892> and <rdar://problem/4729797>
15815         - WebCore::IconDatabase needs to have and respect an enabled() flag
15816         - Mail on ToT WebKit crashes in IconDatabase code when mailing a page from Safari
15817
15818         * Misc/WebIconDatabase.m:
15819         (-[WebIconDatabase init]): If preference says icons are disabled, tell the bridge
15820         (-[WebIconDatabase _isEnabled]): Ask the bridge if the database is enabled
15821
15822 2006-09-19  Alexey Proskuryakov  <ap@nypop.com>
15823
15824         Reviewed by Tim O.
15825
15826         http://bugs.webkit.org/show_bug.cgi?id=10661
15827         REGRESSION: CFM plug-ins (Shockwave, SVG) are not loaded
15828
15829         * Plugins/WebBasePluginPackage.m:
15830         (-[WebBasePluginPackage initWithPath:]): On 32-bit PowerPC, don't bail out if 
15831         the bundle is nil - it can be a CFM plugin.
15832
15833 2006-09-18  Brady Eidson  <beidson@apple.com>
15834
15835         Reviewed by Anders
15836
15837         Implement a bridge method so WebCore can find the reload type of a frame load
15838
15839         * WebCoreSupport/WebFrameBridge.m:
15840         (-[WebFrameBridge isLoadTypeReload]):
15841
15842 2006-09-18  Sam Weinig  <sam.weinig@gmail.com>
15843
15844         Reviewed by Tim H.
15845
15846         Patch for http://bugs.webkit.org/show_bug.cgi?id=10903
15847         Yet Another Objective-C Bindings Patch
15848
15849         * MigrateHeaders.make:
15850
15851 2006-09-17  David Harrison  <harrison@apple.com>
15852
15853         Reviewed by John Sullivan.
15854
15855         <rdar://problem/4494340> REGRESSION: Making the font size bigger/smaller in an HTML message doesn't affect the body until you reopen it
15856
15857         Problem was the public API -[WebView setTextSizeMultiplier] did not notify anyone that the value changed.
15858         
15859         * WebView/WebDocumentInternal.h:
15860         Add _textSizeMultiplierChanged to the _WebDocumentTextSizing protocol.
15861         
15862         * WebView/WebHTMLView.m:
15863         (-[WebHTMLView _textSizeMultiplierChanged]):
15864         Send [self _updateTextSizeMultiplier].
15865         
15866         * WebView/WebPDFView.m:
15867         (-[WebPDFView _textSizeMultiplierChanged]):
15868         ASSERT_NOT_REACHED() because WebPDFView does not track the common multiplier.
15869         
15870         * WebView/WebView.m:
15871         (-[WebView setTextSizeMultiplier:]):
15872         Send [self _notifyTextSizeMultiplierChanged];
15873         
15874         (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:newScaleFactor:]):
15875         Alter the _textSizeMultiplier directly so that notification is not sent.
15876         Minor formatting.
15877         
15878         (-[WebView _notifyTextSizeMultiplierChanged]):
15879         New. Send _textSizeMultiplierChanged to all document views that track the common multiplier.
15880
15881 2006-09-16  Brady Eidson <beidson@apple.com>
15882
15883         Reviewed by Hyatt
15884
15885         WebIconLoader is dead, long live WebCore::IconLoader
15886         (code prune)
15887
15888         * Loader/WebFrameLoader.h:
15889         * Loader/WebFrameLoader.m:
15890         (-[WebFrameLoader dealloc]):
15891         (-[WebFrameLoader commitProvisionalLoad]):
15892         * Loader/WebIconLoader.h: Removed.
15893         * Loader/WebIconLoader.m: Removed.
15894         * Misc/WebIconDatabase.h:
15895         * Misc/WebIconDatabase.m:
15896         * Misc/WebIconDatabasePrivate.h:
15897         * WebCoreSupport/WebFrameBridge.m:
15898         (-[WebFrameBridge notifyIconChanged:]):
15899         * WebCoreSupport/WebIconDatabaseBridge.h:
15900         * WebCoreSupport/WebIconDatabaseBridge.m:
15901         (-[WebIconDatabaseBridge _init]):
15902         (-[WebIconDatabaseBridge _setIconData:forIconURL:]):
15903         (-[WebIconDatabaseBridge _setHaveNoIconForIconURL:]):
15904         * WebKit.exp:
15905         * WebKit.xcodeproj/project.pbxproj:
15906         * WebView/WebDataSource.m:
15907         (-[WebDataSourcePrivate dealloc]):
15908         (-[WebDataSource _stopLoading]):
15909         (-[WebDataSource _setPrimaryLoadComplete:]):
15910         * WebView/WebDataSourceInternal.h:
15911
15912 2006-09-16  Mark Rowe  <opendarwin.org@bdash.net.nz>
15913
15914         Reviewed by Anders.
15915
15916         http://bugs.webkit.org/show_bug.cgi?id=10887
15917         Fix build error
15918
15919         * MigrateHeaders.make: Remove reference to DOMEventPrivate.h.
15920
15921 2006-09-15  Timothy Hatcher  <timothy@apple.com>
15922
15923         Reviewed by Brady.
15924
15925         Make new style ObjC methods public API.
15926
15927         * MigrateHeaders.make:
15928
15929 2006-09-15  Sam Weinig  <sam.weinig@gmail.com>
15930
15931         Reviewed by Tim H.
15932
15933         Patch for http://bugs.webkit.org/show_bug.cgi?id=10870
15934         Auto-generate DOMNode for the Objective-C bindings
15935
15936         * MigrateHeaders.make:
15937
15938 2006-09-15  Timothy Hatcher  <timothy@apple.com>
15939
15940         Reviewed by Justin.
15941
15942         Call the bridge directly for alter selection calls. All of this logic is now
15943         in WebCore's SelectionController.
15944
15945         * WebView/WebHTMLView.m:
15946         (-[NSArray moveBackward:]):
15947         (-[NSArray moveBackwardAndModifySelection:]):
15948         (-[NSArray moveDown:]):
15949         (-[NSArray moveDownAndModifySelection:]):
15950         (-[NSArray moveForward:]):
15951         (-[NSArray moveForwardAndModifySelection:]):
15952         (-[NSArray moveLeft:]):
15953         (-[NSArray moveLeftAndModifySelection:]):
15954         (-[NSArray moveRight:]):
15955         (-[NSArray moveRightAndModifySelection:]):
15956         (-[NSArray moveToBeginningOfDocument:]):
15957         (-[NSArray moveToBeginningOfDocumentAndModifySelection:]):
15958         (-[NSArray moveToBeginningOfSentence:]):
15959         (-[NSArray moveToBeginningOfSentenceAndModifySelection:]):
15960         (-[NSArray moveToBeginningOfLine:]):
15961         (-[NSArray moveToBeginningOfLineAndModifySelection:]):
15962         (-[NSArray moveToBeginningOfParagraph:]):
15963         (-[NSArray moveToBeginningOfParagraphAndModifySelection:]):
15964         (-[NSArray moveToEndOfDocument:]):
15965         (-[NSArray moveToEndOfDocumentAndModifySelection:]):
15966         (-[NSArray moveToEndOfSentence:]):
15967         (-[NSArray moveToEndOfSentenceAndModifySelection:]):
15968         (-[NSArray moveToEndOfLine:]):
15969         (-[NSArray moveToEndOfLineAndModifySelection:]):
15970         (-[NSArray moveToEndOfParagraph:]):
15971         (-[NSArray moveToEndOfParagraphAndModifySelection:]):
15972         (-[NSArray moveParagraphBackwardAndModifySelection:]):
15973         (-[NSArray moveParagraphForwardAndModifySelection:]):
15974         (-[NSArray moveUp:]):
15975         (-[NSArray moveUpAndModifySelection:]):
15976         (-[NSArray moveWordBackward:]):
15977         (-[NSArray moveWordBackwardAndModifySelection:]):
15978         (-[NSArray moveWordForward:]):
15979         (-[NSArray moveWordForwardAndModifySelection:]):
15980         (-[NSArray moveWordLeft:]):
15981         (-[NSArray moveWordLeftAndModifySelection:]):
15982         (-[NSArray moveWordRight:]):
15983         (-[NSArray moveWordRightAndModifySelection:]):
15984         (-[NSArray pageUp:]):
15985         (-[NSArray pageDown:]):
15986         (-[NSArray pageUpAndModifySelection:]):
15987         (-[NSArray pageDownAndModifySelection:]):
15988
15989 2006-09-15  Adam Roben  <aroben@apple.com>
15990
15991         Reviewed by eseidel.
15992
15993         Fixes http://bugs.webkit.org/show_bug.cgi?id=10876
15994         containsItemForURLUnicode uses matchLetter instead of
15995         matchUnicodeLetter
15996
15997         Small fixes for _WebCoreHistoryProvider.
15998
15999         * History/WebHistory.m: Consistently use BUFFER_SIZE #define
16000         (-[_WebCoreHistoryProvider containsItemForURLLatin1:length:]):
16001         (-[_WebCoreHistoryProvider containsItemForURLUnicode:length:]):
16002         Replace incorrect call to matchLetter to matchUnicodeLetter
16003
16004 2006-09-13  Brady Eidson <beidson@apple.com>
16005
16006         Reviewed by Maciej
16007
16008         Add infrastructure to support icon loads taking place in WebCore
16009         Will remove WebKit icon loaders in a later patch
16010
16011         * WebCoreSupport/WebFrameBridge.m:
16012         (-[WebFrameBridge notifyIconChanged:]):
16013         (-[WebFrameBridge originalRequestURL]):
16014         - Nuked two old, obsolete methods
16015         - Added bridge for notifying of an icon change
16016         - Added bridge for getting the "original request URL" which is still needed
16017           until that info is available in the WebCore loaders
16018
16019         * WebView/WebDataSource.m:
16020         (-[WebDataSource _loadIcon]):
16021         - Empty body just for now, as it still gets called - next patch will prune all the old impl out
16022
16023 2006-09-13  Timothy Hatcher  <timothy@apple.com>
16024
16025         Reviewed by Tim O.
16026
16027         <rdar://problem/4726416> obsolete confusing "ADVISORY NOTE" comment in WebHistory.h
16028
16029         Removed the "ADVISORY NOTE: This method may change for the 1.0 SDK" comments.
16030
16031         * History/WebHistory.h:
16032
16033 === Safari-521.26 ===
16034
16035 2006-09-11  MorganL  <morlmor@yahoo.com>
16036
16037         Reviewed/landed by aroben.
16038
16039         Fixes http://bugs.webkit.org/show_bug.cgi?id=10765
16040         Windows build busted due to std::copy usage in Vector.h
16041
16042         * WebKit.vcproj/WebKit.vcproj: Define _SCL_SECURE_NO_DEPRECATE to get
16043         rid of deprecation warnings on std::copy
16044
16045 2006-09-11  Brady Eidson  <beidson@apple.com>
16046
16047         Despite the fact that some people built okay without this change, it sure was biting me, 
16048         probably because I just wiped my build directory for a fresh build - 
16049         Today's earlier removal of DOMList.h needed to occur in MigrateHeaders.make, as well
16050
16051         * MigrateHeaders.make: removed DOMList.h
16052
16053 2006-09-10  Darin Adler  <darin@apple.com>
16054
16055         Reviewed by Brady.
16056
16057         - fix http://bugs.webkit.org/show_bug.cgi?id=10547
16058           REGRESSION: Links that should open in a new window open in the same window,
16059           while opening another blank window
16060
16061         * WebView/WebFrame.m:
16062         (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
16063         Changed a mistaken "self" to "frame", which was the cause of the bug. Also
16064         fixed the method so that it won't crash if createWebViewWithRequest does
16065         something that has a side effect of releasing this WebView or this frame
16066         by retaining "self" and "frame" as needed. Also fixed a problem where the
16067         code to set "opener" was backwards, and would set the opener of the old
16068         frame to point to the new frame instead of vice versa.
16069
16070 2006-09-09  Sam Weinig  <sam.weinig@gmail.com>
16071
16072         Reviewed by Eric.
16073
16074         Patch for http://bugs.webkit.org/show_bug.cgi?id=10795
16075         Auto-generate the Objective-C DOM XPath bindings
16076
16077         * MigrateHeaders.make:
16078
16079 2006-09-09  Sam Weinig  <sam.weinig@gmail.com>
16080
16081         Reviewed by Eric.
16082
16083         Patch for http://bugs.webkit.org/show_bug.cgi?id=10791
16084         Even More Objective-C DOM auto-generation cleanup
16085
16086         * MigrateHeaders.make:
16087
16088 2006-09-08  Tim Omernick  <timo@apple.com>
16089
16090         Reviewed by Brady Eidson.
16091
16092         Rolled out Maciej's code cleanup from 8/22.  It turns out that keeping the "loading" flag
16093         is a useful optimization, as it avoids many Objective-C method calls while polling resources
16094         for their load state.
16095
16096         This fixes a 3-4% PLT performance regression (as measured on my MacBook Pro).
16097
16098         * Loader/WebFrameLoader.m:
16099         (-[WebFrameLoader addPlugInStreamLoader:]):
16100         (-[WebFrameLoader removePlugInStreamLoader:]):
16101         (-[WebFrameLoader addSubresourceLoader:]):
16102         (-[WebFrameLoader removeSubresourceLoader:]):
16103         * WebView/WebDataSource.m:
16104         (-[WebDataSourcePrivate dealloc]):
16105         (-[WebDataSource _prepareForLoadStart]):
16106         (-[WebDataSource _setLoading:]):
16107         (-[WebDataSource _updateLoading]):
16108         (-[WebDataSource _startLoading]):
16109         (-[WebDataSource _stopLoading]):
16110         (-[WebDataSource _setPrimaryLoadComplete:]):
16111         (-[WebDataSource isLoading]):
16112         * WebView/WebDataSourceInternal.h:
16113
16114 2006-09-07  Sam Weinig  <sam.weinig@gmail.com>
16115
16116         Reviewed by Darin and Tim H.
16117
16118         Patch for http://bugs.webkit.org/show_bug.cgi?id=10774
16119         Auto-generate the Objective-C DOM Traversal bindings
16120
16121         * MigrateHeaders.make:
16122
16123 2006-09-07  Sam Weinig  <sam.weinig@gmail.com>
16124
16125         Reviewed by Darin.
16126
16127         Patch for http://bugs.webkit.org/show_bug.cgi?id=10766
16128         Auto-generate the Objective-C DOM Events bindings
16129
16130         * MigrateHeaders.make:
16131         * WebKit.xcodeproj/project.pbxproj:
16132
16133 2006-09-06  Alexey Proskuryakov  <ap@nypop.com>
16134
16135         * MigrateHeaders.make: Fixed a double slash in 
16136         "$(PRIVATE_HEADERS_DIR)//DOMCharacterDataPrivate.h" (this was reported
16137         to cause a build failure under certain circumstances).
16138
16139 2006-09-05  MorganL  <morlmor@yahoocom>
16140
16141         Reviewed/landed by aroben.
16142
16143         Fixes bug 10743: Windows build is busted.
16144
16145         * COM/WebView.cpp:
16146         (WebView::keyPress):
16147
16148 2006-09-05  Timothy Hatcher  <timothy@apple.com>
16149
16150         Reviewed by Darin.
16151
16152         Drastically simplified the makefile for migrating headers from
16153         WebCore and JavaScriptCore. The old version was always copying the files.
16154
16155         * MigrateHeaders.make:
16156
16157 2006-09-05  Darin Adler  <darin@apple.com>
16158
16159         Reviewed by Alexey.
16160
16161         - WebKit side of changes to encoding
16162
16163         * WebView/WebHTMLRepresentation.m: (-[WebHTMLRepresentation documentSource]):
16164         Changed to call new -[WebCoreFrameBridge stringWithData:] instead of the calling
16165         the old methods that used a CFStringEncoding: -[WebCoreFrameBridge textEncoding]
16166         and +[WebCoreFrameBridge stringWithData:textEncoding:].
16167
16168         * WebView/WebResource.m: (-[WebResource _stringValue]): Removed special case for
16169         nil encoding name. The bridge itself now has the rule that "nil encoding name
16170         means Latin-1", so we don't need to check for nil.
16171
16172         * WebView/WebFrame.m: (-[WebFrame _checkLoadComplete]): Retain the frame until
16173         we get the parent frame while walking up parent frames, because it's possible
16174         for _checkLoadCompleteForThisFrame to release the last reference to the frame.
16175         (Not reviewed; needed to run performance tests successfully.)
16176
16177 2006-09-05  Timothy Hatcher  <timothy@apple.com>
16178
16179         Reviewed by Tim O.
16180
16181         <rdar://problem/4682225> conflicting typedefs in Netscape plug-in headers
16182
16183         * Plugins/npfunctions.h: fix the return type for NPN_IntFromIdentifierProcPtr to be int32_t
16184
16185 2006-09-04  Timothy Hatcher  <timothy@apple.com>
16186
16187         Reviewed by Darin.
16188
16189         Bug 10714: ObjC autogeneration needs safe-guards against easily modifying the public API
16190         http://bugs.webkit.org/show_bug.cgi?id=10714
16191
16192         - Added the new private DOM headers.
16193         - Factored out the common commands into variables.
16194         - Made WebDashboardRegion.h private again.
16195         - Rename DOMDOMImplementation.h to DOMImplementation.h when files
16196           are migrated. Also fixes up #imports.
16197
16198         * MigrateHeaders.make:
16199
16200 2006-09-03  Sam Weinig  <sam.weinig@gmail.com>
16201
16202         Reviewed by Darin and Tim H.
16203
16204         - patch for http://bugs.webkit.org/show_bug.cgi?id=10711
16205           Auto-generate the Objective-C DOM Stylesheet bindings
16206
16207         * MigrateHeaders.make:
16208
16209 2006-09-02  Sam Weinig  <sam.weinig@gmail.com>
16210
16211         Reviewed by Tim H.
16212
16213         - patch for http://bugs.webkit.org/show_bug.cgi?id=10684
16214           Auto-generate the Objective-C DOM CSS bindings
16215
16216         * MigrateHeaders.make:
16217
16218 2006-09-01  MorganL  <morlmor@yahoo.com>
16219
16220         Reviewed by Darin. Updated/landed by Adam.
16221
16222         Fixes http://bugs.webkit.org/show_bug.cgi?id=10553
16223         Windows build fixes
16224
16225         * COM/WebFrame.cpp:
16226         (WebFrame::initWithName):
16227
16228 2006-09-01  Brady Eidson  <beidson@apple.com>
16229
16230         Reviewed by Darin
16231
16232         A "never should be reached" method was reached - lets not release the shared database bridge, esp
16233         since we never retain it!
16234
16235         * Misc/WebIconDatabase.m:
16236         (-[WebIconDatabase _applicationWillTerminate:]): Don't release the bridge
16237
16238 2006-09-01  Darin Adler  <darin@apple.com>
16239
16240         Reviewed by Brady.
16241
16242         - a few small tweaks to the icon database bridge
16243
16244         * Misc/WebIconDatabase.m: (-[WebIconDatabase init]): Updated for name change.
16245
16246         * WebCoreSupport/WebIconDatabaseBridge.h: Removed unneeded declarations.
16247         * WebCoreSupport/WebIconDatabaseBridge.m:
16248         (-[WebIconDatabaseBridge init]): Added. Always returns nil since you're not supposed
16249         to allocate one of these.
16250         (-[WebIconDatabaseBridge _init]): Renamed from init. Used internally to make the
16251         shared instance. Added the "self = [super init]" idiom even though it's not important
16252         in this case just to be consistent.
16253         (-[WebIconDatabaseBridge releaseCachedLoaderForIconURL:]): Moved this up in the file
16254         so it can be called without declaring it in the header.
16255         (+[WebIconDatabaseBridge sharedInstance]): Renamed. Calls the new _init. Also use
16256         CFRetain for compatibility.
16257         (-[WebIconDatabaseBridge dealloc]): Emptied this out and made it just assert (false).
16258         (-[WebIconDatabaseBridge finalize]): Added and made it assert (false) too.
16259
16260 2006-09-01  Timothy Hatcher  <timothy@apple.com>
16261
16262         Reviewed by Adele.
16263
16264         Bug 10677: Omit "-webkit-text-security: none;" from the computed style list
16265         http://bugs.webkit.org/show_bug.cgi?id=10677
16266
16267         * WebInspector/webInspector/inspector.js:
16268
16269 2006-08-31  Sam Weinig  <sam.weinig@gmail.com>
16270
16271         Reviewed by Tim H.
16272
16273         - patch for http://bugs.webkit.org/show_bug.cgi?id=10669
16274           Auto-generate the remaining Objective-C HTML DOM bindings
16275
16276         * MigrateHeaders.make:
16277
16278 2006-08-31  Adele Peterson  <adele@apple.com>
16279
16280         Reviewed by Darin.
16281
16282         WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=10666
16283         Password: Disallow Spelling, Font, Speech, and Writing Direction context menu
16284
16285         * DefaultDelegates/WebDefaultContextMenuDelegate.m: (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
16286           Check that the selection isn't in a password field before adding these items to the default editing context menu.
16287               Search In Google, Search In Spotlight, Look up in Dictionary, Spelling, Font, Speech, Writing Direction
16288         * WebView/WebHTMLView.m: (-[WebHTMLView _isSelectionInPasswordField]): Added.
16289         * WebView/WebHTMLViewPrivate.h:
16290
16291 2006-08-31  Sam Weinig  <sam.weinig@gmail.com>
16292
16293         Reviewed by Tim H.
16294
16295         - patch for http://bugs.webkit.org/show_bug.cgi?id=10653
16296           Auto-generate another 20 Objective-C DOM HTML bindings
16297
16298         * MigrateHeaders.make:
16299         * WebKit.xcodeproj/project.pbxproj:
16300
16301 2006-08-31  Adele Peterson  <adele@apple.com>
16302
16303         Reviewed by John Sullivan.
16304
16305         Removed wkSecureEventInput and wkSetSecureEventInput, since this can be done with API.
16306
16307         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
16308
16309 2006-08-31  John Sullivan  <sullivan@apple.com>
16310
16311         Reviewed by Tim Omernick
16312         
16313         - fixed <rdar://problem/4711200> Loading history would be faster if it bypassed 
16314         NSURL API for local files
16315
16316         * History/WebHistory.m:
16317         (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
16318         Load file URLs using [NSDictionary dictionaryWithContentsOfFile:]. I also cleaned up some minor
16319         style issues in this method, and I removed the support for old NSArray-style history files (which we
16320         stopped using before Safari 1.0).
16321
16322 2006-08-30  Adele Peterson  <adele@apple.com>
16323
16324         Reviewed by Hyatt.
16325
16326         WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=10575
16327         Enable secure input mode for new password fields
16328
16329         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
16330
16331 2006-08-30  Brady Eidson  <beidson@apple.com>
16332
16333         Reviewed by John
16334
16335         <rdar://problem/4707718> Change behavior so if the WebCore::IconDatabase can't open, WebKit releases the bridge and 
16336         continues on as if the IconDatabase is disabled.
16337  
16338         * Misc/WebIconDatabase.m:
16339         (-[WebIconDatabase init]): Release the bridge on failure to open
16340         * WebCoreSupport/WebIconDatabaseBridge.m:
16341         (+[WebIconDatabaseBridge sharedBridgeInstance]): Moved static shared instance out as a global
16342         (-[WebIconDatabaseBridge dealloc]): Clear pointer to the shared instance
16343
16344 2006-08-30  Timothy Hatcher  <timothy@apple.com>
16345
16346         Reviewed by Darin.
16347
16348         Simplify the header copies from WebCore and JavaScriptCore.
16349         Headers that need to be migrated from the other projects need
16350         to be added to MigrateHeaders.make.
16351
16352         * MigrateHeaders.make: Added.
16353         * WebKit.xcodeproj/project.pbxproj:
16354
16355 2006-08-30  Sam Weinig  <sam.weinig@gmail.com>
16356
16357         Reviewed by Tim H.
16358
16359         - patch for http://bugs.webkit.org/show_bug.cgi?id=10640
16360           Auto-generate 10 more Objective-C DOM HTML bindings
16361
16362         * WebKit.xcodeproj/project.pbxproj:
16363
16364 2006-08-30  Adele Peterson  <adele@apple.com>
16365
16366         Reviewed by Darin.
16367
16368         WebKit part of fix for:
16369         http://bugs.webkit.org/show_bug.cgi?id=10576
16370         Disallow copy from new password fields
16371
16372         * WebView/WebHTMLView.m:
16373         (-[WebHTMLView _canCopy]): Now also calls across the bridge to ask if it mayCopy.
16374         (-[WebHTMLView _canCut]): Calls _canCopy now.
16375         (-[NSArray validateUserInterfaceItem:]): Calls _canCut when validating the "Cut" menu item.
16376          This used to call _canDelete (which used to be the same as _canCut), but now _canCut also checks _canCopy.
16377
16378 2006-08-30  Karl Adam  <karladam@yahoo-inc.com>
16379
16380         Reviewed by Eric and Tim H.
16381
16382         Bug 10634: -webView:dragDestinationActionMaskForDraggingInfo: is ignored
16383         http://bugs.webkit.org/show_bug.cgi?id=10634
16384         
16385         Remove the check for canShowFile: from _web_bestURL: since
16386         it shouldn't be concerned with whether or not the view
16387         can show the URL, merely return the most appropriate URL.
16388
16389         * Misc/WebNSPasteboardExtras.m:
16390         (-[NSPasteboard _web_bestURL]):
16391         * Misc/WebNSViewExtras.m:
16392         (-[NSView _web_dragOperationForDraggingInfo:]):
16393
16394 2006-08-29  Brady Eidson  <beidson@apple.com>
16395
16396         Reviewed by Kevin Decker (Sarge)
16397
16398         <rdar://problem/4678414> - New IconDB needs to delete icons when asked
16399
16400         * Misc/WebIconDatabase.m:
16401         (-[WebIconDatabase removeAllIcons]): Call through to WebCore to remove icons, then send notification
16402
16403 2006-08-29  Brady Eidson  <beidson@apple.com>
16404
16405         Reviewed by Alice
16406
16407         Added a truth value check for to setIconURL:forURL so WebKit can avoid sending a notification
16408         This is a win on the iBench
16409
16410         * Misc/WebIconDatabase.m:
16411         (-[WebIconDatabase _setIconURL:forURL:]):
16412
16413 2006-08-29  Brady Eidson  <beidson@apple.com>
16414
16415         Reviewed by Tim Hatchers rubber stamp
16416
16417         Removed some accidentally left-in console spew during the conversion to the new DB
16418  
16419         * Misc/WebIconDatabase.m:
16420         (objectFromPathForKey): Nuked some NSLogs
16421
16422 2006-08-29  Tim Omernick  <timo@apple.com>
16423
16424         Reviewed by Darin Adler.
16425
16426         <rdar://problem/4688618> REGRESSION(10.4.7-9A241): JMol java applet fails in Safari not Firefox
16427
16428         No layout test for now because Java doesn't work in DumpRenderTree.
16429
16430         * Plugins/WebPluginDatabase.m:
16431         (-[WebPluginDatabase refresh]):
16432         Add each plug-in MIME type to registeredMIMETypes, even if we don't register a document view class for the
16433         MIME type.  This fixes -[WebPluginDatabase isMIMETypeRegistered:] and thus fallback content for Java applets
16434         (we were always rendering fallback content, if any, for Java applets).
16435
16436 2006-08-29  Sam Weinig  <sam.weinig@gmail.com>
16437
16438         Reviewed by Tim H.
16439
16440         - patch for http://bugs.webkit.org/show_bug.cgi?id=10628
16441           Auto-generate the remaining Objective-C DOM bindings
16442
16443           Auto-generates DOMHTMLCollection, DOMHTMLElement, DOMHTMLFormElement,
16444           and DOMHTMLOptionsCollection.
16445
16446         * WebKit.xcodeproj/project.pbxproj:
16447
16448 2006-08-28  Brady Eidson  <beidson@apple.com>
16449
16450         Reviewed by Darin
16451
16452         Short of a few small snippets that still need to be pushed to WebCore, this
16453         is a final prune of WebIconDatabase.  WebFileDatabase and WebLRUFileList are gone
16454         and the small remaining snippets of WebFileDatabase code that were still important
16455         are now in static functions in WebIconDatabase.m
16456
16457         * Loader/WebIconLoader.m:
16458         (-[WebIconLoader didFinishLoading]): Removed the flag
16459         * Misc/WebFileDatabase.h: Removed.
16460         * Misc/WebFileDatabase.m: Removed.
16461         * Misc/WebIconDatabase.m:
16462         (+[WebIconDatabase sharedIconDatabase]):
16463         (-[WebIconDatabase init]):
16464         (-[WebIconDatabase iconForURL:withSize:cache:]):
16465         (-[WebIconDatabase iconURLForURL:]):
16466         (-[WebIconDatabase defaultIconWithSize:]):
16467         (-[WebIconDatabase retainIconForURL:]):
16468         (-[WebIconDatabase releaseIconForURL:]):
16469         (-[WebIconDatabase _isEnabled]):
16470         (-[WebIconDatabase _setIconData:forIconURL:]):
16471         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
16472         (-[WebIconDatabase _setIconURL:forURL:]):
16473         (-[WebIconDatabase _hasEntryForIconURL:]):
16474         (-[WebIconDatabase _applicationWillTerminate:]):
16475         (-[WebIconDatabase _resetCachedWebPreferences:]):
16476         (uniqueFilePathForKey): Added from WebFileDatabase
16477         (objectFromPathForKey): Added from WebFileDatabase
16478         (iconDataFromPathForIconURL):
16479         (-[WebIconDatabase _convertToWebCoreFormat]): Make use of static functions and local variables
16480           instead of using WebFileDatabase and WebIconDatabase variables that are now obsolete
16481         * Misc/WebIconDatabasePrivate.h: Removed alot of obsoleted members
16482         * Misc/WebLRUFileList.h: Removed.
16483         * Misc/WebLRUFileList.m: Removed.
16484         * WebKit.xcodeproj/project.pbxproj: Deleted 4 files
16485         * WebKitPrefix.h: Removed ICONDEBUG
16486
16487 2006-08-28  Tim Omernick  <timo@apple.com>
16488
16489         Reviewed by Darin Adler.
16490
16491         * Plugins/WebBaseNetscapePluginView.m:
16492         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
16493         Removed a bogus typecast.
16494
16495 2006-08-28  Tim Omernick  <timo@apple.com>
16496
16497         Reviewed by John Sullivan.
16498
16499         Part of <rdar://problem/4481553> NetscapeMoviePlugIn example code scripting doesn't work in Firefox (4319)
16500         <http://bugs.webkit.org/show_bug.cgi?id=4319>: NetscapeMoviePlugIn example code scripting doesn't work
16501         in Firefox
16502
16503         * Plugins/WebBaseNetscapePluginView.h:
16504         * Plugins/WebBaseNetscapePluginView.m:
16505         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
16506         Renamed this method (see corresponding WebCore ChangeLog entry for an explanation).
16507         Style changes.
16508
16509 2006-08-28  Brady Eidson  <beidson@apple.com>
16510
16511         Reviewed by Tim Hatcher's rubberstamp
16512
16513         Rolled out my last change (16070 - pruning WebFileDatabase code) as it caused a difficult-to-track down
16514         failure in layout tests on a release build.
16515
16516         * Misc/WebFileDatabase.h:
16517         * Misc/WebFileDatabase.m:
16518         (+[WebFileDatabaseOp opWithCode:key:object:]):
16519         (-[WebFileDatabaseOp initWithCode:key:object:]):
16520         (-[WebFileDatabaseOp opcode]):
16521         (-[WebFileDatabaseOp key]):
16522         (-[WebFileDatabaseOp object]):
16523         (-[WebFileDatabaseOp perform:]):
16524         (-[WebFileDatabaseOp dealloc]):
16525         (SetThreadPriority):
16526         (-[WebFileDatabase _createLRUList:]):
16527         (-[WebFileDatabase _truncateToSizeLimit:]):
16528         (+[WebFileDatabase _syncLoop:]):
16529         (databaseInit):
16530         (-[WebFileDatabase setTimer]):
16531         (-[WebFileDatabase setObject:forKey:]):
16532         (-[WebFileDatabase removeObjectForKey:]):
16533         (-[WebFileDatabase removeAllObjects]):
16534         (-[WebFileDatabase objectForKey:]):
16535         (-[WebFileDatabase performSetObject:forKey:]):
16536         (-[WebFileDatabase performRemoveObjectForKey:]):
16537         (-[WebFileDatabase open]):
16538         (-[WebFileDatabase close]):
16539         (-[WebFileDatabase lazySync:]):
16540         (-[WebFileDatabase sync]):
16541         (-[WebFileDatabase sizeLimit]):
16542         (-[WebFileDatabase count]):
16543         (-[WebFileDatabase usage]):
16544         (-[WebFileDatabase setSizeLimit:]):
16545         * Misc/WebIconDatabase.m:
16546         (-[WebIconDatabase _createFileDatabase]):
16547         (-[WebIconDatabase _loadIconDictionaries]):
16548         * WebKit.xcodeproj/project.pbxproj:
16549
16550 2006-08-28  Darin Adler  <darin@apple.com>
16551
16552         Reviewed by Tim Hatcher.
16553
16554         * WebInspector/webInspector/inspector.js: Add "resize: none" to the list of
16555         default values for CSS properties so it will be omitted from most displays
16556         of computed style.
16557
16558 2006-08-28  Brady Eidson  <beidson@apple.com>
16559
16560         Reviewed by Maciej
16561
16562         Major prune of unnecessary WebFileDatabase code.  In the end, what
16563         useful code that remains in WebFileDatabase will likely be moved directly
16564         into WebIconDatabase
16565
16566         * Misc/WebFileDatabase.h:
16567         * Misc/WebFileDatabase.m:
16568         (-[WebFileDatabase initWithPath:]):
16569         (-[WebFileDatabase objectForKey:]):
16570         (-[WebFileDatabase open]):
16571         (-[WebFileDatabase close]):
16572         * Misc/WebIconDatabase.m:
16573         (-[WebIconDatabase _createFileDatabase]):
16574         (-[WebIconDatabase _loadIconDictionaries]):
16575         * Misc/WebLRUFileList.h: Removed.
16576         * Misc/WebLRUFileList.m: Removed.
16577         * WebKit.xcodeproj/project.pbxproj:
16578
16579 2006-08-27  Sam Weinig  <sam.weinig@gmail.com>
16580
16581         Reviewed by Tim H.
16582
16583         - patch for http://bugs.webkit.org/show_bug.cgi?id=4624
16584           WebCore needs autogenerated Obj-C DOM bindings
16585
16586           First round of auto-generated Objective C DOM bindings, starting
16587           with the DOM Core.
16588
16589         * WebKit.xcodeproj/project.pbxproj:
16590
16591 2006-08-25  Brady Eidson  <beidson@apple.com>
16592
16593         Reviewed by Tim Hatcher
16594
16595         Fixed up some leaks on [WebIconDatabase init]
16596
16597         * Misc/WebIconDatabase.m:
16598         (-[WebIconDatabase init]):
16599
16600 2006-08-24  Timothy Hatcher  <timothy@apple.com>
16601
16602         Reviewed by Darin.
16603
16604         * WebView/WebFrame.m:
16605         (-[WebFrame _updateBackground]): reworded the comment about scroll view and setDrawsBackground:YES
16606         * WebView/WebView.m:
16607         (-[WebViewPrivate dealloc]): release the background color
16608
16609 2006-08-24  Timothy Hatcher  <timothy@apple.com>
16610
16611         Reviewed by Hyatt.
16612
16613         WebView API to allow changing the background color that draws under transparent page backgrounds.
16614
16615         * WebView/WebFrame.m:
16616         (-[WebFrame _makeDocumentView]):
16617         (-[WebFrame _updateBackground]):
16618         * WebView/WebFrameInternal.h:
16619         * WebView/WebFrameView.m:
16620         (-[WebFrameView drawRect:]):
16621         * WebView/WebView.m:
16622         (-[WebView setBackgroundColor:]):
16623         (-[WebView backgroundColor]):
16624         (-[WebView _commonInitializationWithFrameName:groupName:]):
16625         (-[WebView setDrawsBackground:]):
16626         * WebView/WebViewPrivate.h:
16627
16628 2006-08-24  Timothy Hatcher  <timothy@apple.com>
16629
16630         Reviewed by Darin.
16631
16632         Fix for Mail stationary. Selecting a stationary item would cause this exception.
16633         *** -[WebSubresourceLoader copyWithZone:]: selector not recognized
16634         Uncaught exception - *** -[WebSubresourceLoader copyWithZone:]: selector not recognized
16635
16636         * Loader/WebFrameLoader.m:
16637         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
16638         Use _webkit_setObject:forUncopiedKey: when addign the resource to pendingArchivedResources.
16639
16640 2006-08-23  Maciej Stachowiak  <mjs@apple.com>
16641
16642         Reviewed by Adele.
16643         
16644         - fix assertion which I accidentally changed to one that sometimes fails
16645         http://bugs.webkit.org/show_bug.cgi?id=10531
16646         
16647         * Loader/WebDocumentLoadState.m:
16648         (-[WebDocumentLoadState dealloc]):
16649         * WebView/WebDataSource.m:
16650         (-[WebDataSourcePrivate dealloc]):
16651         (-[WebDataSource dealloc]):
16652
16653 2006-08-23  Maciej Stachowiak  <mjs@apple.com>
16654
16655         Reviewed by Brady.
16656         
16657         - move WebFrame code that creates WebDataSources down to WebFrameLoader, in preparation
16658         for WebFrameLoader just holding on to WebDocumentLoadState
16659
16660         * Loader/WebFrameLoader.h:
16661         * Loader/WebFrameLoader.m:
16662         (-[WebFrameLoader _loadRequest:archive:]):
16663         (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
16664         (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
16665         (-[WebFrameLoader reload]):
16666         * WebView/WebFrame.m:
16667         (-[WebFrame _loadItem:withLoadType:]):
16668         (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
16669         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
16670         (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
16671         (-[WebFrame _shouldReloadToHandleUnreachableURLFromRequest:]):
16672         (-[WebFrame loadRequest:]):
16673         (-[WebFrame loadArchive:]):
16674         (-[WebFrame reload]):
16675         * WebView/WebFrameInternal.h:
16676         * WebView/WebFramePrivate.h:
16677         * WebView/WebView.m:
16678         (-[WebView setCustomTextEncodingName:]):
16679
16680 2006-08-23  Brady Eidson  <beidson@apple.com>
16681
16682         Reviewed by Maciej
16683
16684         First pass at pruning unused WebIconDatabase code.  Focus on removing methods that simply
16685         have no place in the new DB at all.  A few renames and a few important FIXMEs result, but no
16686         functionality changes.
16687
16688         * Loader/WebIconLoader.m:
16689         (-[WebIconLoader didFinishLoading]): Call to WebIconDatabase instead of directly to the bridge
16690         * Misc/WebIconDatabase.h:
16691         * Misc/WebIconDatabase.m:
16692         (-[WebIconDatabase init]):
16693         (-[WebIconDatabase iconForURL:withSize:cache:]):
16694         (-[WebIconDatabase iconURLForURL:]):
16695         (-[WebIconDatabase defaultIconWithSize:]):
16696         (-[WebIconDatabase retainIconForURL:]):
16697         (-[WebIconDatabase releaseIconForURL:]):
16698         (-[WebIconDatabase removeAllIcons]):
16699         (-[WebIconDatabase _setIconData:forIconURL:]):
16700         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
16701         (-[WebIconDatabase _setIconURL:forURL:]):
16702         (-[WebIconDatabase _hasEntryForIconURL:]):
16703         (-[WebIconDatabase _applicationWillTerminate:]):
16704         (-[WebIconDatabase _resetCachedWebPreferences:]):
16705         * Misc/WebIconDatabasePrivate.h: Changed setIcon: to setIconData:
16706
16707 2006-08-23  Maciej Stachowiak  <mjs@apple.com>
16708
16709         Reviewed by Adele.
16710         
16711         - started factoring most of the guts of WebDataSource into a new class
16712         
16713         WebDocumentLoadState is decoupled from the rest of WebKit and will
16714         be moved down to WebCore. I only moved one of the data fields of
16715         WebDataSource for now.
16716
16717         * Loader/WebDocumentLoadState.h: Added.
16718         * Loader/WebDocumentLoadState.m: Added.
16719         (-[WebDocumentLoadState initWithRequest:]): New class.
16720         (-[WebDocumentLoadState dealloc]):
16721         (-[WebDocumentLoadState setFrameLoader:]):
16722         (-[WebDocumentLoadState setMainResourceData:]):
16723         (-[WebDocumentLoadState mainResourceData]):
16724         * Loader/WebFrameLoader.m:
16725         (-[WebFrameLoader _setDataSource:]): Remove redundant _setWebFrame: call,
16726         it would have been called already by this point.
16727         (-[WebFrameLoader _setProvisionalDataSource:]): ditto.
16728         * WebKit.xcodeproj/project.pbxproj:
16729         * WebView/WebDataSource.m:
16730         (-[WebDataSourcePrivate dealloc]):
16731         (-[WebDataSource _setWebFrame:]):
16732         (-[WebDataSource _setPrimaryLoadComplete:]):
16733         (-[WebDataSource initWithRequest:]):
16734         (-[WebDataSource data]):
16735
16736 2006-08-23  Maciej Stachowiak  <mjs@apple.com>
16737
16738         Reviewed by Adele.
16739         
16740         - refactoring of WebDataSource in preparation for moving a bunch of it to a new class
16741         
16742         - minimize WebDataSourceInternal.h to be only methods called from outside WebDataSource
16743         - reduce Private category implementation to be only the SPI methods
16744         - make new Internal and FileInternal categories which contain the
16745         remainder (depending on whether they are called from outside of
16746         WebDataSource)
16747
16748         * WebView/WebDataSource.m:
16749         (-[WebDataSource _setMainDocumentError:]):
16750         (addTypesFromClass):
16751         (+[WebDataSource _representationClassForMIMEType:]):
16752         (-[WebDataSource _commitIfReady]):
16753         (-[WebDataSource _commitLoadWithData:]):
16754         (-[WebDataSource _doesProgressiveLoadWithMIMEType:]):
16755         (-[WebDataSource _addResponse:]):
16756         (-[WebDataSource _revertToProvisionalState]):
16757         (-[WebDataSource _mainDocumentError]):
16758         (-[WebDataSource _addSubframeArchives:]):
16759         (-[WebDataSource _fileWrapperForURL:]):
16760         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
16761         (-[WebDataSource _decidePolicyForMIMEType:decisionListener:]):
16762         (-[WebDataSource _finishedLoading]):
16763         (-[WebDataSource _setResponse:]):
16764         (-[WebDataSource _setRequest:]):
16765         (-[WebDataSource _setupForReplaceByMIMEType:]):
16766         (-[WebDataSource _receivedMainResourceError:complete:]):
16767         (-[WebDataSource _mainReceivedError:complete:]):
16768         (-[WebDataSource _defersCallbacks]):
16769         (-[WebDataSource _downloadWithLoadingConnection:request:response:proxy:]):
16770         (-[WebDataSource _didFailLoadingWithError:forResource:]):
16771         (-[WebDataSource _didFinishLoadingForResource:]):
16772         (-[WebDataSource _didReceiveData:contentLength:forResource:]):
16773         (-[WebDataSource _didReceiveResponse:forResource:]):
16774         (-[WebDataSource _didCancelAuthenticationChallenge:forResource:]):
16775         (-[WebDataSource _didReceiveAuthenticationChallenge:forResource:]):
16776         (-[WebDataSource _willSendRequest:forResource:redirectResponse:]):
16777         (-[WebDataSource _identifierForInitialRequest:]):
16778         (-[WebDataSource _archivedSubresourceForURL:]):
16779         (-[WebDataSource _startLoading]):
16780         (-[WebDataSource _stopRecordingResponses]):
16781         (-[WebDataSource _loadingStartedTime]):
16782         (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]):
16783         (-[WebDataSource _documentFragmentWithArchive:]):
16784         (-[WebDataSource _documentFragmentWithImageResource:]):
16785         (-[WebDataSource _imageElementWithImageResource:]):
16786         (-[WebDataSource _title]):
16787         (-[WebDataSource _isStopping]):
16788         (-[WebDataSource _setWebFrame:]):
16789         (-[WebDataSource _URL]):
16790         (-[WebDataSource _loadFromPageCache:]):
16791         (-[WebDataSource _popSubframeArchiveWithName:]):
16792         (-[WebDataSource _setIsClientRedirect:]):
16793         (-[WebDataSource _setURL:]):
16794         (-[WebDataSource _setLastCheckedRequest:]):
16795         (-[WebDataSource _defersCallbacksChanged]):
16796         (-[WebDataSource _lastCheckedRequest]):
16797         (-[WebDataSource _stopLoading]):
16798         (-[WebDataSource _bridge]):
16799         (-[WebDataSource _webView]):
16800         (-[WebDataSource _triggeringAction]):
16801         (-[WebDataSource _setTriggeringAction:]):
16802         (-[WebDataSource __adoptRequest:]):
16803         (-[WebDataSource _isDocumentHTML]):
16804         (-[WebDataSource _stopLoadingWithError:]):
16805         (-[WebDataSource _setPrimaryLoadComplete:]):
16806         (-[WebDataSource _responses]):
16807         (-[WebDataSource _makeRepresentation]):
16808         (-[WebDataSource _isClientRedirect]):
16809         (-[WebDataSource _originalRequest]):
16810         (-[WebDataSource _URLForHistory]):
16811         (-[WebDataSource _addToUnarchiveState:]):
16812         (-[WebDataSource _setOverrideEncoding:]):
16813         (-[WebDataSource _setIconURL:]):
16814         (-[WebDataSource _setIconURL:withType:]):
16815         (-[WebDataSource _overrideEncoding]):
16816         (-[WebDataSource _setTitle:]):
16817         * WebView/WebDataSourceInternal.h:
16818
16819 2006-08-23  Brady Eidson  <beidson@apple.com>
16820
16821         Reviewed by John Sullivan
16822
16823         /me crosses fingers
16824         Flip the switch to the new Icon Database
16825         Massive code pruning is coming up
16826
16827         * WebKitPrefix.h: Flipped the switch
16828
16829 2006-08-23  Brady Eidson  <beidson@apple.com>
16830
16831         Reviewed by Beth
16832         Since I just pushed the default URL icon from WebKit to WebCore, but
16833         WebKit was still using its version of the default icon, this patch makes it
16834         use the WebCore version
16835
16836         * Misc/WebIconDatabase.m:
16837         (-[WebIconDatabase defaultIconWithSize:]):
16838
16839 2006-08-22  Maciej Stachowiak  <mjs@apple.com>
16840
16841         Reviewed by Brady.
16842         
16843         - remove "loading" flag from WebDataSource and code that manages it; it is redundat.
16844
16845         * Loader/WebFrameLoader.m:
16846         (-[WebFrameLoader addPlugInStreamLoader:]):
16847         (-[WebFrameLoader removePlugInStreamLoader:]):
16848         (-[WebFrameLoader addSubresourceLoader:]):
16849         (-[WebFrameLoader removeSubresourceLoader:]):
16850         * WebView/WebDataSource.m:
16851         (-[WebDataSourcePrivate dealloc]):
16852         (-[WebDataSource _setPrimaryLoadComplete:]):
16853         (-[WebDataSource _stopLoading]):
16854         (-[WebDataSource _prepareForLoadStart]):
16855         (-[WebDataSource _startLoading]):
16856         (-[WebDataSource isLoading]):
16857         * WebView/WebDataSourceInternal.h:
16858
16859 2006-08-22  Maciej Stachowiak  <mjs@apple.com>
16860
16861         Reviewed by Eric.
16862
16863         <rdar://problem/4683948> REGRESSION: Assertion failure in [FrameProgressEntry addChild:forDataSource:] (fandango.com)
16864         
16865         * Loader/WebFrameLoader.m:
16866         (-[WebFrameLoader addSubresourceLoader:]): Add a WebKit-level assertion that should fire when this bad
16867         situation occurs.
16868         * Loader/WebSubresourceLoader.m:
16869         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]): Prevent
16870         the situation from occuring.
16871
16872 2006-08-22  Maciej Stachowiak  <mjs@apple.com>
16873
16874         Reviewed by Anders.
16875         
16876         - pull more WebDataSource code into WebFrameLoader
16877         - make WebMainResourceLoader not depend on WebKit or on SPI
16878
16879         * Loader/WebFrameLoader.h:
16880         * Loader/WebFrameLoader.m:
16881         (-[WebFrameLoader _downloadWithLoadingConnection:request:response:proxy:]):
16882         (-[WebFrameLoader _updateIconDatabaseWithURL:]):
16883         (-[WebFrameLoader _notifyIconChanged:]):
16884         (-[WebFrameLoader _iconLoaderReceivedPageIcon:]):
16885         (-[WebFrameLoader _checkNavigationPolicyForRequest:andCall:withSelector:]):
16886         (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
16887         (-[WebFrameLoader cancelContentPolicy]):
16888         * Loader/WebIconLoader.m:
16889         (-[WebIconLoader didFinishLoading]):
16890         * Loader/WebLoader.m:
16891         (-[NSURLProtocol loadWithRequest:]):
16892         (-[NSURLProtocol setDefersCallbacks:]):
16893         * Loader/WebMainResourceLoader.h:
16894         * Loader/WebMainResourceLoader.m:
16895         (-[WebMainResourceLoader initWithFrameLoader:]):
16896         (-[WebMainResourceLoader dealloc]):
16897         (-[WebMainResourceLoader cancelWithError:]):
16898         (-[WebMainResourceLoader continueAfterNavigationPolicy:formState:]):
16899         (-[WebMainResourceLoader willSendRequest:redirectResponse:]):
16900         (-[WebMainResourceLoader continueAfterContentPolicy:]):
16901         (-[WebMainResourceLoader checkContentPolicy]):
16902         (-[WebMainResourceLoader didReceiveResponse:]):
16903         * Plugins/WebPluginContainerCheck.m:
16904         * WebCoreSupport/WebSystemInterface.m:
16905         (InitWebCoreSystemInterface):
16906         * WebView/WebDataSource.m:
16907         (-[WebDataSource _loadIcon]):
16908         (-[WebDataSource _cancelledError]):
16909         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
16910         (+[WebDataSource _representationClassForMIMEType:]):
16911         (-[WebDataSource _commitLoadWithData:]):
16912         (-[WebDataSource _isDocumentHTML]):
16913         * WebView/WebDataSourceInternal.h:
16914         * WebView/WebFramePrivate.h:
16915         * WebView/WebPolicyDelegate.m:
16916         * WebView/WebPolicyDelegatePrivate.h:
16917
16918 2006-08-21  Maciej Stachowiak  <mjs@apple.com>
16919
16920         Reviewed by Brady.
16921         
16922         - move more code from WebDataSource to WebFrameLoader
16923         
16924         Also marked a few more methods in WebDataSource as likely MOVABLE in a future round, since they do not
16925         use any of WebDataSource's private data.
16926
16927         * Loader/WebFrameLoader.h:
16928         * Loader/WebFrameLoader.m:
16929         (-[WebFrameLoader addPlugInStreamLoader:]):
16930         (-[WebFrameLoader removePlugInStreamLoader:]):
16931         (-[WebFrameLoader addSubresourceLoader:]):
16932         (-[WebFrameLoader removeSubresourceLoader:]):
16933         (-[WebFrameLoader _didReceiveAuthenticationChallenge:forResource:]):
16934         (-[WebFrameLoader _didCancelAuthenticationChallenge:forResource:]):
16935         (-[WebFrameLoader _didReceiveResponse:forResource:]):
16936         (-[WebFrameLoader _didReceiveData:contentLength:forResource:]):
16937         (-[WebFrameLoader _didFinishLoadingForResource:]):
16938         (-[WebFrameLoader _didFailLoadingWithError:forResource:]):
16939         (-[WebFrameLoader _privateBrowsingEnabled]):
16940         (-[WebFrameLoader _finishedLoadingResource]):
16941         (-[WebFrameLoader _receivedError:]):
16942         (-[WebFrameLoader _finishedLoading]):
16943         * Loader/WebMainResourceLoader.m:
16944         (-[WebMainResourceLoader didReceiveData:lengthReceived:allAtOnce:]):
16945         (-[WebMainResourceLoader didFinishLoading]):
16946         * Loader/WebNetscapePlugInStreamLoader.m:
16947         (-[WebNetscapePlugInStreamLoader didFinishLoading]):
16948         (-[WebNetscapePlugInStreamLoader didFailWithError:]):
16949         (-[WebNetscapePlugInStreamLoader cancelWithError:]):
16950         * Loader/WebSubresourceLoader.m:
16951         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]):
16952         (-[WebSubresourceLoader signalFinish]):
16953         (-[WebSubresourceLoader didFailWithError:]):
16954         (-[WebSubresourceLoader cancel]):
16955         * Plugins/WebNetscapePluginStream.m:
16956         (-[WebNetscapePluginStream start]):
16957         * WebView/WebDataSource.m:
16958         (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]):
16959         (-[WebDataSource _updateIconDatabaseWithURL:]):
16960         (-[WebDataSource _loadIcon]):
16961         (-[WebDataSource _setPrimaryLoadComplete:]):
16962         (-[WebDataSource _cancelledError]):
16963         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
16964         (+[WebDataSource _representationClassForMIMEType:]):
16965         (-[WebDataSource _commitLoadWithData:]):
16966         (-[WebDataSource _receivedMainResourceError:complete:]):
16967         (-[WebDataSource _iconLoaderReceivedPageIcon:]):
16968         (-[WebDataSource _isDocumentHTML]):
16969         * WebView/WebDataSourceInternal.h:
16970
16971 2006-08-21  Brady Eidson  <beidson@apple.com>
16972
16973         Reviewed by John
16974
16975         Quick ICONDEBUG flag fix
16976
16977         * Misc/WebIconDatabase.m:
16978         (-[WebIconDatabase _applicationWillTerminate:]):
16979
16980 2006-08-21  Brady Eidson  <beidson@apple.com>
16981
16982         Reviewed by Anders
16983
16984         -Renamed an internal only method for clarity
16985         -Tweaked WebDataSource for notification purposes with the new expiring icons
16986         -Fixed a bug with the ICONDEBUG flag
16987
16988         * Misc/WebIconDatabase.m:
16989         (-[WebIconDatabase init]):
16990         (-[WebIconDatabase iconForURL:withSize:cache:]): #ifdef bug fixed
16991         (-[WebIconDatabase _hasEntryForIconURL:]): Renamed for clarity
16992         * Misc/WebIconDatabasePrivate.h:
16993         * WebView/WebDataSource.m:
16994         (-[WebDataSource _updateIconDatabaseWithURL:]):
16995         (-[WebDataSource _notifyIconChanged:]):
16996         (-[WebDataSource _loadIcon]):
16997         (-[WebDataSource _iconLoaderReceivedPageIcon:]):
16998
16999 2006-08-17  Maciej Stachowiak  <mjs@apple.com>
17000
17001         Reviewed by Brady.
17002         
17003         - pull a bit of WebDataSource code into WebFrameLoader
17004
17005         * Loader/WebFrameLoader.m:
17006         (-[WebFrameLoader _receivedError:]):
17007         (-[WebFrameLoader webFrame]):
17008         (-[WebFrameLoader _handleFallbackContent]):
17009         (+[WebFrameLoader _canShowMIMEType:]):
17010         (+[WebFrameLoader _representationExistsForURLScheme:]):
17011         (+[WebFrameLoader _generatedMIMETypeForURLScheme:]):
17012         * WebView/WebDataSource.m:
17013         * WebView/WebDataSourceInternal.h:
17014
17015 2006-08-17  Timothy Hatcher  <timothy@apple.com>
17016
17017         Reviewed by Kevin Decker.
17018
17019         <rdar://problem/4606857> WebKit: WebPreferencesChangedNotification not exported in 64-bit
17020
17021         * WebKit.LP64.exp:
17022
17023 2006-08-17  Timothy Hatcher  <timothy@apple.com>
17024
17025         Reviewed by Kevin Decker.
17026
17027         <rdar://problem/4633896> -[WebView close] should clear all delegates and call setHostWindow:nil
17028         <rdar://problem/4649759> Crash when selecting View Source menu using Chinese (-[WebView _close])
17029
17030         Check to make sure _private is not null. A WebView can be dealloced before _private is setup.
17031         Set the _private->closed flag at the beginning of _close to prevent reentry.
17032         Set the host window and all the delegates to nil in _close.
17033
17034         * WebView/WebView.m:
17035         (-[WebView _close]):
17036
17037 2006-08-16  Brady Eidson  <beidson@apple.com>
17038
17039         Reviewed by Maciej
17040
17041         * Misc/WebIconDatabase.m: Pruned unused method
17042         * Misc/WebIconDatabasePrivate.h: Ditto
17043
17044
17045 2006-08-15  Maciej Stachowiak  <mjs@apple.com>
17046
17047         Reviewed by Adele (preliminary version) and later by Kevin.
17048         
17049         - remove most WebKit dependencies from WebMainResourceLoader.
17050
17051         * Loader/WebFrameLoader.h:
17052         * Loader/WebFrameLoader.m:
17053         (-[WebFrameLoader cannotShowMIMETypeForURL:]):
17054         (-[WebFrameLoader interruptForPolicyChangeErrorWithRequest:]):
17055         (-[WebFrameLoader isHostedByObjectElement]):
17056         (-[WebFrameLoader isLoadingMainFrame]):
17057         (+[WebFrameLoader _canShowMIMEType:]):
17058         (+[WebFrameLoader _representationExistsForURLScheme:]):
17059         (+[WebFrameLoader _generatedMIMETypeForURLScheme:]):
17060         * Loader/WebMainResourceLoader.h:
17061         * Loader/WebMainResourceLoader.m:
17062         (-[WebMainResourceLoader interruptForPolicyChangeError]):
17063         (-[WebMainResourceLoader willSendRequest:redirectResponse:]):
17064         (isCaseInsensitiveEqual):
17065         (shouldLoadAsEmptyDocument):
17066         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
17067         (-[WebMainResourceLoader didReceiveResponse:]):
17068         (-[WebMainResourceLoader didReceiveData:lengthReceived:allAtOnce:]):
17069         (-[WebMainResourceLoader didFinishLoading]):
17070         (-[WebMainResourceLoader loadWithRequestNow:]):
17071         (-[WebMainResourceLoader loadWithRequest:]):
17072
17073 2006-08-15  Tim Omernick  <timo@apple.com>
17074
17075         Reviewed by Kevin Decker.
17076
17077         * Plugins/WebNetscapePluginPackage.m:
17078         (-[WebNetscapePluginPackage _unloadWithShutdown:]):
17079         Fixed a subtle problem with the 64-bit debug build -- as written, this would LOG() on 64-bit and do nothing on
17080         32-bit!
17081         * Plugins/WebPluginDatabase.m:
17082         (-[WebPluginDatabase _scanForNewPlugins]):
17083         Use +[NSMutableSet set] here.
17084
17085 2006-08-15  Tim Omernick  <timo@apple.com>
17086
17087         Reviewed by Darin Adler.
17088
17089         <http://bugs.webkit.org/show_bug.cgi?id=8980>
17090         ASSERTION FAILED: !isLoaded (WebKit/WebKit/Plugins/WebBasePluginPackage.m:228 -[WebBasePluginPackage dealloc])
17091
17092         <rdar://problem/4526052> intermittent assertion failure in -[WebBasePluginPackage dealloc] running layout tests (8980)
17093         
17094         * Plugins/WebPluginDatabase.h:
17095         * Plugins/WebPluginDatabase.m:
17096         (+[WebPluginDatabase installedPlugins]):
17097         Observe NSApplicationWillTerminateNotification so we can unload plug-ins on quit.
17098         (-[WebPluginDatabase plugins]):
17099         'plugins' is now a dictionary.
17100         (-[WebPluginDatabase close]):
17101         Call new -_removePlugin: method.
17102         (-[WebPluginDatabase refresh]):
17103         Moved parts of this method out into other methods: -_addPlugin:, -_removePlugin:, and -_scanForNewPlugins.
17104         (-[WebPluginDatabase _plugInPaths]):
17105         No changes; just moved in file.
17106         (-[WebPluginDatabase _addPlugin:]):
17107         New method.  Refactored from -refresh.  Adds a plug-in to the database.
17108         (-[WebPluginDatabase _removePlugin:]):
17109         New method.  Refactored from -refresh.  Remove a plug-in from the database.
17110         (-[WebPluginDatabase _scanForNewPlugins]):
17111         New method.  Refactored from -refresh.  Returns the list of plug-in packages on disk.
17112         (-[WebPluginDatabase _applicationWillTerminate]):
17113         New method.  Called when the application terminates.  Closes the plug-in database so that all plug-ins are
17114         removed from the DB (and unloaded if necessary).
17115
17116         * Plugins/WebBasePluginPackage.h:
17117         * Plugins/WebBasePluginPackage.m:
17118         (-[WebBasePluginPackage initWithPath:]):
17119         Try to create the NSBundle first, so if the file is not a valid bundle we bail out early.  This
17120         avoids some stat()s and allocations during the plug-in refresh process.
17121         (-[WebBasePluginPackage isLoaded]):
17122         Removed.
17123         (-[WebBasePluginPackage load]):
17124         Base class for plug-in packages now always loads "successfully".
17125         (-[WebBasePluginPackage dealloc]):
17126         Removed this assertion.  The base plug-in package class has no concept of
17127         "unloading".
17128         (-[WebBasePluginPackage finalize]):
17129         ditto.
17130         (-[WebBasePluginPackage wasRemovedFromPluginDatabase:]):
17131         Moved code to unload plug-in package to WebNetscapePluginPackage.  Not all plug-in
17132         packages can be "unloaded".
17133
17134         * Plugins/WebNetscapePluginPackage.h:
17135         * Plugins/WebNetscapePluginPackage.m:
17136         (-[WebNetscapePluginPackage _unloadWithShutdown:]):
17137         Combined old -unload and -unloadWithoutShutdown methods into this new one.
17138         (-[WebNetscapePluginPackage initWithPath:]):
17139         Call new unload method.
17140         (-[WebNetscapePluginPackage load]):
17141         ditto
17142         (-[WebNetscapePluginPackage wasRemovedFromPluginDatabase:]):
17143         ditto
17144         (-[WebNetscapePluginPackage open]):
17145         New method.  Called when a plug-in instance starts running.
17146         (-[WebNetscapePluginPackage close]):
17147         New method.  Called when a plug-in instance stops running.  When all plug-in instances
17148         close the plug-in package, and the plug-in package is removed from the database, the plug-in
17149         is unloaded.
17150
17151         * Plugins/WebPluginPackage.m:
17152         (-[WebPluginPackage initWithPath:]):
17153         (-[WebPluginPackage load]):
17154         Made this a bit more efficient by checking if the bundle is already loaded.
17155         (-[WebBasePluginPackage unload]):
17156         Removed.
17157         (-[WebBasePluginPackage isLoaded]):
17158         Removed.
17159
17160         * Plugins/WebBaseNetscapePluginView.m:
17161         (-[WebBaseNetscapePluginView start]):
17162         Open the plug-in package so it remains loaded while this instance uses it.
17163         (-[WebBaseNetscapePluginView stop]):
17164         Close the plug-in package when the plug-in instance is stopped.
17165         
17166         * Plugins/WebBaseNetscapePluginStream.m:
17167         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
17168         This check is not necessary.  Netscape plug-in packages are never unloaded until all their instances have
17169         been stopped, and a Netscape plug-in instance will stop its streams when it is stopped.
17170         (-[WebBaseNetscapePluginStream _destroyStream]):
17171         ditto
17172         (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
17173         ditto
17174         (-[WebBaseNetscapePluginStream _deliverData]):
17175         ditto
17176
17177 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
17178
17179         Reviewed by Tim H.
17180
17181         Build fix:  DWARF and -gfull are incompatible with symbol separation.
17182
17183         * WebKit.xcodeproj/project.pbxproj:
17184
17185 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
17186
17187         Reviewed by Tim H.
17188
17189         http://bugs.webkit.org/show_bug.cgi?id=10394
17190         Bug 10394: WebKit Release and Production configurations should enable dead code stripping
17191
17192         * WebKit.xcodeproj/project.pbxproj:
17193
17194 2006-08-15  Maciej Stachowiak  <mjs@apple.com>
17195
17196         Reviewed by Anders.
17197         
17198         - remove WebKit dependencies from WebPlugInStreamLoader via a protocol veil of ignorance
17199
17200         * Loader/WebNetscapePlugInStreamLoader.h:
17201         * Loader/WebNetscapePlugInStreamLoader.m:
17202         (-[WebNetscapePlugInStreamLoader initWithDelegate:frameLoader:]):
17203         * Loader/WebPlugInStreamLoaderDelegate.h: Added.
17204         * Plugins/WebBaseNetscapePluginStream.h:
17205         * Plugins/WebNetscapePluginStream.m:
17206         (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
17207         * WebKit.xcodeproj/project.pbxproj:
17208
17209 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
17210
17211         Reviewed by Tim H.
17212
17213         http://bugs.webkit.org/show_bug.cgi?id=10384
17214         Bug 10384: Switch to DWARF for Release configuration
17215
17216         * WebKit.xcodeproj/project.pbxproj:
17217
17218 2006-08-15  Graham Dennis  <graham.dennis@gmail.com>
17219
17220         Reviewed by Darin.
17221         
17222         - patch for http://bugs.webkit.org/show_bug.cgi?id=10314
17223           WebUnarchivingState archivedResourceForURL: doesn't work
17224
17225         * WebView/WebUnarchivingState.m:
17226         (-[WebUnarchivingState archivedResourceForURL:]):
17227         Fixed to get objects from the archived resources dictionary using
17228         the URL as a string instead of as the URL itself (as this is how
17229         the data is put into the dictionary).
17230
17231 2006-08-14  Maciej Stachowiak  <mjs@apple.com>
17232
17233         Reviewed by Beth.
17234         
17235         - remove many (but not all) WebKit dependencies from WebNetscapePlugInStreamLoader (it still 
17236         depends on WebNetscapePluginStream).
17237
17238         * Loader/WebFrameLoader.h:
17239         * Loader/WebFrameLoader.m:
17240         (-[WebFrameLoader fileDoesNotExistErrorWithResponse:]):
17241         * Loader/WebNetscapePlugInStreamLoader.h:
17242         * Loader/WebNetscapePlugInStreamLoader.m:
17243         (-[WebNetscapePlugInStreamLoader initWithStream:frameLoader:]):
17244         (-[WebNetscapePlugInStreamLoader releaseResources]):
17245         (-[WebNetscapePlugInStreamLoader didReceiveResponse:]):
17246         * Plugins/WebNetscapePluginStream.m:
17247         (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
17248
17249 2006-08-14  Maciej Stachowiak  <mjs@apple.com>
17250
17251         Reviewed by Tim Omernick.
17252         
17253         - fixed REGRESSION: crash when leaving youtube page while movie is still loading
17254         http://bugs.webkit.org/show_bug.cgi?id=10398
17255
17256         * Loader/WebNetscapePlugInStreamLoader.m:
17257         (-[WebNetscapePlugInStreamLoader initWithStream:view:]): Set the frame loader for this stream.
17258         (-[WebNetscapePlugInStreamLoader cancelWithError:]): Make sure to destroy the stream as well;
17259         otherwise, when we try to clean up later, we won't have the right context.
17260
17261 2006-08-14  David Hyatt  <hyatt@apple.com>
17262
17263         Fix for Radar bug 4478840, Safari should not reduce null events sent to
17264         plug-ins in windows that are inactive but visible.
17265
17266         With this fix you can view videos in visible background windows on YouTube
17267         (for example) and not see any drop in frame rate.
17268
17269         Reviewed by timo
17270
17271         * Plugins/WebBaseNetscapePluginView.m:
17272         (-[WebBaseNetscapePluginView restartNullEvents]):
17273
17274 2006-08-14  Maciej Stachowiak  <mjs@apple.com>
17275
17276         Reviewed by Brady.
17277         
17278         - removed WebKit-level dependencies from WebFormDataStream. Use WebCore version of system interface
17279
17280         * Loader/WebFormDataStream.m:
17281         (formCanRead):
17282         (formEventCallback):
17283         (webSetHTTPBody):
17284         * WebCoreSupport/WebSystemInterface.m:
17285         (InitWebCoreSystemInterface):
17286
17287 2006-08-14  Maciej Stachowiak  <mjs@apple.com>
17288
17289         Rubber stamped by Brady.
17290         
17291         - move WebFormDataStream from WebView to Loader
17292
17293         * WebKit.xcodeproj/project.pbxproj:
17294         * WebView/WebFormDataStream.h: Removed.
17295         * WebView/WebFormDataStream.m: Removed.
17296
17297 2006-08-13  Maciej Stachowiak  <mjs@apple.com>
17298
17299         Reviewed by Brady.
17300         
17301         - remove WebKit dependencies from WebSubresourceLoader, except WebFormDataStream
17302         
17303         (WebFormDataStream will be moved into the Loader directory soon)
17304
17305         * Loader/WebFrameLoader.h:
17306         * Loader/WebFrameLoader.m:
17307         (-[WebFrameLoader _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
17308         * Loader/WebSubresourceLoader.m:
17309         (isConditionalRequest):
17310         (hasCaseInsensitivePrefix):
17311         (isFileURLString):
17312         (setHTTPReferrer):
17313         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]):
17314
17315 2006-08-13  Brady Eidson  <beidson@apple.com>
17316
17317         Reviewed by Maciej
17318
17319         Relocated the WebIconLoaders
17320
17321         * Misc/WebIconLoader.h: Moved to Loader/
17322         * Misc/WebIconLoader.m: Moved to Loader/
17323         * WebKit.xcodeproj/project.pbxproj:
17324
17325 2006-08-13  Maciej Stachowiak  <mjs@apple.com>
17326
17327         Reviewed by Beth.
17328         
17329         - removed non-Loader WebKit dependencies from WebDataProtocol for
17330         real (whoops) and fix some typos.
17331
17332         * Loader/WebDataProtocol.m:
17333         (isCaseInsensitiveEqual): Added.
17334         (+[WebDataProtocol _webIsDataProtocolURL:]): Avoid WebKit calls.
17335         (-[WebDataProtocol startLoading]): ditto
17336         * Loader/WebFrameLoader.m:
17337         (isCaseInsensitiveEqual): Fixed spelling from isCaseSensitiveEqual.
17338         (-[WebFrameLoader _canUseResourceForRequest:]): Use proper call.
17339
17340 2006-08-13  Brady Eidson  <beidson@apple.com>
17341
17342         Reviewed by Maciej
17343
17344         The way of detecting a failed icon load before was to try and construct
17345         an image from the icon and if that image construction failed, mark the icon
17346         as missing.  
17347         A much more efficient way is to check for an error response.  We'll still
17348         check for invalid image data, but most servers will correctly return an HTTP 
17349         error on a missing icon.
17350         
17351         * Misc/WebIconLoader.m:
17352         (-[WebIconLoader didFinishLoading]): Added check for http error response
17353
17354 2006-08-13  Maciej Stachowiak  <mjs@apple.com>
17355
17356         Reviewed by Darin.
17357         
17358         - remove all non-Loader dependencies from WebLoader
17359         
17360         As part of this I moved WebDataProtocol to the loader directory
17361         and removed dependencies on the rest of WebKit from that too.
17362
17363         * Loader/WebFrameLoader.h:
17364         * Loader/WebFrameLoader.m:
17365         (-[WebFrameLoader setDefersCallbacks:]):
17366         (-[WebFrameLoader stopLoading]):
17367         (-[WebFrameLoader cancelledErrorWithRequest:]):
17368         (-[WebFrameLoader clearArchivedResources]):
17369         (-[WebFrameLoader deliverArchivedResources]):
17370         (-[WebFrameLoader deliverArchivedResourcesAfterDelay]):
17371         (isCaseSensitiveEqual):
17372         (-[WebFrameLoader _canUseResourceForRequest:]):
17373         (-[WebFrameLoader _canUseResourceWithResponse:]):
17374         (-[WebFrameLoader pendingArchivedResources]):
17375         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
17376         (-[WebFrameLoader archiveLoadPendingForLoader:]):
17377         (-[WebFrameLoader cancelPendingArchiveLoadForLoader:]):
17378         * Loader/WebLoader.h:
17379         * Loader/WebLoader.m:
17380         (-[NSURLProtocol releaseResources]):
17381         (-[NSURLProtocol loadWithRequest:]):
17382         (-[NSURLProtocol setDefersCallbacks:]):
17383         (-[NSURLProtocol addData:allAtOnce:]):
17384         (-[NSURLProtocol resourceData]):
17385         (-[NSURLProtocol didReceiveData:lengthReceived:allAtOnce:]):
17386         (-[NSURLProtocol connection:didReceiveData:lengthReceived:]):
17387         (-[NSURLProtocol cancelWithError:]):
17388         (-[NSURLProtocol cancelledError]):
17389         * Loader/WebMainResourceLoader.m:
17390         (-[WebMainResourceLoader addData:allAtOnce:]):
17391         (-[WebMainResourceLoader didReceiveData:lengthReceived:allAtOnce:]):
17392         * Loader/WebNetscapePlugInStreamLoader.m:
17393         (-[WebNetscapePlugInStreamLoader didReceiveData:lengthReceived:allAtOnce:]):
17394         * Loader/WebSubresourceLoader.m:
17395         (-[WebSubresourceLoader didReceiveData:lengthReceived:allAtOnce:]):
17396         * WebKit.xcodeproj/project.pbxproj:
17397         * WebView/WebDataProtocol.h: Removed.
17398         * WebView/WebDataProtocol.m: Removed.
17399
17400 2006-08-11  Tim Omernick  <timo@apple.com>
17401
17402         Reviewed by Darin.
17403
17404         <http://bugs.webkit.org/show_bug.cgi?id=10111> - Menu flickers over Flash content
17405         <rdar://problem/3052546> Plugins don't work with z-index (overlapping elements, etc.)
17406
17407         * Plugins/WebBaseNetscapePluginView.m:
17408         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
17409         Don't just clip to the dirty region for "transparent" plug-ins -- do it for all plug-ins.  This is a
17410         generally useful thing to do, as it prevents the plug-in from drawing over parts of the window that
17411         have already been drawn and are not expected to be redrawn in the same update.
17412
17413 2006-08-11  Brady Eidson  <beidson@apple.com>
17414
17415         Reviewed by John, Timo, Adele, and Darin
17416
17417         In addition to a few style/good-practice cleanups, this patch will convert the old icon database
17418         format to the WebCore format if the WebCore db is empty (implying this conversion has yet to take
17419         place).  After the conversion, it will delete all traces of the old format to free the unneeded space
17420
17421         * Misc/WebIconDatabase.m:
17422         (-[WebIconDatabase init]):  
17423         (-[WebIconDatabase _setIconURL:forURL:]):  Changed the bridge's name for this method to be more clear
17424         (-[WebIconDatabase _createFileDatabase]):  
17425         (-[WebIconDatabase _iconDataForIconURL:]):  This grabs the raw data for use in the conversion function
17426         (-[WebIconDatabase _convertToWebCoreFormat]):  This does the actual conversion
17427
17428 2006-08-11  Tim Omernick  <timo@apple.com>
17429
17430         Reviewed by John Sullivan.
17431         
17432         Needed for <rdar://problem/4678070>.
17433
17434         * Plugins/WebBaseNetscapePluginView.m:
17435         (-[WebBaseNetscapePluginView sendEvent:]):
17436         Changed an assertion to an early return.  It should be possible to send events, especially updateEvt (for image capturing
17437         purposes), to off-screen plug-ins.  It just doesn't work right now.  See <rdar://problem/4318269>.
17438
17439 2006-08-11  John Sullivan  <sullivan@apple.com>
17440
17441         Reviewed by Darin
17442         
17443         - fixed <rdar://problem/4522894> Would be nice if Safari shrank pages a little if necessary 
17444         to avoid printing an almost-empty page
17445
17446         * WebView/WebHTMLView.m:
17447         (-[NSArray knowsPageRange:]):
17448         If the last page has a short-enough orphan (< 1/10 of the page height is the number I pulled
17449         out of ... the air), then we adjust the scale factor slightly and check whether this reduces
17450         the page count and thus eliminates the orphan.
17451         
17452 2006-08-07  Brady Eidson  <beidson@apple.com>
17453
17454         Reviewed by Anders and John
17455
17456         * Misc/WebIconDatabase.m:
17457         (-[WebIconDatabase init]):
17458         (-[WebIconDatabase isIconExpiredForIconURL:]): Get if an icon expired
17459         (-[WebIconDatabase isIconExpiredForPageURL:]): Ditto
17460         (-[WebIconDatabase _setIconURL:forURL:]):
17461         (-[WebIconDatabase _sendNotificationForURL:]): Moved to WebKitPendingPublic for use outside of WebIconDatabase
17462         (-[WebIconDatabase loadIconFromURL:]): Allow a load outside the context of a page load
17463         * Misc/WebIconDatabasePrivate.h:
17464
17465         * Misc/WebIconLoader.m:
17466         (-[WebIconLoader didFinishLoading]): fixed up the "flipping the switch" #defs a bit
17467         (-[WebIconLoader willSendRequest:redirectResponse:]): override to allow a load
17468         outside of the context of a page load
17469
17470         * WebCoreSupport/WebIconDatabaseBridge.h: Added.
17471         * WebCoreSupport/WebIconDatabaseBridge.m: Added.
17472         (-[WebIconDatabaseBridge init]):
17473         (-[WebIconDatabaseBridge dealloc]):
17474         (-[WebIconDatabaseBridge loadIconFromURL:]):  Kick off a load on an icon outside
17475         of the context of any page load
17476         (-[WebIconDatabaseBridge _setIconData:forIconURL:]):  WebKit side of bridge method
17477         (-[WebIconDatabaseBridge _setHaveNoIconForIconURL:]):  WebKit side of bridge method
17478         (-[WebIconDatabaseBridge releaseCachedLoaderForIconURL:]): 
17479         (+[WebIconDatabaseBridge sharedBridgeInstance]): Moved this from WebCore to WebKit
17480         so both sides of the bridge get the WebKit version
17481         * WebKit.xcodeproj/project.pbxproj: Added some files
17482         * WebView/WebDataSource.m:
17483         (-[WebDataSource _loadIcon]): Added check for reload/expired icon to force
17484         a load even if we already have it
17485
17486 2006-08-04  Sam Weinig  <sam.weinig@gmail.com>
17487
17488         Reviewed by Darin.
17489
17490         - patch for http://bugs.webkit.org/show_bug.cgi?id=10192
17491           Make WebCore (and friends) compile with -Wshorten-64-to-32
17492
17493           * Adds 'f' to float literals where expecting a float.
17494           * Use ceilf() instead of ceil() when assigning to a float.
17495           * Adds explicit casts where OK.
17496           
17497           NOTE: The -Wshorten-64-to-32 flag was not added for WebKit
17498           because there are still a few places where no error handling 
17499           is in place.  The flag can be added as soon as those are worked
17500           out.
17501
17502         * Misc/WebNSControlExtras.m:
17503         (-[NSControl sizeToFitAndAdjustWindowHeight]):
17504         * Misc/WebNSImageExtras.m:
17505         (-[NSImage _web_scaleToMaxSize:]):
17506         * Misc/WebNSViewExtras.h:
17507         * Misc/WebNSViewExtras.m:
17508         * Plugins/WebBaseNetscapePluginView.m:
17509         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
17510         (-[WebBaseNetscapePluginView drawRect:]):
17511         * WebCoreSupport/WebFrameBridge.m:
17512         (-[WebFrameBridge expiresTimeForResponse:]):
17513         * WebInspector/WebInspector.m:
17514         (-[NSWindow window]):
17515         (-[WebInspector treeViewScrollTo:]):
17516         (-[WebInspector _updateSystemColors]):
17517         (-[WebInspector webView:plugInViewWithArguments:]):
17518         (-[WebInspector outlineView:objectValueForTableColumn:byItem:]):
17519         * WebInspector/WebInspectorOutlineView.m:
17520         (-[WebInspectorOutlineView _highlightRow:clipRect:]):
17521         * WebInspector/WebNodeHighlight.m:
17522         (-[WebNodeHighlight initWithBounds:andRects:forView:]):
17523         * WebInspector/WebNodeHighlightView.m:
17524         (-[WebNodeHighlightView roundedRect:withRadius:]):
17525         (-[WebNodeHighlightView initWithHighlight:andRects:forView:]):
17526         (-[WebNodeHighlightView drawRect:]):
17527         * WebView/WebFrame.m:
17528         (-[WebFrame _opened]):
17529         * WebView/WebFrameView.m:
17530         (-[WebFrameView initWithFrame:]):
17531         * WebView/WebHTMLView.m:
17532         (-[WebHTMLView _dragImageForLinkElement:]):
17533         (-[WebHTMLView _web_setPrintingModeRecursive]):
17534         (-[WebHTMLView _web_clearPrintingModeRecursive]):
17535         (-[NSArray layout]):
17536         (-[NSArray _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
17537         (-[NSArray adjustPageHeightNew:top:bottom:limit:]):
17538         (-[NSArray _scaleFactorForPrintOperation:]):
17539         (-[NSArray setPageWidthForPrinting:]):
17540         (-[NSArray _endPrintMode]):
17541         (-[NSArray knowsPageRange:]):
17542         (-[NSArray _originalFontA]):
17543         (-[NSArray _originalFontB]):
17544         (-[WebTextCompleteController _buildUI]):
17545         (-[WebTextCompleteController _placePopupWindow:]):
17546         * WebView/WebPDFView.m:
17547         (-[WebPDFView _makeTextStandardSize:]):
17548         (-[WebPDFView selectionImageForcingWhiteText:]):
17549         (-[PDFPrefUpdatingProxy forwardInvocation:]):
17550         * WebView/WebPreferences.m:
17551         (-[WebPreferences _floatValueForKey:]):
17552         * WebView/WebView.m:
17553         (-[WebView makeTextSmaller:]):
17554         (-[WebView canMakeTextStandardSize]):
17555         (-[WebView makeTextStandardSize:]):
17556
17557 2006-08-04  David Kilzer  <ddkilzer@kilzer.net>
17558
17559         Reviewed by NOBODY (build fix).
17560
17561         * WebCoreSupport/WebSubresourceLoader.m: REALLY moved to Loader/
17562         * WebView/WebFrameLoader.h: REALLY moved to Loader/
17563         * WebView/WebFrameLoader.m: REALLY moved to Loader/
17564         * WebView/WebLoader.h: REALLY moved to Loader/
17565         * WebView/WebLoader.m: REALLY moved to Loader/
17566         * WebView/WebMainResourceLoader.m: REALLY moved to Loader/
17567
17568 2006-08-03  Maciej Stachowiak  <mjs@apple.com>
17569
17570         Reviewed by Darin.
17571         
17572         - moved all loader code that is slated to be moved down to WebCore to a new Loader directory
17573         
17574         (next step is to remove dependencies on the rest of WebKit from this directory)
17575
17576         * Loader/WebNetscapePlugInStreamLoader.h: Added.
17577         * Loader/WebNetscapePlugInStreamLoader.m: Added. Cut out of WebNetscapePluginStream.m
17578         (-[WebNetscapePlugInStreamLoader initWithStream:view:]):
17579         (-[WebNetscapePlugInStreamLoader isDone]):
17580         (-[WebNetscapePlugInStreamLoader releaseResources]):
17581         (-[WebNetscapePlugInStreamLoader didReceiveResponse:]):
17582         (-[WebNetscapePlugInStreamLoader didReceiveData:lengthReceived:]):
17583         (-[WebNetscapePlugInStreamLoader didFinishLoading]):
17584         (-[WebNetscapePlugInStreamLoader didFailWithError:]):
17585         (-[WebNetscapePlugInStreamLoader cancelWithError:]):
17586         * Plugins/WebNetscapePluginStream.m:
17587         * WebKit.xcodeproj/project.pbxproj:
17588         * WebCoreSupport/WebSubresourceLoader.h: Moved to Loader/
17589         * WebCoreSupport/WebSubresourceLoader.m: Moved to Loader/
17590         * WebView/WebFrameLoader.h: Moved to Loader/
17591         * WebView/WebFrameLoader.m: Moved to Loader/
17592         * WebView/WebLoader.h: Moved to Loader/
17593         * WebView/WebLoader.m: Moved to Loader/
17594         * WebView/WebMainResourceLoader.h: Moved to Loader/
17595         * WebView/WebMainResourceLoader.m: Moved to Loader/
17596
17597 2006-08-03  Tim Omernick  <timo@apple.com>
17598
17599         Reviewed by Kevin Decker.
17600
17601         <rdar://problem/4667460> Windowless OpenGL plug-ins render incorrectly on PowerPC
17602
17603         * Plugins/WebBaseNetscapePluginView.m:
17604         (-[WebBaseNetscapePluginView _aglOffscreenImageForDrawingInRect:]):
17605         Fixed color component swapping so that it works on both x86 and PPC.  See comments.
17606
17607 2006-08-03  Brady Eidson  <beidson@apple.com>
17608
17609         Reviewed by Tim Hatcher's rubber stamp
17610         Fixed Intel build break caused by weinig's -W change in r15781
17611
17612         * WebView/WebView.m: wrapped cpu-dependent defs with defined() macro
17613
17614 2006-08-03  Maciej Stachowiak  <mjs@apple.com>
17615
17616         Reviewed by John.
17617
17618         - fixed problem that could cause assertion failures in Safari
17619         
17620         * Plugins/WebBaseNetscapePluginView.m:
17621         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): Don't
17622         allow a plugin to start new loads once its document is no longer the one actively loading.
17623
17624 2006-08-03  Maciej Stachowiak  <mjs@apple.com>
17625
17626         Reviewed by John.
17627         
17628         - remove use of WebDataSource from WebLoader and subclasses, just have them talk to the
17629         WebFrameLoader instead. 
17630         
17631         For now this is done by forarding all the calls.
17632
17633         * Misc/WebIconLoader.m:
17634         (-[WebIconLoader didFinishLoading]):
17635         * Plugins/WebNetscapePluginStream.m:
17636         (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
17637         (-[WebNetscapePluginStream start]):
17638         (-[WebNetscapePlugInStreamLoader didFinishLoading]):
17639         (-[WebNetscapePlugInStreamLoader didFailWithError:]):
17640         (-[WebNetscapePlugInStreamLoader cancelWithError:]):
17641         * WebCoreSupport/WebFrameBridge.m:
17642         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
17643         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
17644         * WebCoreSupport/WebSubresourceLoader.h:
17645         * WebCoreSupport/WebSubresourceLoader.m:
17646         (-[WebSubresourceLoader initWithLoader:frameLoader:]):
17647         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]):
17648         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forFrameLoader:]):
17649         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forFrameLoader:]):
17650         (-[WebSubresourceLoader receivedError:]):
17651         (-[WebSubresourceLoader signalFinish]):
17652         (-[WebSubresourceLoader didFailWithError:]):
17653         (-[WebSubresourceLoader cancel]):
17654         * WebKit.xcodeproj/project.pbxproj:
17655         * WebView/WebDataSource.m:
17656         (-[WebDataSource _updateLoading]):
17657         (-[WebDataSource textEncodingName]):
17658         (-[WebDataSource _mainReceivedBytesSoFar:complete:]):
17659         * WebView/WebFrameLoader.h:
17660         * WebView/WebFrameLoader.m:
17661         (-[WebFrameLoader loadIconWithRequest:]):
17662         (-[WebFrameLoader startLoadingMainResourceWithRequest:identifier:]):
17663         (-[WebFrameLoader clearIconLoader]):
17664         (-[WebFrameLoader commitProvisionalLoad]):
17665         (-[WebFrameLoader activeDataSource]):
17666         (-[WebFrameLoader _archivedSubresourceForURL:]):
17667         (-[WebFrameLoader _defersCallbacks]):
17668         (-[WebFrameLoader _identifierForInitialRequest:]):
17669         (-[WebFrameLoader _willSendRequest:forResource:redirectResponse:]):
17670         (-[WebFrameLoader _didReceiveAuthenticationChallenge:forResource:]):
17671         (-[WebFrameLoader _didCancelAuthenticationChallenge:forResource:]):
17672         (-[WebFrameLoader _didReceiveResponse:forResource:]):
17673         (-[WebFrameLoader _didReceiveData:contentLength:forResource:]):
17674         (-[WebFrameLoader _didFinishLoadingForResource:]):
17675         (-[WebFrameLoader _didFailLoadingWithError:forResource:]):
17676         (-[WebFrameLoader _privateBrowsingEnabled]):
17677         (-[WebFrameLoader _addPlugInStreamLoader:]):
17678         (-[WebFrameLoader _removePlugInStreamLoader:]):
17679         (-[WebFrameLoader _finishedLoadingResource]):
17680         (-[WebFrameLoader _receivedError:]):
17681         (-[WebFrameLoader _addSubresourceLoader:]):
17682         (-[WebFrameLoader _removeSubresourceLoader:]):
17683         (-[WebFrameLoader _originalRequest]):
17684         (-[WebFrameLoader webFrame]):
17685         (-[WebFrameLoader _receivedMainResourceError:complete:]):
17686         (-[WebFrameLoader initialRequest]):
17687         (-[WebFrameLoader _receivedData:]):
17688         (-[WebFrameLoader _setRequest:]):
17689         (-[WebFrameLoader _downloadWithLoadingConnection:request:response:proxy:]):
17690         (-[WebFrameLoader _handleFallbackContent]):
17691         (-[WebFrameLoader _isStopping]):
17692         (-[WebFrameLoader _decidePolicyForMIMEType:decisionListener:]):
17693         (-[WebFrameLoader _setupForReplaceByMIMEType:]):
17694         (-[WebFrameLoader _setResponse:]):
17695         (-[WebFrameLoader _mainReceivedError:complete:]):
17696         (-[WebFrameLoader _finishedLoading]):
17697         (-[WebFrameLoader _mainReceivedBytesSoFar:complete:]):
17698         (-[WebFrameLoader _iconLoaderReceivedPageIcon:]):
17699         (-[WebFrameLoader _URL]):
17700         * WebView/WebLoader.h:
17701         * WebView/WebLoader.m:
17702         (-[NSURLProtocol releaseResources]):
17703         (-[NSURLProtocol loadWithRequest:]):
17704         (-[NSURLProtocol setFrameLoader:]):
17705         (-[NSURLProtocol frameLoader]):
17706         (-[NSURLProtocol willSendRequest:redirectResponse:]):
17707         (-[NSURLProtocol didReceiveAuthenticationChallenge:]):
17708         (-[NSURLProtocol didCancelAuthenticationChallenge:]):
17709         (-[NSURLProtocol didReceiveResponse:]):
17710         (-[NSURLProtocol didReceiveData:lengthReceived:]):
17711         (-[NSURLProtocol signalFinish]):
17712         (-[NSURLProtocol didFailWithError:]):
17713         (-[NSURLProtocol willCacheResponse:]):
17714         (-[NSURLProtocol cancelWithError:]):
17715         * WebView/WebMainResourceLoader.h:
17716         * WebView/WebMainResourceLoader.m:
17717         (-[WebMainResourceLoader initWithFrameLoader:]):
17718         (-[WebMainResourceLoader receivedError:]):
17719         (-[WebMainResourceLoader cancelWithError:]):
17720         (-[WebMainResourceLoader _isPostOrRedirectAfterPost:redirectResponse:]):
17721         (-[WebMainResourceLoader addData:]):
17722         (-[WebMainResourceLoader willSendRequest:redirectResponse:]):
17723         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
17724         (-[WebMainResourceLoader continueAfterContentPolicy:]):
17725         (-[WebMainResourceLoader checkContentPolicyForResponse:]):
17726         (-[WebMainResourceLoader didReceiveResponse:]):
17727         (-[WebMainResourceLoader didReceiveData:lengthReceived:]):
17728         (-[WebMainResourceLoader didFinishLoading]):
17729         (-[WebMainResourceLoader didFailWithError:]):
17730         (-[WebMainResourceLoader loadWithRequestNow:]):
17731
17732 2006-08-03  Sam Weinig  <sam.weinig@gmail.com>
17733
17734         Reviewed by Darin.
17735
17736         - patch for http://bugs.webkit.org/show_bug.cgi?id=10176
17737           Make WebCore compile with -Wundef
17738
17739           * Adds -Wundef flag to Xcode project
17740           * Converts #ifs to #ifdef and #ifndefs where needed.
17741
17742         * Carbon/CarbonUtils.m:
17743         * Carbon/CarbonWindowAdapter.m:
17744         * Carbon/HIViewAdapter.m:
17745         (+[NSView bindHIViewToNSView:nsView:]):
17746         * Carbon/HIWebView.m:
17747         (HIWebViewEventHandler):
17748         * Misc/WebFileDatabase.m:
17749         (UniqueFilePathForKey):
17750         * Misc/WebNSWindowExtras.m:
17751         (swizzleInstanceMethod):
17752         * Misc/WebTypesInternal.h:
17753         * Plugins/WebNetscapeDeprecatedFunctions.c:
17754         * Plugins/WebNetscapeDeprecatedFunctions.h:
17755         * Plugins/WebNetscapePluginPackage.h:
17756         * Plugins/WebNetscapePluginPackage.m:
17757         (-[WebNetscapePluginPackage unloadWithoutShutdown]):
17758         (-[WebNetscapePluginPackage load]):
17759         * WebKit.xcodeproj/project.pbxproj:
17760
17761 2006-08-03  Darin Adler  <darin@apple.com>
17762
17763         Reviewed by Eric Seidel.
17764
17765         - fix storage leak
17766
17767         * WebView/WebFrame.m: (-[WebFramePrivate dealloc]): Release the frame loader.
17768
17769 2006-08-02  Timothy Hatcher  <timothy@apple.com>
17770
17771         Rubber stamped by Maciej.
17772
17773         Adding back resultsWithXpathQuery, removed by Darin's earlier change.
17774         This function is called from ObjC, but not used from JavaScript.
17775
17776         * WebInspector/webInspector/inspector.js:
17777
17778 2006-08-02  Timothy Hatcher  <timothy@apple.com>
17779
17780         Reviewed by Darin.
17781
17782         Bug 10200: [Drosera] Deadlock between Drosera and Safari while loading page
17783         http://bugs.webkit.org/show_bug.cgi?id=10200
17784
17785         Prevent reentrancy in our debugger callbacks. This was causing a deadlock in Drosera because
17786         suspendProcessIfPaused was being called during a DO call into Safari.
17787
17788         Preventing reentrancy also prevents scripts that Drosera injects and evaluates from showing
17789         up in rare cases (such as a iframe loading about:blank). I thought this would prevent cases
17790         where you call a function from the console and expect it to break on a breakpoint in them, but
17791         this appears to never have worked even without this change. When that is figured out we can
17792         reconsider a better solution to reentrancy. I have filed that as bug 10214.
17793
17794         I also removed the NSRunLoop runMode:beforeDate: calls since DO handles this for us since
17795         we don't use "onway void" as the return type for the callbacks. Note: using onway void for
17796         the listener callbacks causes bad synchronization issues and obscure crashes.
17797
17798         * DefaultDelegates/WebScriptDebugServer.m:
17799         (-[WebScriptDebugServer webView:didLoadMainResourceForDataSource:]):
17800         (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
17801         (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
17802         (-[WebScriptDebugServer webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
17803         (-[WebScriptDebugServer webView:willExecuteStatement:sourceId:line:forWebFrame:]):
17804         (-[WebScriptDebugServer webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
17805         (-[WebScriptDebugServer webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
17806         * DefaultDelegates/WebScriptDebugServerPrivate.h:
17807
17808 2006-08-02  Maciej Stachowiak  <mjs@apple.com>
17809
17810         Reviewed by John.
17811         
17812         - fix assertion failure on layout tests by stopping plugins from loading at a clearly defined time
17813         - add more assertions for safety
17814
17815         * WebView/WebDataSource.m:
17816         (-[WebDataSourcePrivate dealloc]): Removed obsolete comment.
17817         (-[WebDataSource _updateLoading]): Add assertion ensuring this method is only called
17818         at a time when this data source is the one that might be loading for a frame.
17819         (-[WebDataSource _stopLoading]): Stop loading plugins as a FIXME suggests we should.
17820         * WebView/WebFrameLoader.m:
17821         (-[WebFrameLoader isLoadingPlugIns]): New helper method.
17822         (-[WebFrameLoader isLoading]): Consider plugin loads too - otherwise we won't stop them
17823         at stopLoading time.
17824
17825 2006-08-02  Adam Roben  <aroben@apple.com>
17826
17827         Reviewed by Brady.
17828
17829         - Rename TransferJob to ResourceLoader (this file was forgotten in an
17830         earlier change by Maciej)
17831
17832         * COM/WebView.cpp:
17833
17834 2006-08-01  Maciej Stachowiak  <mjs@apple.com>
17835
17836         Reviewed by Adele.
17837         
17838         - Change things around so WebFrameLoader tracks the main and provisional data source,
17839         as well as the frame load state, pulling much code out of WebFrame along the way.
17840         
17841         The most significant aspects of this change are:
17842         
17843         - management of WebDataSources and WebFrameState was moved into WebFrameLoader
17844         - there is now just one WebFrameLoader shared between the primary and provisional data source
17845
17846         * WebKit.xcodeproj/project.pbxproj:
17847         * WebView/WebDataSource.m:
17848         (-[WebDataSourcePrivate dealloc]):
17849         (-[WebDataSource _updateLoading]):
17850         (-[WebDataSource _loadIcon]):
17851         (-[WebDataSource _setPrimaryLoadComplete:]):
17852         (-[WebDataSource _stopLoading]):
17853         (-[WebDataSource _startLoading]):
17854         (-[WebDataSource _addSubresourceLoader:]):
17855         (-[WebDataSource _removeSubresourceLoader:]):
17856         (-[WebDataSource _addPlugInStreamLoader:]):
17857         (-[WebDataSource _removePlugInStreamLoader:]):
17858         (-[WebDataSource _defersCallbacksChanged]):
17859         (-[WebDataSource _stopLoadingWithError:]):
17860         (-[WebDataSource _revertToProvisionalState]):
17861         (-[WebDataSource _setupForReplaceByMIMEType:]):
17862         (-[WebDataSource initWithRequest:]):
17863         (-[WebDataSource data]):
17864         (-[WebDataSource isLoading]):
17865         * WebView/WebFrame.m:
17866         (-[WebFramePrivate init]):
17867         (-[WebFramePrivate dealloc]):
17868         (-[WebFrame _closeOldDataSources]):
17869         (-[WebFrame _detachFromParent]):
17870         (-[WebFrame _makeDocumentView]):
17871         (-[WebFrame _receivedMainResourceError:]):
17872         (-[WebFrame _transitionToCommitted:]):
17873         (+[WebFrame _timeOfLastCompletedLoad]):
17874         (-[WebFrame _checkLoadCompleteForThisFrame]):
17875         (-[WebFrame _loadItem:withLoadType:]):
17876         (-[WebFrame _continueAfterWillSubmitForm:]):
17877         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
17878         (-[WebFrame _initWithWebFrameView:webView:bridge:]):
17879         (-[WebFrame _frameLoader]):
17880         (-[WebFrame _provisionalLoadStarted]):
17881         (-[WebFrame _prepareForDataSourceReplacement]):
17882         (-[WebFrame _frameLoadCompleted]):
17883         (-[WebFrame provisionalDataSource]):
17884         (-[WebFrame dataSource]):
17885         (-[WebFrame stopLoading]):
17886         * WebView/WebFrameInternal.h:
17887         * WebView/WebFrameLoader.h:
17888         * WebView/WebFrameLoader.m:
17889         (-[WebFrameLoader initWithWebFrame:]):
17890         (-[WebFrameLoader dealloc]):
17891         (-[WebFrameLoader dataSource]):
17892         (-[WebFrameLoader _setDataSource:]):
17893         (-[WebFrameLoader clearDataSource]):
17894         (-[WebFrameLoader provisionalDataSource]):
17895         (-[WebFrameLoader _setProvisionalDataSource:]):
17896         (-[WebFrameLoader _clearProvisionalDataSource]):
17897         (-[WebFrameLoader state]):
17898         (+[WebFrameLoader timeOfLastCompletedLoad]):
17899         (-[WebFrameLoader _setState:]):
17900         (-[WebFrameLoader clearProvisionalLoad]):
17901         (-[WebFrameLoader markLoadComplete]):
17902         (-[WebFrameLoader commitProvisionalLoad]):
17903         (-[WebFrameLoader stopLoading]):
17904         (-[WebFrameLoader startLoading]):
17905         (-[WebFrameLoader startProvisionalLoad:]):
17906         (-[WebFrameLoader setupForReplace]):
17907         * WebView/WebFramePrivate.h:
17908
17909 2006-08-01  Tim Omernick  <timo@apple.com>
17910
17911         Reviewed by John Sullivan.
17912
17913         <rdar://problem/4480737> Flash crashes after it replaces itself via a document.write()
17914         
17915         I kind of hate to do this, but this is the best way to work around buggy plug-ins like Flash that assume that
17916         NPP_Destroy() cannot be called while the browser is calling one of its other plug-in functions.  The classic
17917         situation is a plug-in that replaces itself via an NPN_Invoke() that executes a document.write().
17918
17919         * Plugins/WebBaseNetscapePluginView.h:
17920         * Plugins/WebBaseNetscapePluginView.m:
17921         (-[WebBaseNetscapePluginView sendEvent:]):
17922         Call -willCallPlugInFunction and -didCallPlugInFunction around calls to the NPP_* functions.
17923         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
17924         ditto
17925         (-[WebBaseNetscapePluginView start]):
17926         It should not be possible to start a plug-in instance while we are calling into it (one of those chicken/egg
17927         problems).  Added a sanity-checking assertion.
17928         (-[WebBaseNetscapePluginView stop]):
17929         If we're already calling a plug-in function, do not call NPP_Destroy().  The plug-in function we are calling
17930         may assume that its instance->pdata, or other memory freed by NPP_Destroy(), is valid and unchanged until said
17931         plugin-function returns.
17932         (-[WebBaseNetscapePluginView pluginScriptableObject]):
17933         Call -willCallPlugInFunction and -didCallPlugInFunction around calls to the NPP_* functions.
17934         (-[WebBaseNetscapePluginView willCallPlugInFunction]):
17935         Increment plug-in function call depth.
17936         (-[WebBaseNetscapePluginView didCallPlugInFunction]):
17937         Decrement plug-in function call depth.  Stop if we're supposed to stop.
17938         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
17939         Call -willCallPlugInFunction and -didCallPlugInFunction around calls to the NPP_* functions.
17940         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
17941         ditto
17942         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
17943         ditto
17944
17945         * Plugins/WebBaseNetscapePluginStream.m:
17946         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
17947         Call -willCallPlugInFunction and -didCallPlugInFunction around calls to the NPP_* functions.
17948         (-[WebBaseNetscapePluginStream _destroyStream]):
17949         ditto
17950         (-[WebBaseNetscapePluginStream _deliverData]):
17951         ditto
17952
17953 2006-08-01  Maciej Stachowiak  <mjs@apple.com>
17954
17955         - fix build after last change
17956
17957         * WebView/WebFrame.m:
17958         (-[WebFrame _checkLoadCompleteForThisFrame]):
17959
17960 2006-08-01  Maciej Stachowiak  <mjs@apple.com>
17961
17962         Reviewed by Beth.
17963
17964         - revert part of my last fix that broke the Safari bookmarks view
17965         
17966         * WebView/WebFrame.m:
17967         (-[WebFrame _checkLoadCompleteForThisFrame]): still send layout message for non-HTML views
17968
17969 2006-08-01  Tim Omernick  <timo@apple.com>
17970
17971         Reviewed by Anders.
17972
17973         Fixed an assertion failure I ran into while debugging <rdar://problem/4652683>.
17974
17975         * Plugins/WebNetscapePluginEmbeddedView.m:
17976         (-[WebNetscapePluginEmbeddedView redeliverStream]):
17977         Don't clear the "instance" ivar here.  This code was refactored here from the old WebNetscapePluginRepresentation,
17978         which also had an "instance" ivar.  It is never appropriate to clear a plug-in view's instance.  That is done when
17979         the plug-in is destroyed.
17980
17981 2006-08-01  Maciej Stachowiak  <mjs@apple.com>
17982
17983         Reviewed by Geoff.
17984         
17985         - some refactoring in preparation for moving more stuff to WebFrameLoader.
17986
17987         * WebView/WebFrame.m:
17988         (-[WebFrame _clearDataSource]): 
17989         (-[WebFrame _detachFromParent]):
17990         (-[WebFrame _commitProvisionalLoad]):
17991         (-[WebFrame _transitionToCommitted:]):
17992         (-[WebFrame _clearProvisionalLoad]):
17993         (-[WebFrame _markLoadComplete]):
17994         (-[WebFrame _checkLoadCompleteForThisFrame]):
17995         (-[WebFrame _startProvisionalLoad:]):
17996         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
17997         (-[WebFrame stopLoading]):
17998
17999 2006-07-31  Maciej Stachowiak  <mjs@apple.com>
18000
18001         Reviewed by Tim Hatcher.
18002         
18003         - renamed TransferJob to ResourceLoader in WebCore
18004
18005         * COM/WebFrame.cpp:
18006         (WebFrame::loadDataSource):
18007         (WebFrame::receivedRedirect):
18008         (WebFrame::receivedResponse):
18009         (WebFrame::receivedData):
18010         (WebFrame::receivedAllData):
18011         (WebFrame::setStatusText):
18012         * COM/WebFrame.h:
18013
18014 2006-07-31  Darin Adler  <darin@apple.com>
18015
18016         Reviewed by Maciej.
18017
18018         - omit the margin and padding boxes for display types where they are ignored
18019         - use CSS instead of properties for table spacing and padding as suggested by Tim H.
18020
18021         * WebInspector/webInspector/inspector.css: Added rules for spacing and padding.
18022         Added rules that hide the margin and padding boxes (borders and all but the center cell)
18023         when the hide attribute is present.
18024         * WebInspector/webInspector/inspector.html: Added classes for the rules above.
18025         Removed cellpadding and cellspacing attributes.
18026         * WebInspector/webInspector/inspector.js: Added code to hide/show the margin and
18027         padding boxes based on the display type.
18028
18029 2006-07-31  Duncan Wilcox  <duncan@mclink.it>
18030
18031         Reviewed by Darin.
18032
18033         Fixes <http://bugs.webkit.org/show_bug.cgi?id=10159>
18034         "REGRESSION: delegate returning no menu elements crashes webkit"
18035
18036         No automated test, because there's no way to programmatically open a context menu,
18037         no manual test because there's no way to customize the context menu delegate.
18038
18039         * WebView/WebView.m:
18040         (-[WebView _menuForElement:defaultItems:]): Make sure the context menu returned
18041         some menu items before accessing the first one.
18042
18043 2006-07-31  Timothy Hatcher  <timothy@apple.com>
18044
18045         Reviewed by John.
18046
18047         <rdar://problem/4658194> REGRESSION: "Search in Google"
18048         and "Search in Spotlight" fail to work on text selected in a frame
18049
18050         Use selectedFrame to get the frame with the text selection.
18051
18052         * WebView/WebView.m:
18053         (-[WebView _searchWithGoogleFromMenu:]):
18054         (-[WebView _searchWithSpotlightFromMenu:]):
18055
18056 2006-07-31  Darin Adler  <darin@apple.com>
18057
18058         Reviewed by Tim Hatcher.
18059
18060         - http://bugs.webkit.org/show_bug.cgi?id=10168
18061           add a first cut at a Metrics pane to the inspector
18062
18063         * WebInspector/webInspector/inspector.css: Add styles for the new metrics pane.
18064         * WebInspector/webInspector/inspector.html: Add the new metrics pane, starting with
18065         the table to show the box model.
18066         * WebInspector/webInspector/inspector.js: Add the new metrics pane. Add back some
18067         "title" attributes so we have more tooltips. Removed the optional parameter to
18068         getComputedStyle.
18069
18070 2006-07-31  Anders Carlsson  <acarlsson@apple.com>
18071
18072         Reviewed by John.
18073
18074         * Plugins/WebPluginDatabase.m:
18075         (-[WebPluginDatabase refresh]):
18076         Create a mutable set instead of a mutable array.
18077
18078 2006-07-30  Darin Adler  <darin@apple.com>
18079
18080         Reviewed by Tim Hatcher.
18081
18082         * WebInspector/webInspector/inspector.js: Fix bug where a null property value
18083         leads to an empty style pane.
18084
18085 2006-07-30  Darin Adler  <darin@apple.com>
18086
18087         Reviewed by Tim Hatcher.
18088
18089         - http://bugs.webkit.org/show_bug.cgi?id=10163
18090           some improvements for the inspector
18091
18092         * WebInspector/WebInspector.m:
18093         (+[WebInspector sharedWebInspector:]): Fixed bug that could cause the inspector
18094         to be garbage collected if used in an application with GC enabled.
18095         (-[WebInspector dealloc]): Removed a call to a non-existent close method.
18096         (-[WebInspector window]): Added a custom WebPreferences object and called
18097         setPrivateBrowsingEnabled:YES so the inspector won't appear in the history menu.
18098         Also call setProhibitsMainFrameScrolling:YES to try to get rid of trouble where
18099         the inspector scrolls when dragging.
18100
18101         * WebInspector/webInspector/inspector.css: Added style for the new color swatch,
18102         and JavaScript properties. More of the style should be shared between the panes,
18103         but this should be OK for now.
18104
18105         * WebInspector/webInspector/inspector.html: Added a first cut at a JavaScript
18106         properties pane. Needs work, but better than nothing.
18107
18108         * WebInspector/webInspector/inspector.js: Lots of improvements:
18109         - Omit "typical" property values from computed style display, making it much shorter.
18110         - Use the words "black", "white", and "transparent" when appropriate for color values.
18111         - Refactored the loaded() function to get rid of repetitive scrollbar setup.
18112         - Added a new scrollarea for the JavaScript properties pane.
18113         - Simplified refreshScrollbars() -- we now refresh all scrollbars every time, which does no harm.
18114         - Removed unused resultsWithXpathQuery().
18115         - Use [] instead of "new Array()" and {} instead of "new Object()".
18116         - Removed unused xpathForNode().
18117         - Changed style pane to display the style for a text node's parent instead of saying
18118           it can't display the style for text.
18119         - Fixed regression I caused a while back by checking the length of a computed style
18120           and not trying to display anything if its length is 0. Before this change and the
18121           corresponding change in WebCore, we'd see a complete list of all styles with the
18122           empty string as the value for each one.
18123         - Changed the name of the computedStyle flag on the style rules array to isComputedStyle
18124           to make it easier to understand it's a boolean.
18125         - Fixed an error in the code that does !important scanning where it was trying to
18126           do a special case for computed style, but was checking the computed style flag on
18127           the wrong object.
18128         - Added populateStyleListItem() function to factor out things in common between the
18129           items in the top level list and the expanded tree for shorthand properties.
18130         - Added code to make a color swatch next to the textual representation for any
18131           property that contains a color.
18132         - Implemented a first cut at a simple JavaScript properties pane.
18133
18134 2006-07-29  Darin Adler  <darin@apple.com>
18135
18136         - Removed tabs from these source files that still had them.
18137           We don't use them; that way source files look fine in editors
18138           that have tabs set to 8 spaces or to 4 spaces.
18139         - Removed allow-tabs Subversion property from the files too.
18140
18141         * DefaultDelegates/WebDefaultPolicyDelegate.m:
18142         * History/WebHistory.m:
18143         * Misc/WebDownload.m:
18144         * Misc/WebIconDatabase.m:
18145         * Misc/WebKitErrors.m:
18146         * Misc/WebKitLogging.m:
18147         * Misc/WebNSDataExtras.m:
18148         * Misc/WebNSFileManagerExtras.m:
18149         * Panels/WebPanelAuthenticationHandler.m:
18150         * Plugins/WebBaseNetscapePluginView.m:
18151         * Plugins/npfunctions.h:
18152         * WebCoreSupport/WebSubresourceLoader.m:
18153         * WebView/WebMainResourceLoader.m:
18154         * WebView/WebView.h:
18155         * WebView/WebView.m:
18156
18157 2006-07-29  Sam Weinig  <sam.weinig@gmail.com>
18158
18159         Reviewed by Darin.
18160
18161         - patch for http://bugs.webkit.org/show_bug.cgi?id=10080
18162           Adopt pedantic changes from the Unity project to improve 
18163           cross-compiler compatibility
18164
18165           Changes include:
18166           * Adding missing newline to the end of the file.
18167           * Turning on gcc warning for missing newline at the end of a source file
18168             (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
18169
18170         * WebKit.xcodeproj/project.pbxproj:
18171         * WebView/WebResourcePrivate.h:
18172
18173 2006-07-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
18174
18175         Reviewed by John Sullivan.
18176
18177          - fix http://bugs.webkit.org/show_bug.cgi?id=9984
18178           ASSERTION FAILURE: _private->mouseDownEvent != nil
18179           (WebKit/WebView/WebHTMLView.m:4863 -[WebHTMLView(WebInternal) _delegateDragSourceActionMask])
18180
18181         * WebView/WebHTMLView.m:
18182         (-[WebHTMLView _setMouseDownEvent:]): Moved into the WebHTMLViewFileInternal category and changed
18183         to accept nil.
18184         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
18185         Copy the hit HTMLView's mouse down event to the top HTMLView.
18186         (-[WebHTMLView acceptsFirstMouse:]): Added a call to _setMouseDownEvent:nil before returning.
18187         (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): Added a call to _setMouseDownEvent:nil
18188         before returning.
18189         (-[WebHTMLView mouseUp:]): Added a call to _setMouseDownEvent:nil to clear the event set in
18190         mouseDown: (and used during dragging).
18191         (-[WebHTMLView _delegateDragSourceActionMask]): Copy the hit HTMLView's mouse down event to
18192         the top HTMLView.
18193
18194 2006-07-28  Timothy Hatcher  <timothy@apple.com>
18195
18196         Reviewed by John.
18197
18198         <rdar://problem/4657473> REGRESSION: Spell check not available from contextual menu in Mail
18199
18200         The context menu code should be checking isContentEditable
18201         on DOMNode not just DOMElement. This is needed because DOMText
18202         will be the node class of any text that is clicked.
18203
18204         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
18205         (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
18206
18207 2006-07-25  Geoffrey Garen  <ggaren@apple.com>
18208
18209         Reviewed by Maciej, inspired by John.
18210         
18211         - Fixed <rdar://problem/4651931> 1% REGRESSION on iBench HTML due to 
18212         repeated requests for non-existent favicon
18213         
18214         An optimization to avoid serializing favicon data for missing icons had stomped an
18215         optimization to avoid GETing a missing favicon more than once. The solution
18216         is a happy marriage of optimizations, ensuring that we *retain* the missing
18217         favicon's "i am missing" data without posting a notification or saving it to disk.
18218
18219         * Misc/WebIconDatabase.m:
18220         (-[WebIconDatabase _setIconURL:forURL:]):
18221
18222 2006-07-25  David Harrison  <harrison@apple.com>
18223
18224         Reviewed by timo and Darin.
18225
18226         <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
18227         
18228         * WebKit.xcodeproj/project.pbxproj:
18229         * WebView/WebView.m:
18230         (-[WebView replaceSelectionWithNode:]):
18231         (-[WebView _replaceSelectionWithNode:matchStyle:]):
18232         * WebView/WebViewPrivate.h:
18233         (-[WebView _replaceSelectionWithNode:matchStyle::]):
18234         New SPI that is same as replaceSelectionWithNode: with added parameter whether to match existing style.
18235
18236 2006-07-24  Darin Adler  <darin@apple.com>
18237
18238         Reviewed by Adele and Justin.
18239
18240         - update for change to require context when creating fragments from text
18241           (needed to handle whitespace properly)
18242
18243         * WebView/WebHTMLView.m:
18244         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
18245         Added context parameter, pass through to bridge.
18246         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Pass selection range as context
18247         when calling above method.
18248         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Pass drag caret as context when
18249         calling above method.
18250
18251 2006-07-24  Maciej Stachowiak  <mjs@apple.com>
18252
18253         Reviewed by Geoff.
18254         
18255         - fix <rdar://problem/4609195> Help Viewer loads empty window (not getting didFailLoadingWithError: callback)
18256         (without re-introducing http://bugs.webkit.org/show_bug.cgi?id=10062 )
18257
18258         * WebView/WebLoader.h:
18259         * WebView/WebMainResourceLoader.m:
18260         (-[WebMainResourceLoader receivedError:]): Copy in some code from the base class to do it in the proper
18261         order, surrounding the call to [ds _receivedMainResourceError:error complete:YES].
18262
18263 2006-07-24  Anders Carlsson  <acarlsson@apple.com>
18264
18265         Reviewed by Tim O.
18266
18267         * Misc/WebIconDatabase.m:
18268         (-[WebIconDatabase removeAllIcons]):
18269         Make an array of the keys and iterate through it to avoid modifying the
18270         dictionary while enumerating it.
18271
18272 2006-07-24  Timothy Hatcher  <timothy@apple.com>
18273
18274         Reviewed by John and Darin.
18275
18276         <rdar://problem/4634290> Cannot selectively install a custom
18277         scroller that differs from the default Aqua frame size.
18278
18279         Adds two new private methods to WebFrameView that allows
18280         an application to set a custom scroll view class. This is needed
18281         if the application wants to install a custom scroller that is wider
18282         than the typical scroller, because NSScrollView does the content
18283         rect calculations in a class method (ignoring custom scrollers.)
18284         The _setScrollViewClass method requires the class to be a subclass
18285         of WebDynamicScrollBarView, or nil can be passed to reset to the default class.
18286         A new scroll view of the specified class will then replace the previous
18287         one without the need to reload content of the frame.
18288
18289         * WebView/WebFrameView.m:
18290         (-[WebFrameView _customScrollViewClass]):
18291         (-[WebFrameView _setCustomScrollViewClass:]):
18292         * WebView/WebFrameViewPrivate.h:
18293
18294 2006-07-24  Alexey Proskuryakov  <ap@nypop.com>
18295
18296         Reviewed by Darin.
18297
18298         Fix http://bugs.webkit.org/show_bug.cgi?id=10009
18299         REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
18300
18301         * WebView/WebView.m:
18302         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]): If we've got a type supported by WebPDFView,
18303         make sure to initialize the plugin database, in case a plugin wants to handle it.
18304
18305 2006-07-23  Mark Rowe  <opendarwin.org@bdash.net.nz>
18306
18307         Reviewed by Maciej.
18308
18309         Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
18310         http://bugs.webkit.org/show_bug.cgi?id=9686
18311
18312         WebKit portion of the fix.
18313
18314         * DefaultDelegates/WebDefaultScriptDebugDelegate.m:
18315         (-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
18316         * DefaultDelegates/WebScriptDebugServer.h:
18317         * DefaultDelegates/WebScriptDebugServer.m:
18318         (-[WebScriptDebugServer webView:exceptionWasRaised:sourceId:line:forWebFrame:]): Notify
18319         listeners that an exception has been raised.
18320         * WebView/WebScriptDebugDelegate.h:
18321         * WebView/WebScriptDebugDelegate.m:
18322         (-[WebScriptCallFrame exceptionRaised:sourceId:line:]): Dispatch through to delegate and
18323         WebScriptDebugServer.
18324
18325 2006-07-23  Adele Peterson  <adele@apple.com>
18326
18327         Reviewed by Darin.
18328
18329         - Fix for <rdar://problem/4646276> CrashTracer: 7 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 155
18330
18331         * WebView/WebHTMLView.m: (-[WebHTMLView _web_layoutIfNeededRecursive:testDirtyRect:]):
18332         needsDisplay was returning NO even though the view has a dirty rect (see <rdar://problem/4647062>).  Since we know about
18333         the dirty rect, we don't actually need to check needsDisplay.
18334
18335 2006-07-22  Timothy Hatcher  <timothy@apple.com>
18336
18337         Rolling out r15572.
18338         
18339         Bug 10062: REGRESSION: dom/xhtml/level2/html/HTMLIFrameElement11.xhtml asserts/crashes
18340         http://bugs.webkit.org/show_bug.cgi?id=10062
18341
18342     2006-07-21  Timothy Hatcher  <timothy@apple.com>
18343
18344         Reviewed by Maciej.
18345
18346         <rdar://problem/4609195> Help Viewer loads empty window
18347         (not getting didFailLoadingWithError: callback)
18348
18349         Call super's didFailWithError before _receivedMainResourceError
18350         because _receivedMainResourceError will cause the datasource's
18351         frame to be set to nil before the didFailLoadingWithError delegate
18352         callback is sent. (This order is needed now that WebDataSource does
18353         not hold on to the WebView; it uses the WebFrame to get to the WebView.
18354         If the WebFrame is nil we can't get to the WebView's resource load delegate.)
18355
18356         * WebView/WebMainResourceLoader.m:
18357         (-[WebMainResourceLoader receivedError:]):
18358
18359
18360 2006-07-22  Timothy Hatcher  <timothy@apple.com>
18361
18362         Reviewed by Adele.
18363
18364         <rdar://problem/4646318> REGRESSION: Ctrl-clicking on a selection containing a word doesn't display a complete contextual menu
18365         
18366         Show the editing context menu if the WebView is editible.
18367         The original change only checked if the DOM element was editable,
18368         and isContentEditable returns NO if entire WebView is editable.
18369
18370         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
18371         (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
18372
18373 2006-07-21  Timothy Hatcher  <timothy@apple.com>
18374
18375         Reviewed by Maciej.
18376
18377         <rdar://problem/4609195> Help Viewer loads empty window
18378         (not getting didFailLoadingWithError: callback)
18379
18380         Call super's didFailWithError before _receivedMainResourceError
18381         because _receivedMainResourceError will cause the datasource's
18382         frame to be set to nil before the didFailLoadingWithError delegate
18383         callback is sent. (This order is needed now that WebDataSource does
18384         not hold on to the WebView; it uses the WebFrame to get to the WebView.
18385         If the WebFrame is nil we can't get to the WebView's resource load delegate.)
18386
18387         * WebView/WebMainResourceLoader.m:
18388         (-[WebMainResourceLoader receivedError:]):
18389
18390 === Safari-521.20 ===
18391
18392 2006-07-21  Timothy Hatcher  <timothy@apple.com>
18393
18394         Reviewed by John.
18395
18396         <rdar://problem/4607572> REGRESSION (521.10.1 - 521.13): most context menu items missing when a form field is focused (common on google.com) (9680)
18397
18398         Do not use _isEditable call since that only checks if the current
18399         selection or frame is editible. We now check if the currently clicked element
18400         is a content editible area, a textarea, an isindex or an input element that
18401         return YES to _isTextField.
18402
18403         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
18404         (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
18405
18406 2006-07-20  John Sullivan  <sullivan@apple.com>
18407
18408         Reviewed by Maciej
18409
18410         - WebKit part of fix for:
18411         <rdar://problem/4557386> REGRESSION (419.3-521.19): repro Safari world leak involving 
18412         closing tabs after clicking in a web page
18413
18414         * WebCoreSupport/WebFrameBridge.m:
18415         (-[WebFrameBridge textViewWasFirstResponderAtMouseDownTime:]):
18416         renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)        
18417         
18418         * WebView/WebHTMLViewInternal.h:
18419         * WebView/WebHTMLView.m:
18420         (-[WebTextCompleteController dealloc]):
18421         updated for name change
18422         (-[NSArray _setMouseDownEvent:]):
18423         Now only retains the first responder if it's a textView, since that's the only case that the only client
18424         actually cares about. This avoids a reference cycle caused by retaining self. This is the only substantive
18425         part of the patch; all the rest is just renaming for clarity, and comments.
18426         (-[NSArray mouseDown:]):
18427         updated for name change
18428         (-[WebHTMLView _textViewWasFirstResponderAtMouseDownTime:]):
18429         renamed to be more specific (formerly _wasFirstResponderAtMouseDownTime:)        
18430
18431 2006-07-19  Tim Omernick  <timo@apple.com>
18432
18433         Reviewed by Darin.
18434
18435         <rdar://problem/4523432> safari crashed right after disabling "block pop up windows" (or other WebPreferences changes)
18436
18437         * Plugins/WebBaseNetscapePluginView.m:
18438         (-[WebBaseNetscapePluginView viewWillMoveToSuperview:]):
18439         Stop the plug-in when it is removed from its superview.  It is not sufficient to do this in -viewWillMoveToWindow:nil, because
18440         the WebView might still has a hostWindow at that point, which prevents the plug-in from being destroyed.
18441         There is no need to start the plug-in when moving into a superview.  -viewDidMoveToWindow takes care of that.
18442
18443 === Safari-521.19 ===
18444
18445 2006-07-17  Tim Omernick  <timo@apple.com>
18446
18447         Reviewed by Maciej.
18448
18449         <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
18450         by script
18451
18452         * WebView/WebViewPrivate.h:
18453         * WebView/WebView.m:
18454         (-[WebView setProhibitsMainFrameScrolling:]):
18455         New method.  Prohibits scrolling in the WebView's main frame.  Used to "lock" a WebView to a specific
18456         scroll position.
18457
18458 2006-07-17  Timothy Hatcher  <timothy@apple.com>
18459
18460         Reviewed by Darin.
18461         
18462         <rdar://problem/4635311> REGRESSION: WebKit should call windowScriptObjectAvailable before attaching the script debugger
18463
18464         * WebCoreSupport/WebFrameBridge.m:
18465         (-[WebFrameBridge windowObjectCleared]):
18466
18467 2006-07-17  Timothy Hatcher  <timothy@apple.com>
18468
18469         Reviewed by Maciej.
18470
18471         <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
18472
18473         Copy WebScriptObject.h from WebCore's private headers, not JavaScriptCore.
18474
18475         * WebKit.xcodeproj/project.pbxproj:
18476
18477 2006-07-17  John Sullivan  <sullivan@apple.com>
18478
18479         Reviewed by Tim Omernick.
18480         
18481         - fixed <rdar://problem/4604366> Orange Find highlight displays text in wrong size on PDF pages 
18482         if they're not at "actual size"
18483         
18484         To match WebHTMLView, I made the methods that return attributed strings take the view's scale
18485         factor into account.
18486
18487         * WebView/WebPDFView.m:
18488         (-[WebPDFView _scaledAttributedString:]):
18489         new helper method, takes an attributed string and returns one that's scaled by the view's
18490         current scale factor
18491         (-[WebPDFView attributedString]):
18492         pass result through _scaledAttributedString:
18493         (-[WebPDFView selectedAttributedString]):
18494         ditto
18495
18496 2006-07-17  Justin Garcia  <justin.garcia@apple.com>
18497
18498         Reviewed by levi
18499         
18500         Rolled the first fix for:
18501         <http://bugs.webkit.org/show_bug.cgi?id=9642>
18502         GMail Editor: Operations that use drop down menus blow away the selection
18503         back in and removed the call to _clearSelectionInOtherFrames from 
18504         -[WebHTMLView becomeFirstResponder] to fix the bug.
18505
18506         * WebView/WebHTMLView.m:
18507         (-[NSArray maintainsInactiveSelection]):
18508         (-[NSArray becomeFirstResponder]):
18509         * WebView/WebView.m:
18510         (-[WebView maintainsInactiveSelection]):
18511
18512 2006-07-15  Darin Adler  <darin@apple.com>
18513
18514         Reviewed by John Sullivan.
18515
18516         - fix http://bugs.webkit.org/show_bug.cgi?id=9928
18517           REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)
18518
18519         * WebView/WebHTMLView.m:
18520         (-[WebHTMLView _documentRange]): Moved into WebHTMLViewFileInternal category.
18521         (-[WebHTMLView selectionRect]): Moved into WebDocumentPrivateProtocols category.
18522         (-[WebHTMLView selectionView]): Ditto.
18523         (-[WebHTMLView selectionImageForcingWhiteText:]): Ditto.
18524         (-[WebHTMLView selectionImageRect]): Ditto.
18525         (-[WebHTMLView pasteboardTypesForSelection]): Ditto.
18526         (-[WebHTMLView selectAll]): Ditto.
18527         (-[WebHTMLView deselectAll]): Ditto.
18528         (-[WebHTMLView string]): Ditto.
18529         (-[WebHTMLView _attributeStringFromDOMRange:]): Ditto.
18530         (-[WebHTMLView attributedString]): Ditto.
18531         (-[WebHTMLView selectedString]): Ditto.
18532         (-[WebHTMLView selectedAttributedString]): Ditto.
18533         (-[WebHTMLView supportsTextEncoding]): Ditto.
18534         (-[WebHTMLView _canProcessDragWithDraggingInfo:]): Moved into WebDocumentInternalProtocols.
18535         (-[WebHTMLView _isMoveDrag]): Ditto.
18536         (-[WebHTMLView _isNSColorDrag:]): Ditto.
18537         (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Ditto.
18538         (-[WebHTMLView draggingCancelledWithDraggingInfo:]): Ditto.
18539         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Ditto.
18540         (-[WebHTMLView elementAtPoint:]): Ditto.
18541         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto.
18542
18543         * WebKit.xcodeproj/project.pbxproj: Let Xcode 2.3 do its thing.
18544
18545 === Safari-521.17 ===
18546
18547 2006-07-14  Timothy Hatcher  <timothy@apple.com>
18548
18549         Rolling out this fix from r15358 since it isn't resolved.
18550
18551     2006-07-11  Justin Garcia  <justin.garcia@apple.com>
18552
18553         Reviewed by levi & thatcher
18554
18555         <http://bugs.webkit.org/show_bug.cgi?id=9642>
18556         GMail Editor: Operations that use drop down menus blow away the selection
18557
18558         * WebView/WebHTMLView.m:
18559         (-[WebHTMLView maintainsInactiveSelection]): Maintain an inactive selection
18560         when resigning as first responder if the selection is editable
18561         or if the WebView tells us to.
18562         * WebView/WebView.m:
18563         (-[WebView maintainsInactiveSelection]): Just because a WebView is
18564         editable doesn't mean selections inside subframes will be.  Return
18565         NO by default.
18566
18567 2006-07-14  Timothy Hatcher  <timothy@apple.com>
18568
18569         <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure
18570
18571         Build fix with the new GCC. Removes forward declarations of protocols.
18572
18573         * Misc/WebSearchableTextView.h:
18574         * WebCoreSupport/WebSubresourceLoader.h:
18575         * WebKit.xcodeproj/project.pbxproj:
18576         * WebView/WebDocumentInternal.h:
18577         * WebView/WebDocumentPrivate.h:
18578         * WebView/WebHTMLView.h:
18579         * WebView/WebPDFView.h:
18580         * WebView/WebScriptDebugDelegatePrivate.h:
18581
18582 2006-06-28  Darin Adler  <darin@apple.com>
18583
18584         Reviewed by Adele.
18585
18586         - fix http://bugs.webkit.org/show_bug.cgi?id=9625
18587           <rdar://problem/4604703>
18588           REGRESSION: Focus not removed from password field after ctrl-click in text field
18589
18590         * WebView/WebHTMLView.m: (-[WebHTMLView menuForEvent:]): Set handlingMouseDownEvent to
18591         YES while calling sendContextMenuEvent: on the bridge.
18592
18593 2006-07-14  Timothy Hatcher  <timothy@apple.com>
18594
18595         Reviewed by Maciej.
18596
18597         Moved JavaScriptCore to be a public framework.
18598
18599         * WebKit.xcodeproj/project.pbxproj:
18600
18601 2006-07-13  Mitz Pettel  <opendarwin.org@mitzpettel.com>
18602
18603         Reviewed by Darin.
18604
18605         - fix http://bugs.webkit.org/show_bug.cgi?id=9795
18606           REGRESSION: Crash in [WebHTMLView(WebPrivate) 
18607           _updateMouseoverWithEvent:]
18608           and http://bugs.webkit.org/show_bug.cgi?id=9850
18609           REGRESSION: Assertion failure (SHOULD NEVER BE REACHED) in -
18610           [WebHTMLView(WebPrivate) removeTrackingRect:]
18611
18612         * WebView/WebHTMLView.m:
18613         (-[WebHTMLView _updateMouseoverWithEvent:]): Return immediately if 
18614         the view has already been closed.
18615
18616 2006-07-13  David Harrison  <harrison@apple.com>
18617
18618         Reviewed by Justin and Levi.
18619
18620         <rdar://problem/4620743> REGRESSION: Option-Delete doesn't delete words during typing
18621
18622         * Tests:
18623         editing/deleting/delete-by-word-001.html
18624         editing/deleting/delete-by-word-002.html
18625
18626         * WebView/WebHTMLView.m:
18627         (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:granularity:]):
18628
18629 2006-07-13  Timothy Hatcher  <timothy@apple.com>
18630
18631         Rolling out this earlier change (r15378) now that it is fixed on AGL's end.
18632         Fixes <rdar://problem/4624865> Restore 64-bit OpenGL plug-in support once AGL is 64-bit
18633
18634         <rdar://problem/4624858> AGL isn't 64-bit yet; temporarily remove it from WebKit 64-bit build
18635
18636         * Plugins/WebBaseNetscapePluginView.h:
18637         * Plugins/WebBaseNetscapePluginView.m:
18638
18639 2006-07-13  Timothy Hatcher  <timothy@apple.com>
18640
18641         Reviewed by Darin.
18642
18643         <rdar://problem/4616920> REGRESSION: tabbing in mail moves focus
18644         to next control instead of inserting a tab space.
18645
18646         Change editible WebView's tabKeyCyclesThroughElements to NO only
18647         if the setTabKeyCyclesThroughElements SPI wasn't called.
18648
18649         * WebView/WebView.m:
18650         (-[WebView setEditable:]):
18651
18652 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
18653
18654         Reviewed by Darin.
18655
18656         http://bugs.webkit.org/show_bug.cgi?id=9624
18657         REGRESSION: After ctrl-clicking in a EMPTY input or textarea field, the contextual menu shows "Search in Google" and "Search in Spotlight" as active menu items
18658
18659         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
18660         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
18661         Don't create Dictionary, Spotlight or Google lookup items if there's no selection.
18662
18663 2006-07-12  Mark Rowe  <opendarwin.org@bdash.net.nz>
18664
18665         Reviewed by Timothy.
18666
18667         http://bugs.webkit.org/show_bug.cgi?id=9868
18668         Applications shown in Drosera's "Attach" window remain after exit
18669
18670         * DefaultDelegates/WebScriptDebugServer.m:
18671         (-[WebScriptDebugServer init]): Register for NSApplicationWillTerminateNotification so we will
18672         know when the application is being exited.
18673         (-[WebScriptDebugServer dealloc]): Unregister notification before we are deallocated.
18674         (-[WebScriptDebugServer applicationTerminating:]): Inform anyone listening that we are going away.
18675
18676 2006-07-12  Tim Omernick  <timo@apple.com>
18677
18678         Reviewed by Tim Hatcher.
18679
18680         <rdar://problem/4624858> AGL isn't 64-bit yet; temporarily remove it from WebKit 64-bit build
18681
18682         Also, fixed a LOG_ERROR() so that it uses the CGL error instead of the AGL error; Tim H missed this in his build fix
18683         from earlier.
18684
18685         * Plugins/WebBaseNetscapePluginView.h:
18686         * Plugins/WebBaseNetscapePluginView.m:
18687
18688 2006-07-11  John Sullivan  <sullivan@apple.com>
18689
18690         Reviewed by Kevin and Tim O
18691
18692         - added support for creating a selection image with white text
18693
18694         * WebView/WebDocumentPrivate.h:
18695         added -selectionImageForcingWhiteText: and -selectionImageRect to the private
18696         <WebDocumentSelection> protocol
18697
18698         * Misc/WebSearchableTextView.m:
18699         (-[NSString selectionImageForcingWhiteText:]):
18700         added stub for this new method to this obsolete class to satisfy the compiler
18701         (-[NSString selectionImageRect]):
18702         ditto
18703         
18704         * WebView/WebHTMLView.m:
18705         (-[WebHTMLView _selectionDraggingImage]):
18706         now calls -selectionImageForcingWhiteText:NO instead of just -selectionImage
18707         (-[WebHTMLView _selectionDraggingRect]):
18708         now calls selectionImageRect, to which the implementation moved
18709         (-[WebHTMLView selectionImageForcingWhiteText:]):
18710         implemented this new method by calling through to new bridge method selectionImageForcingWhiteText:
18711         (-[WebHTMLView selectionImageRect]):
18712         implemented this new method by using existing _selectionDraggingRect implementation
18713         
18714         * WebView/WebPDFView.m:
18715         (-[WebPDFView selectionImageForcingWhiteText:]):
18716         implemented by using code that was formerly in Safari
18717         (-[WebPDFView selectionImageRect]):
18718         implemented by returning selectionRect
18719
18720 2006-07-11  Tim Omernick  <timo@apple.com>
18721
18722         Reviewed by Geoff.
18723
18724         <http://bugs.webkit.org/show_bug.cgi?id=9843>:
18725         Give Netscape plug-ins access to their own DOM element
18726
18727         * Plugins/WebBaseNetscapePluginView.h:
18728         * Plugins/WebBaseNetscapePluginView.m:
18729         (-[WebBaseNetscapePluginView dealloc]):
18730         Release DOM element.
18731         (-[WebBaseNetscapePluginView getVariable:value:]):
18732         Return NPObject for plugin DOM element.
18733
18734         * Plugins/WebNetscapePluginEmbeddedView.h:
18735         * Plugins/WebNetscapePluginEmbeddedView.m:
18736         (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
18737         Now takes a DOMElement, in much the same way that WebKit plug-in views take a DOMElement.
18738
18739         * WebCoreSupport/WebFrameBridge.m:
18740         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
18741         Pass DOMElement to Netscape plug-ins.
18742         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
18743         ditto
18744
18745 2006-07-11  Justin Garcia  <justin.garcia@apple.com>
18746
18747         Reviewed by levi & thatcher
18748         
18749         <http://bugs.webkit.org/show_bug.cgi?id=9642>
18750         GMail Editor: Operations that use drop down menus blow away the selection
18751         
18752         * WebView/WebHTMLView.m:
18753         (-[WebHTMLView maintainsInactiveSelection]): Maintain an inactive selection
18754         when resigning as first responder if the selection is editable
18755         or if the WebView tells us to.
18756         * WebView/WebView.m:
18757         (-[WebView maintainsInactiveSelection]): Just because a WebView is
18758         editable doesn't mean selections inside subframes will be.  Return
18759         NO by default.
18760
18761 2006-07-11  Tim Omernick  <timo@apple.com>
18762
18763         Reviewed by Tim Hatcher.
18764
18765         <rdar://problem/4622748> WebKit now uses deprecated AGL functions
18766
18767         * Plugins/WebBaseNetscapePluginView.m:
18768         (-[WebBaseNetscapePluginView _createWindowedAGLContext]):
18769         aglSetDrawable() is deprecated in AGL 3.0.  Use aglSetWindowRef() instead.
18770         (-[WebBaseNetscapePluginView _createWindowlessAGLContext]):
18771         aglSetOffScreen() is deprecated in AGL 3.0.  Use CGLSetOffScreen(), which does the same thing.
18772
18773 2006-07-11  Alexey Proskuryakov  <ap@nypop.com>
18774
18775         Reviewed by Tim O.
18776
18777         - http://bugs.webkit.org/show_bug.cgi?id=7808
18778         Assertion failure in -[WebBaseNetscapePluginStream dealloc] when requesting an invalid URL
18779
18780         * Plugins/WebNetscapePluginStream.m:
18781         (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
18782         Remove the early return when requesting an invalid (unsupported) URL.
18783
18784 === Safari-521.16 ===
18785
18786 2006-07-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
18787
18788         Reviewed by John Sullivan.
18789
18790         - fix <rdar://problem/4621541>, aka <http://bugs.webkit.org/show_bug.cgi?id=9838>
18791           REGRESSION (r14968-r14977): View Source doesn't work for pages from the back/forward cache
18792
18793         * WebView/WebDataSource.m:
18794         (-[WebDataSource _setPrimaryLoadComplete:]): Set our data only if the frame loader is
18795         has just loaded it (when coming from the back/forward cache, it hasn't).
18796
18797 2006-07-10  Brady Eidson  <beidson@apple.com>
18798
18799         Reviewed by Alexey
18800
18801         Resolved the console error messages people got from the new DB even if they didn't have it enabled
18802
18803         * Misc/WebIconDatabase.m:
18804         (-[WebIconDatabase init]):
18805         Disabled initializing the IconDatabaseBridge if user is living on the old DB
18806
18807 2006-07-10  Darin Adler  <darin@apple.com>
18808
18809         - try to fix Windows build
18810
18811         * COM/WebFrame.h: Qualify DeprecatedString and KURL with WebCore:: prefixes.
18812
18813 2006-07-09  Darin Adler  <darin@apple.com>
18814
18815         - try to fix Windows build
18816
18817         * COM/WebFrame.cpp: Rename QChar to DeprecatedChar.
18818
18819 2006-07-09  Darin Adler  <darin@apple.com>
18820
18821         - fix newlines to be consistent for all files in the COM directory
18822           (many had mixed style) and set the EOL style to "native" on them.
18823
18824         * COM/*: Set properties and changed files.
18825
18826 2006-07-09  Tim Omernick  <timo@apple.com>
18827
18828         Reviewed by Maciej.
18829
18830         <rdar://problem/4404652> Netscape plug-in mouse events broken in HiDPI
18831
18832         Multiply global mouse coordinates by the window scale factor so that plug-ins can use GlobalToLocal() in HiDPI.
18833         This fixes many bugs involving plug-in mouse event handling in HiDPI.  Most notably, the Flash player will now
18834         correctly respond to clicks.
18835
18836         * Plugins/WebBaseNetscapePluginView.m:
18837         (+[WebBaseNetscapePluginView getCarbonEvent:]):
18838         (-[WebBaseNetscapePluginView getCarbonEvent:withEvent:]):
18839
18840 2006-07-09  Darin Adler  <darin@apple.com>
18841
18842         Reviewed by Tim Hatcher.
18843
18844         - fix assertion firing in plug-in layout tests
18845
18846         * Plugins/WebBaseNetscapePluginView.m:
18847         (-[WebBaseNetscapePluginView restartNullEvents]):
18848         Don't start null events if the plug-in is not in the
18849         started state. This happens when the plug-in moves within
18850         its view hierarchy after it has been stopped.
18851
18852 2006-07-09  Timothy Hatcher  <timothy@apple.com>
18853
18854         Reviewed by Darin.
18855
18856         Bug 9820: Move new DOM API that has been through API review to public headers
18857         http://bugs.webkit.org/show_bug.cgi?id=9820
18858
18859         * Misc/WebElementDictionary.m: include DOMExtensions.h
18860         * Misc/WebNSViewExtras.m: include DOMExtensions.h
18861         * WebKit.xcodeproj/project.pbxproj: make DOMXPath.h public
18862
18863 2006-07-09  Timothy Hatcher  <timothy@apple.com>
18864
18865         Reviewed by Kevin.
18866
18867         Bug 9818: move new UIDelegate API that has been through API review to public headers
18868         http://bugs.webkit.org/show_bug.cgi?id=9818
18869
18870         <rdar://problem/4387541> API: Remove webView:setContentRect: & webViewContentRect: delegate methods?
18871         The fix for 4310363 removed the only use of webViewContentRect: in our code. webView:setContentRect:
18872         was never used to begin with. There's no harm in leaving these around in the API, but they'll cruft it up.
18873
18874         Also removes the never used webViewPrint: SPI that was replaced by webView:printFrameView:.
18875
18876         * DefaultDelegates/WebDefaultUIDelegate.m:
18877         * WebCoreSupport/WebFrameBridge.m:
18878         (-[WebFrameBridge print]):
18879         * WebView/WebFrameView.h:
18880         * WebView/WebFrameView.m:
18881         * WebView/WebFrameViewPrivate.h:
18882         * WebView/WebUIDelegate.h:
18883         * WebView/WebUIDelegatePrivate.h:
18884
18885 2006-07-09  Timothy Hatcher  <timothy@apple.com>
18886
18887         Reviewed by Darin.
18888
18889         Bug 9814: Move new WebView API that has been through API review to public headers
18890         http://bugs.webkit.org/show_bug.cgi?id=9814
18891
18892         * WebView/WebView.h:
18893         * WebView/WebView.m:
18894         (-[WebView close]):
18895         (-[WebView setShouldCloseWithWindow:]):
18896         (-[WebView shouldCloseWithWindow]):
18897         (-[WebView selectedFrame]):
18898         (-[WebView setMainFrameURL:]):
18899         (-[WebView mainFrameURL]):
18900         (-[WebView isLoading]):
18901         (-[WebView mainFrameTitle]):
18902         (-[WebView mainFrameIcon]):
18903         (-[WebView mainFrameDocument]):
18904         (-[WebView setDrawsBackground:]):
18905         (-[WebView drawsBackground]):
18906         (-[WebView toggleSmartInsertDelete:]):
18907         (-[WebView toggleContinuousSpellChecking:]):
18908         (-[WebView canMakeTextStandardSize]):
18909         (-[WebView makeTextStandardSize:]):
18910         (-[WebView maintainsInactiveSelection]):
18911         * WebView/WebViewPrivate.h:
18912
18913 2006-07-09  Timothy Hatcher  <timothy@apple.com>
18914
18915         Reviewed by Maciej.
18916
18917         Bug 9487: The XPath section should be removed and/or moved.
18918         http://bugs.webkit.org/show_bug.cgi?id=9487
18919
18920         * WebInspector/webInspector/inspector.css:
18921         * WebInspector/webInspector/inspector.html:
18922         * WebInspector/webInspector/inspector.js:
18923
18924 2006-07-09  Anders Carlsson  <acarlsson@apple.com>
18925
18926         Reviewed by Tim O.
18927
18928         * WebCoreSupport/WebSystemInterface.m:
18929         (InitWebCoreSystemInterface):
18930         Initialize wkPathFromFont.
18931
18932 2006-07-09  Darin Adler  <darin@apple.com>
18933
18934         - fix release build
18935
18936         * Plugins/WebBaseNetscapePluginView.m:
18937         (-[WebBaseNetscapePluginView restorePortState:]): Cast inside the assertion so
18938         that we don't have an unused variable in versions with assertions disabled.
18939         The alternative would be to wrap the whole thing in an #if statement.
18940
18941 2006-07-08  Tim Omernick  <timo@apple.com>
18942
18943         Reviewed by John Sullivan.
18944
18945         * Plugins/WebBaseNetscapePluginView.h:
18946         - Added ivars for OpenGL support.  Someday it would be nice to refactor this class so
18947           that each drawing model is encapsulated in a class; this would allow
18948           WebBaseNetscapePluginView to make more efficient use of space, for example by not
18949           keeping OpenGL-related ivars for Quickdraw plug-ins.
18950         
18951         * Plugins/WebBaseNetscapePluginView.m:
18952         - Declared a bunch of internal methods for OpenGL support (see below).
18953         - Removed "forUpdate" from CoreGraphics port state struct; it was always set to "YES",
18954           so I just cleaned up the silly code that used it.
18955         - Declared OpenGL port state struct.
18956         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
18957         - Moved a CoreGraphics-related assertion down to the big "switch" statement.
18958         - Don't set window.type here -- according to the Netscape Plug-in API docs, the plug-in
18959           should default to "windowed" mode, and may call NPN_SetValue() during its NPN_New() to
18960           request that the browser use a "windowless" (offscreen) context instead.
18961         - Moved the assertion from the top of this method here; removed a less restrictive
18962           assertion that is now obsolete.
18963         - Removed "forUpdate" flag from CoreGraphics port state struct.
18964         - Fill in OpenGL port state struct.  Set up the viewport appropriately for both windowed
18965           and windowless OpenGL plug-ins.  Windowed plug-ins need to have their GL viewport
18966           transformed by the amount the plug-in is clipped; windowless plug-ins are drawn off-screen
18967           into a surface whose geometry is never changed or clipped, so they may always draw with
18968           a viewport origin of (0, 0).
18969         (-[WebBaseNetscapePluginView restorePortState:]):
18970         - Removed "forUpdate" flag from CoreGraphics port state struct.
18971         - Restore the old OpenGL context saved by -saveAndSetNewPortStateForUpdate:.
18972         (-[WebBaseNetscapePluginView sendEvent:]):
18973         - Updated an assertion to also include OpenGL.  To ensure that attached plug-in window movements
18974           happen atomically with web page redisplays, we assert that the plug-in's window is set only while
18975           the plug-in view is redrawing.
18976         - Same deal as with the assertion; only save/set port state when redrawing the plug-in view.  Plug-ins
18977           that use the new drawing models are only allowed to draw when the web page draws.  I might consider
18978           changing this for windowed OpenGL plug-ins, since they always obscure the page content anyway.
18979         (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]):
18980         - Compare new NP_GLContext structs.
18981         (-[WebBaseNetscapePluginView updateAndSetWindow]):
18982         - In OpenGL mode, can only set window when updating plug-in view.
18983         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
18984         - ditto
18985         - Updated logging for OpenGL drawing mode.
18986         (-[WebBaseNetscapePluginView addWindowObservers]):
18987         - No need to observe frame/bounds change notifications for this and all parent views.  See -renewGState
18988           comments below.
18989         (-[WebBaseNetscapePluginView removeWindowObservers]):
18990         - Don't need to remove frame/bounds observers anymore.
18991         (-[WebBaseNetscapePluginView start]):
18992         - Plug-ins are "windowed" by default.  This is not a change from our previous behavior, but this is a
18993           better place to set the default value as it allows the plug-in to override it later.
18994         (-[WebBaseNetscapePluginView stop]):
18995         - Destroy AGL context when the plug-in stops.
18996         (-[WebBaseNetscapePluginView dealloc]):
18997         - Assert that the AGL stuff has been cleaned up.
18998         (-[WebBaseNetscapePluginView drawRect:]):
18999         - If this is a windowless OpenGL plugin, blit its contents back into this view.
19000         (-[WebBaseNetscapePluginView renewGState]):
19001         - This method is called when the view or one of its parents is moved or resized (see comments).
19002         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
19003         - Hide the AGL window if the plug-in view is about to be removed from its window.
19004         (-[WebBaseNetscapePluginView viewHasMoved:]):
19005         - Renamed and moved to the "Internal" category.
19006         (-[WebBaseNetscapePluginView invalidateRegion:]):
19007         - Style changes.
19008         - Add support for OpenGL (uses the same region type as CoreGraphics).
19009         (-[WebBaseNetscapePluginView getVariable:value:]):
19010         - Style changes.
19011         - Implemented NPNVsupportsOpenGLBool; returns YES since we now support the OpenGL drawing model.
19012         (-[WebBaseNetscapePluginView setVariable:value:]):
19013         - Implemented NPPVpluginWindowBool, which allows plug-ins to specify whether they should be rendered in
19014           "windowed" or "windowless" mode.  This is an older part of the Netscape Plug-in API that was never
19015           implemented in WebKit.  "Windowed" Quickdraw plug-ins do not actually reside in a separate window, and
19016           can already do many of the same things (such as transparency) that only "windowless" plug-ins can do on
19017           other platforms.  However, we need the "windowed" vs. "windowless" distinction for OpenGL plug-ins so
19018           that they have some way of specifying whether they should be rendered on an accelerated overlay surface,
19019           composited into the browser window.
19020         - Support for setting the drawing model to OpenGL.
19021         (-[WebBaseNetscapePluginView _viewHasMoved]):
19022         - Renamed from -viewHasMoved:, and moved down in the file.
19023         - None of this work is necessary when the plug-in is not in a window; the plug-in's state will be properly
19024           restored when it is moved back into a window.
19025         - Reshape OpenGL surface window here.
19026         (-[WebBaseNetscapePluginView _createAGLContextIfNeeded]):
19027         - Creates the AGL context of the appropriate type (windowed/windowless).
19028         (-[WebBaseNetscapePluginView _createWindowedAGLContext]):
19029         - Creates a windowed AGL context, which is an AGL context attached to a child window.  This is the only way
19030           to get true hardware acceleration.
19031         (-[WebBaseNetscapePluginView _createWindowlessAGLContext]):
19032         - Creates a windowless AGL context, which is an AGL context attached to an offscreen buffer.  This buffer can
19033           then be blitted back into the browser window with a different alpha, or scaled, or whatever.
19034         (-[WebBaseNetscapePluginView _cglContext]):
19035         - Returns the underlying CGL context from the AGL context.  We give the plug-in access to the CGL context because
19036           CGL is the more primitive of the GL drawable APIs and allows for finer control over the context.
19037         (-[WebBaseNetscapePluginView _getAGLOffscreenBuffer:width:height:]):
19038         - Returns the buffer allocated for the offscreen AGL context, if there is one.
19039         (-[WebBaseNetscapePluginView _destroyAGLContext]):
19040         - Destroys the AGL context, as well as the associated offscreen buffer or child window.
19041         (-[WebBaseNetscapePluginView _reshapeAGLWindow]):
19042         - Positions the AGL window over the browser window.
19043         (-[WebBaseNetscapePluginView _hideAGLWindow]):
19044         - Hides the AGL window.
19045         (-[WebBaseNetscapePluginView _aglOffscreenImageForDrawingInRect:]):
19046         - Returns an NSImage representation of the offscreen AGL context's framebuffer.  This is used to draw the offscreen
19047           bits back into the plug-in view.  This is kind of tricky because it has to convert the offscreen buffer in-place
19048           from BGRA to RGBA so that it can be wrapped in an NSBitmapImageRep.  See comments.
19049
19050         * WebKit.xcodeproj/project.pbxproj:
19051         Link OpenGL and AGL.
19052
19053 2006-07-09  Brady Eidson  <beidson@apple.com>
19054
19055         Reviewed by Maciej
19056
19057         The ICONDEBUG flag now chooses either the new icon database or the old one
19058         No longer any need to live side by side to compare results
19059
19060         * Misc/WebIconDatabase.m:
19061         (-[NSMutableDictionary iconURLForURL:]):
19062         (-[NSMutableDictionary retainIconForURL:]):
19063         (-[NSMutableDictionary releaseIconForURL:]):
19064         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
19065         (-[WebIconDatabase _setIconURL:forURL:]):
19066         (-[WebIconDatabase _resetCachedWebPreferences:]):
19067
19068 2006-07-08  Timothy Hatcher  <timothy@apple.com>
19069
19070         Reviewed by Maciej.
19071
19072         Bug 5312: comments aren't available via DOM
19073         http://bugs.webkit.org/show_bug.cgi?id=5312
19074
19075         Makes the Web Inspector show comment node contents.
19076
19077         * WebInspector/WebInspector.m:
19078         (-[DOMNode _displayName]): return the contents of the comment
19079         * WebInspector/webInspector/inspector.js: check for comment nodes
19080
19081 2006-07-09  Alexey Proskuryakov  <ap@nypop.com>
19082
19083         Reviewed by Darin.
19084
19085         - http://bugs.webkit.org/show_bug.cgi?id=9572
19086         Add application/xhtml+xml to the Accept header
19087
19088         * WebView/WebFrame.m:
19089         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]): Add an Accept header
19090         to main resource requests.
19091         * English.lproj/StringsNotToBeLocalized.txt: Added new strings.
19092
19093 2006-07-08  Darin Adler  <darin@apple.com>
19094
19095         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
19096         (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
19097         Removed misleading old comment.
19098
19099 === Safari-521.15 ===
19100
19101 2006-07-07  Levi Weintraub  <lweintraub@apple.com>
19102
19103         Reviewed by justin
19104
19105         Finished moving deletion selection expansion across the bridge... say that 3 times fast.
19106
19107         * WebView/WebHTMLView.m:  Pass granularity to WebCore to handle expansion
19108         (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:granularity:]):
19109         (-[WebHTMLView _deleteSelection]):
19110         (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
19111         (-[WebHTMLView deleteToMark:]):
19112
19113 2006-07-07  Brady Eidson  <beidson@apple.com>
19114
19115         Reviewed by John
19116
19117         Changed an ASSERT to a LOG_ERROR for an error that could be handled gracefully, but
19118         whose assertion was reproducibly causing a build bot failure
19119
19120         * Misc/WebIconDatabase.m:
19121         (-[WebIconDatabase _releaseIconForIconURLString:]):
19122
19123 2006-07-06  Levi Weintraub  <lweintraub@apple.com>
19124
19125         Reviewed by justin
19126
19127         Improved table editing
19128
19129         * WebCoreSupport/WebFrameBridge.m: Added method to allow WebCore to trigger
19130         deletion editing delegate
19131         (-[WebFrameBridge shouldDeleteSelectedDOMRange:]):
19132         * WebView/WebHTMLView.m: Moved code that expanded a selection when the delete
19133         key is pressed over to WebCore so we can be more intelligent about how to handle it
19134         (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]):
19135         (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
19136
19137 2006-07-07  John Sullivan  <sullivan@apple.com>
19138
19139         Reviewed by Tim Hatcher
19140         
19141         - fixed <rdar://problem/4606857> WebKit: WebPreferencesChangedNotification not exported
19142
19143         * WebKit.exp:
19144         added surprisingly missing _WebPreferencesChangedNotification, defined in
19145         WebPreferences.h
19146
19147 2006-07-06  Brady Eidson  <beidson@apple.com>
19148
19149         Reviewed by John.
19150
19151         Small fix to my previous small fix that only lets the ASSERT off the hook if the DB
19152         is closing
19153
19154         * Misc/WebIconDatabase.m:
19155         (-[WebIconDatabase _releaseIconForIconURLString:]):
19156
19157 2006-07-05  Brady Eidson  <beidson@apple.com>
19158
19159         Reviewed by Maciej
19160
19161         Small fix that prevents an assertion from triggering if the DB is being cleaned up 
19162         (ie, the app being shut down)
19163
19164         * Misc/WebIconDatabase.h:
19165         * Misc/WebIconDatabase.m:
19166         (-[NSMutableDictionary init]):
19167         (-[WebIconDatabase _applicationWillTerminate:]):
19168         (-[WebIconDatabase _releaseIconForIconURLString:]):
19169
19170 2006-07-05  Adele Peterson  <adele@apple.com>
19171
19172         Reviewed by Maciej and Hyatt.
19173
19174         WebKit part of initial popup menu implementation.
19175
19176         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
19177         Initialize WKPopupMenu.
19178
19179 2006-07-05  Anders Carlsson  <acarlsson@apple.com>
19180
19181         Reviewed by Maciej.
19182
19183         http://bugs.webkit.org/show_bug.cgi?id=3581
19184         iFrames set to display:none are Missing from frames array
19185         
19186         * WebCoreSupport/WebFrameBridge.m:
19187         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
19188         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
19189         Modify to pass the owner element instead of the owner renderer.
19190         
19191         * WebView/WebHTMLView.m:
19192         (-[WebHTMLView _topHTMLView]):
19193         Remove assertion, it's not valid anymore.
19194
19195 2006-07-05  Timothy Hatcher  <timothy@apple.com>
19196
19197         Reviewed by Harrison.
19198
19199         <rdar://problem/4608423> HIViewAdapter used but not defined
19200         Adds a new export file to fix the build.
19201
19202         * WebKit.LP64.exp: Added.
19203         * WebKit.xcodeproj/project.pbxproj:
19204
19205 2006-07-04  Timothy Hatcher  <timothy@apple.com>
19206
19207         Reviewed by Maciej.
19208
19209         Bug 9731: [Drosera] crash when trying to access the scope chain
19210         http://bugs.webkit.org/show_bug.cgi?id=9731
19211
19212         Because of <rdar://problem/4608404> the WebScriptObject, _globalObj, that
19213         WebCoreScriptDebugger holds is unprotected each time the page changes.
19214         This causes Drosera to crash Safari when trying to access the scope chain.
19215         We simply need to detach and re-attach the debugger when the window script
19216         object is cleared until 4608404 is fixed. This change also attaches the
19217         debugger before we call the windowScriptObjectAvailable: delegate method,
19218         so the debugger is ready before anyone might use the window object.
19219
19220         * WebCoreSupport/WebFrameBridge.m:
19221         (-[WebFrameBridge windowObjectCleared]):
19222
19223 2006-07-04  Timothy Hatcher  <timothy@apple.com>
19224
19225         Reviewed by Darin.
19226
19227         Bug 9732: [Drosera] calling removeListener to many times will cause
19228                   WebKit's listener count to underflow/wraparound
19229         http://bugs.webkit.org/show_bug.cgi?id=9732
19230
19231         Adds a check to make sure the listener was in our listeners set before
19232         decrementing the global listener count. Also checks for nil in addListner
19233         to prevent a possible exception when adding the object to the set.
19234
19235         * DefaultDelegates/WebScriptDebugServer.m:
19236         (-[WebScriptDebugServer addListener:]):
19237         (-[WebScriptDebugServer removeListener:]):
19238
19239 2006-07-04  Alexey Proskuryakov  <ap@nypop.com>
19240
19241         Reviewed by Maciej.
19242
19243         - http://bugs.webkit.org/show_bug.cgi?id=8210
19244         Conditional XMLHttpRequest gets should pass 304 responses unchanged
19245
19246         Test: http/tests/xmlhttprequest/cache-override.html
19247
19248         * Misc/WebNSURLRequestExtras.h: Added _web_isConditionalRequest
19249         * Misc/WebNSURLRequestExtras.m:
19250         (-[NSURLRequest _web_isConditionalRequest]):
19251         * WebCoreSupport/WebFrameBridge.m:
19252         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
19253         Bypass the cache for conditional requests.
19254         * WebCoreSupport/WebSubresourceLoader.m:
19255         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]): Ditto.
19256
19257 2006-07-01  David Kilzer  <ddkilzer@kilzer.net>
19258
19259         Reviewed by NOBODY (fixed Tim's build fix).
19260
19261         * WebView/WebView.m: Added back missing '/' at the beginning of the file.
19262
19263 2006-07-01  Tim Omernick  <timo@apple.com>
19264
19265         Reviewed by NOBODY (build fix)
19266
19267         * WebView/WebView.m:
19268         (-[WebView _isMIMETypeRegisteredAsPlugin:]):
19269         Changed nil to NO (typo).
19270
19271 === Safari-521.14 ===
19272
19273 2006-06-30  Timothy Hatcher  <timothy@apple.com>
19274
19275         Reviewed by Darin.
19276
19277         Only enable shouldCloseWithWindow when ObjC GC is enabled.
19278         This maintains backwards compatibility with applications
19279         that expect a WebView to be usable after the window closes.
19280
19281         * WebView/WebView.m:
19282         (-[WebViewPrivate init]):
19283
19284 2006-06-30  Timothy Hatcher  <timothy@apple.com>
19285
19286         Reviewed by Anders.
19287
19288         Call _close in dealloc to ensure we cleanup for backwards
19289         compatibility. This will safeguard and cleanup even if the
19290         application doesn't use the new close API yet, like Mail.
19291
19292         * WebView/WebView.m:
19293         (-[WebView dealloc]):
19294
19295 2006-06-29  Timothy Hatcher  <timothy@apple.com>
19296
19297         Reviewed by Darin.
19298
19299         <rdar://problem/4484405> WebKit leaks, improper tear-down
19300         <rdar://problem/3694059> -[WebBackForwardList finalize] is incorrect; design change needed
19301         <rdar://problem/3694103> -[WebFrame finalize] is incorrect; design change needed
19302         <rdar://problem/3694104> -[WebHTMLView finalize] is incorrect; design change needed
19303
19304         Adds a close method to WebView, this needs to be called when the 
19305         WebView is no longer needed. To make this easier for the common cases
19306         there is now an "auto close" on WebView that listens to the view's
19307         parent window. If the parent window closes and the WebView has no
19308         hostWindow then the WebView is automatically closed if autoClose is YES.
19309         To manage WebView closing yourself call setAutoClose: and pass NO.
19310
19311         When a WebView closes it will tear-down and not be usable anymore.
19312         Close will will called on various other internal objects as a part
19313         of this, to ensure proper tear-down in GC without relying on finalize.
19314
19315         * History/WebBackForwardList.m:
19316         (-[WebBackForwardList dealloc]):
19317         (-[WebBackForwardList finalize]):
19318         (-[WebBackForwardList _close]):
19319         * History/WebHistoryItem.m:
19320         (+[WebHistoryItem _closeObjectsInPendingPageCaches]):
19321         (+[WebHistoryItem _releaseAllPendingPageCaches]):
19322         * History/WebHistoryItemPrivate.h:
19323         * WebCoreSupport/WebFrameBridge.m:
19324         (-[WebFrameBridge close]):
19325         (-[WebFrameBridge saveDocumentToPageCache:]):
19326         (-[WebFrameBridge canGoBackOrForward:]):
19327         * WebView/WebFrame.m:
19328         (-[WebFrame _detachFromParent]):
19329         (-[WebFrame dealloc]):
19330         (-[WebFrame finalize]):
19331         * WebView/WebFrameView.m:
19332         (-[WebFrameView _setWebFrame:]):
19333         (-[WebFrameView finalize]):
19334         * WebView/WebHTMLView.m:
19335         (-[WebHTMLView close]):
19336         (-[WebHTMLView dealloc]):
19337         (-[WebHTMLView finalize]):
19338         * WebView/WebHTMLViewInternal.h:
19339         * WebView/WebHTMLViewPrivate.h:
19340         * WebView/WebScriptDebugDelegate.m:
19341         (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
19342         (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]):
19343         (-[WebScriptCallFrame enteredFrame:sourceId:line:]):
19344         (-[WebScriptCallFrame hitStatement:sourceId:line:]):
19345         (-[WebScriptCallFrame leavingFrame:sourceId:line:]):
19346         * WebView/WebScriptDebugDelegatePrivate.h:
19347         * WebView/WebView.m:
19348         (-[WebViewPrivate init]):
19349         (-[WebView _close]):
19350         (-[WebView dealloc]):
19351         (-[WebView finalize]):
19352         (-[WebView viewWillMoveToWindow:]):
19353         (-[WebView _windowWillClose:]):
19354         (-[WebView setPreferencesIdentifier:]):
19355         (-[WebView mainFrame]):
19356         (-[WebView setHostWindow:]):
19357         (-[WebView searchFor:direction:caseSensitive:wrap:]):
19358         (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
19359         (-[WebView close]):
19360         (-[WebView setAutoClose:]):
19361         (-[WebView autoClose]):
19362         (-[WebView _frameViewAtWindowPoint:]):
19363         * WebView/WebViewPrivate.h:
19364
19365 2006-06-29  Kevin Decker  <kdecker@apple.com>
19366
19367         Reviewed by mjs and timo.
19368         
19369         Fixed: <rdar://problem/4609119> handleAuthenticationFromResource was removed; needed by the Dashboard
19370
19371         * WebView/WebViewPrivate.h: Added handleAuthenticationFromResource back into the header. Needed by the
19372         Dashboard, but was removed in r.14028 on 2006-04-23. 
19373
19374 2006-06-29  Tim Omernick  <timo@apple.com>
19375
19376         Reviewed by Kevin Decker.
19377
19378         <rdar://problem/4608487> REGRESSION: reproducible crash in +[WebCoreFrameBridge supportedImageMIMETypes]
19379
19380         * Plugins/WebPluginDatabase.m:
19381         (+[WebPluginDatabase setAdditionalWebPlugInPaths:]):
19382         One might be tempted to add additionalWebPlugInPaths to the global WebPluginDatabase here.
19383         For backward compatibility with earlier versions of the +setAdditionalWebPlugInPaths: SPI,
19384         we need to save a copy of the additional paths and not cause a refresh of the plugin DB
19385         at this time.
19386         (-[WebPluginDatabase _plugInPaths]):
19387         Include additionalWebPlugInPaths if this is the global DB.
19388         (-[WebPluginDatabase refresh]):
19389         Call -_plugInPaths to get the modified array of paths.  This is similar to what the old code
19390         (before we had per-WebView plugin search paths).
19391
19392 2006-06-29  Tim Omernick  <timo@apple.com>
19393
19394         Reviewed by John Sullivan.
19395
19396         WebHistoryItem now supports getting and setting arbitrary properties via _transientPropertyForKey: and
19397         -_setTransientProperty:forKey:.
19398         For now, these properties do not persist with the rest of the history data.  They are intended to hold transient
19399         per-history-item state, which is something that was until now difficult for a WebKit client app to do.
19400         
19401         * History/WebHistoryItemPrivate.h:
19402         * History/WebHistoryItem.m:
19403         (-[WebHistoryItemPrivate dealloc]):
19404         (-[WebHistoryItem _transientPropertyForKey:]):
19405         (-[WebHistoryItem _setTransientProperty:forKey:]):
19406
19407 2006-06-29  Timothy Hatcher  <timothy@apple.com>
19408
19409         Reviewed by Harrison.
19410
19411         Smart insert and delete, continuous spell checking and autoscroll
19412         can now be used for any WebView, not just editable ones. All of
19413         these make sense for documents that might contain content editable 
19414         areas or our new text fields. Autoscroll is usefull for dragging
19415         for file input controls also.
19416
19417         Added a SPI to toggle WebViews tab key behavior, tabKeyCyclesThroughElements.
19418         WebHTMLView's _interceptEditingKeyEvent now uses WebView's
19419         tabKeyCyclesThroughElements state to determine whether or not
19420         to process tab key events. The idea here is that tabKeyCyclesThroughElements
19421         will be YES when this WebView is being used in a browser, and we
19422         desire the behavior where tab moves to the next element in tab order.
19423         If tabKeyCyclesThroughElements is NO, it is likely that the WebView
19424         is being embedded as the whole view, as in Mail, and tabs should input
19425         tabs as expected in a text editor. Using Option-Tab always cycles
19426         through elements.
19427
19428         * WebView/WebHTMLRepresentation.m:
19429         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
19430         * WebView/WebHTMLView.m:
19431         (-[WebHTMLView _interceptEditingKeyEvent:]):
19432         * WebView/WebView.m:
19433         (-[WebViewPrivate init]):
19434         (-[WebView _autoscrollForDraggingInfo:timeDelta:]):
19435         (-[WebView _shouldAutoscrollForDraggingInfo:]):
19436         (-[WebView validateUserInterfaceItem:]):
19437         (-[WebView toggleSmartInsertDelete:]):
19438         (-[WebView toggleContinuousSpellChecking:]):
19439         (-[WebView setTabKeyCyclesThroughElements:]):
19440         (-[WebView tabKeyCyclesThroughElements]):
19441         * WebView/WebViewPrivate.h:
19442
19443 2006-06-29  Anders Carlsson  <acarlsson@apple.com>
19444
19445         Reviewed by Tim O.
19446
19447         * WebKit.xcodeproj/project.pbxproj:
19448         Add DOMXPath.h header.
19449
19450 2006-06-28  David Hyatt  <hyatt@apple.com>
19451
19452         Fix custom highlighting so that you can paint the entire line (and go
19453         outside the bounds of the line).
19454
19455         Reviewed by harrison
19456
19457         * WebCoreSupport/WebFrameBridge.m:
19458         (-[WebFrameBridge customHighlightRect:forLine:]):
19459         (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:entireLine:]):
19460         * WebKit.xcodeproj/project.pbxproj:
19461         * WebView/WebHTMLViewPrivate.h:
19462
19463 2006-06-28  Maciej Stachowiak  <mjs@apple.com>
19464
19465         Reviewed by Anders.
19466         
19467         - fix Frame leak on layout tests
19468
19469         * WebCoreSupport/WebPageBridge.m:
19470         (-[WebPageBridge outerView]): Return WebFrameView for main frame instead
19471         of WebView to avoid reference cycle between WebView and Page.
19472
19473 2006-06-28  Timothy Hatcher  <timothy@apple.com>
19474
19475         Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
19476
19477         * WebKit.xcodeproj/project.pbxproj:
19478
19479 2006-06-28  Levi Weintraub  <lweintraub@apple.com>
19480
19481         Reviewed by justin
19482
19483         http://bugs.webkit.org/show_bug.cgi?id=7568
19484         Bug 7568: Implement Indent/Outdent
19485         Added undo action strings and enum values
19486
19487         * English.lproj/Localizable.strings:
19488         * WebCoreSupport/WebFrameBridge.m: 
19489         (-[WebFrameBridge nameForUndoAction:]):
19490
19491 2006-06-27  Brady Eidson  <beidson@apple.com>
19492
19493         Reviewed by Maciej
19494
19495         Hookup the new semi-functional SQLite icon database.
19496         For now, it is living side-by-side with the old DB so one can compare the
19497         two for debugging purposes.  Also, it is disabled (in WebKit) by default unless you
19498         compile with ICONDEBUG #defined.
19499         Note:  To repeat that, if you want to try the new DB, #define ICONDEBUG (WebKitPrefix.h is a good place to do it)
19500
19501         * Misc/WebIconDatabase.m:
19502         (-[NSMutableDictionary iconForURL:withSize:cache:]):
19503         (-[NSMutableDictionary iconURLForURL:]):
19504         (-[NSMutableDictionary retainIconForURL:]):
19505         (-[NSMutableDictionary releaseIconForURL:]):
19506         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
19507         (-[WebIconDatabase _setIconURL:forURL:]):
19508         (-[WebIconDatabase _hasIconForIconURL:]):
19509         (-[WebIconDatabase _resetCachedWebPreferences:]):
19510         * Misc/WebIconLoader.m:
19511         (-[WebIconLoader didFinishLoading]):
19512         * WebKit.xcodeproj/project.pbxproj:
19513
19514 2006-06-26  David Hyatt  <hyatt@apple.com>
19515
19516         Fix for 9538, support syntax highlighting for HTML source.
19517
19518         Reviewed by darin
19519
19520         * WebKit.xcodeproj/project.pbxproj:
19521         * WebView/WebView.m:
19522         (-[WebView _setInViewSourceMode:]):
19523         (-[WebView _inViewSourceMode]):
19524         * WebView/WebViewPrivate.h:
19525
19526 2006-06-25  Timothy Hatcher  <timothy@apple.com>
19527
19528         Reviewed by Darin.
19529
19530         Bug 9574: Drosera should show inline scripts within the original HTML
19531         http://bugs.webkit.org/show_bug.cgi?id=9574
19532
19533         * Adds a new version of the didParseSource delegate callback with base line number.
19534         * Adds a new delegate callback for when a script fails to parse.
19535         * These new callbacks use NSURLs for the url parameter.
19536         * Adds a new script listener callback to notify when the main resource loads.
19537         * Adds a WebScriptErrorDomian and other keys for use with NSError.
19538
19539         * DefaultDelegates/WebDefaultScriptDebugDelegate.m:
19540         (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
19541         (-[WebDefaultScriptDebugDelegate webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
19542         * DefaultDelegates/WebScriptDebugServer.h:
19543         * DefaultDelegates/WebScriptDebugServer.m:
19544         (-[WebScriptDebugServer webView:didLoadMainResourceForDataSource:]):
19545         (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
19546         (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
19547         * DefaultDelegates/WebScriptDebugServerPrivate.h:
19548         * WebKit.exp:
19549         * WebView/WebDataSource.m:
19550         (-[WebDataSource _setPrimaryLoadComplete:]):
19551         * WebView/WebScriptDebugDelegate.h:
19552         * WebView/WebScriptDebugDelegate.m:
19553         (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]):
19554
19555 2006-06-24  David Kilzer  <ddkilzer@kilzer.net>
19556
19557         Reviewed by Timothy.
19558
19559         * Info.plist: Fixed copyright to include 2003-2006.
19560
19561 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
19562
19563         Reviewed by Darin.
19564
19565         - http://bugs.webkit.org/show_bug.cgi?id=9418
19566         WebKit will not build when Space exists in path
19567
19568         * WebKit.xcodeproj/project.pbxproj: Enclose search paths in quotes.
19569
19570 2006-06-23  Tim Omernick  <timo@apple.com>
19571
19572         Reviewed by John Sullivan.
19573
19574         * Plugins/WebBaseNetscapePluginView.m:
19575         (-[WebBaseNetscapePluginView sendEvent:]):
19576         Fixed a bug I found in the CoreGraphics drawing model that was preventing certain types of
19577         events from being dispatched to the plugin, unless the plugin was being updated.  The check
19578         for portState was only required to call -setWindowIfNecessary, not required for the entire
19579         event dispatch.
19580         Also, don't paint the green debug rect unless this is a QuickDraw plugin.  Otherwise the
19581         current QD port is not set, and the green rect fills the entire screen.  Pretty awesome
19582         looking, but not intended behavior.
19583         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
19584         Improved the logging here to include the NPWindow's width and height.
19585
19586 2006-06-23  Timothy Hatcher  <timothy@apple.com>
19587
19588         Reviewed by Tim O.
19589
19590         Adds back SPI that Mail is still depending on.
19591
19592         * WebView/WebDataSource.m:
19593         (-[WebDataSource _addSubframeArchives:]):
19594         * WebView/WebDataSourcePrivate.h:
19595
19596 === WebKit-521.13 ===
19597
19598 2006-06-23  Timothy Hatcher  <timothy@apple.com>
19599
19600         Reviewed by Geoff.
19601
19602         script debugger should only attach to JavaScriptCore when there are listeners
19603         http://bugs.webkit.org/show_bug.cgi?id=9552
19604
19605         Attaches the debugger to all WebFrames when the first listener
19606         is added. Detaches when the last listener is removed.
19607         Also detach when the script debug delegate is set to nil.
19608
19609         * DefaultDelegates/WebScriptDebugServer.m:
19610         (+[WebScriptDebugServer listenerCount]):
19611         (-[WebScriptDebugServer dealloc]):
19612         (-[WebScriptDebugServer attachScriptDebuggerToAllWebViews]):
19613         (-[WebScriptDebugServer detachScriptDebuggerFromAllWebViews]):
19614         (-[WebScriptDebugServer listenerConnectionDidDie:]):
19615         (-[WebScriptDebugServer addListener:]):
19616         (-[WebScriptDebugServer removeListener:]):
19617         * DefaultDelegates/WebScriptDebugServerPrivate.h:
19618         * WebCoreSupport/WebFrameBridge.m:
19619         (-[WebFrameBridge windowObjectCleared]):
19620         * WebView/WebFrame.m:
19621         (-[WebFrame _attachScriptDebugger]):
19622         (-[WebFrame _detachScriptDebugger]):
19623         * WebView/WebFramePrivate.h:
19624         * WebView/WebScriptDebugDelegate.m:
19625         (-[WebScriptCallFrame parsedSource:fromURL:sourceId:]):
19626         (-[WebScriptCallFrame enteredFrame:sourceId:line:]):
19627         (-[WebScriptCallFrame hitStatement:sourceId:line:]):
19628         (-[WebScriptCallFrame leavingFrame:sourceId:line:]):
19629         * WebView/WebView.m:
19630         (-[WebView _attachScriptDebuggerToAllFrames]):
19631         (-[WebView _detachScriptDebuggerFromAllFrames]):
19632         (-[WebView setScriptDebugDelegate:]):
19633         * WebView/WebViewPrivate.h:
19634
19635 2006-06-22  John Sullivan  <sullivan@apple.com>
19636
19637         Reviewed by Tim Omernick
19638         
19639         - added support for UIDelegate to be notified of scrolling in any WebHTMLView
19640         - cleaned up recently-added UIDelegate code
19641
19642         * WebView/WebUIDelegatePrivate.h:
19643         declared webView:didScrollDocumentInFrameView: method
19644
19645         * DefaultDelegates/WebDefaultUIDelegate.m:
19646         (-[NSApplication webView:didDrawRect:]):
19647         provide default (empty) implementation of this recently-added method, so the
19648         DelegateForwarder mechanism will work for it
19649         (-[NSApplication webView:didScrollDocumentInFrameView:]):
19650         same thing for the new method
19651         
19652         * WebView/WebHTMLView.m:
19653         (-[WebHTMLView _frameOrBoundsChanged]):
19654         use _UIDelegateForwarder mechanism to notify delegate that scrolling occurred
19655         (-[WebHTMLView drawSingleRect:]):
19656         use _UIDelegateForwarder mechanism instead of checking respondsToSelector stuff
19657         here (that's packaged up nicely by the forwarder mechanism)
19658         
19659 2006-06-22  Tim Omernick  <timo@apple.com>
19660
19661         Reviewed by NOBODY (build fix)
19662
19663         * WebView/WebFrameLoader.m:
19664         Import WebMainResourceLoader instead of using @class so that we can call WebMainResourceLoader
19665         methods.
19666         
19667 2006-06-22  Tim Omernick  <timo@apple.com>
19668
19669         Reviewed by NOBODY (build fix)
19670
19671         * WebView/WebFrameLoader.m:
19672         Import JavaScriptCore/Assertions.h instead of WebKit/WebAssertions.h (which no longer exists)
19673
19674 2006-06-22  Maciej Stachowiak  <mjs@apple.com>
19675
19676         Reviewed by Adele.
19677         
19678         - start moving loading logic to new WebFrameLoader class; move management of WebLoaders there
19679
19680         * Misc/WebIconLoader.h:
19681         * Misc/WebIconLoader.m:
19682         (-[WebIconLoader didFinishLoading]):
19683         * WebKit.xcodeproj/project.pbxproj:
19684         * WebView/WebDataSource.m:
19685         (-[WebDataSourcePrivate dealloc]):
19686         (-[WebDataSource _updateLoading]):
19687         (-[WebDataSource _loadIcon]):
19688         (-[WebDataSource _setPrimaryLoadComplete:]):
19689         (-[WebDataSource _stopLoading]):
19690         (-[WebDataSource _startLoading]):
19691         (-[WebDataSource _addSubresourceLoader:]):
19692         (-[WebDataSource _removeSubresourceLoader:]):
19693         (-[WebDataSource _addPlugInStreamLoader:]):
19694         (-[WebDataSource _removePlugInStreamLoader:]):
19695         (-[WebDataSource _iconLoaderReceivedPageIcon:]):
19696         (-[WebDataSource _defersCallbacksChanged]):
19697         (-[WebDataSource _stopLoadingWithError:]):
19698         (-[WebDataSource _setupForReplaceByMIMEType:]):
19699         (-[WebDataSource initWithRequest:]):
19700         (-[WebDataSource dealloc]):
19701         (-[WebDataSource finalize]):
19702         (-[WebDataSource data]):
19703         (-[WebDataSource isLoading]):
19704         * WebView/WebFrameLoader.h: Added.
19705         * WebView/WebFrameLoader.m: Added.
19706         (-[WebFrameLoader initWithDataSource:]):
19707         (-[WebFrameLoader dealloc]):
19708         (-[WebFrameLoader hasIconLoader]):
19709         (-[WebFrameLoader loadIconWithRequest:]):
19710         (-[WebFrameLoader stopLoadingIcon]):
19711         (-[WebFrameLoader addPlugInStreamLoader:]):
19712         (-[WebFrameLoader removePlugInStreamLoader:]):
19713         (-[WebFrameLoader setDefersCallbacks:]):
19714         (-[WebFrameLoader stopLoadingPlugIns]):
19715         (-[WebFrameLoader isLoadingMainResource]):
19716         (-[WebFrameLoader isLoadingSubresources]):
19717         (-[WebFrameLoader isLoading]):
19718         (-[WebFrameLoader stopLoadingSubresources]):
19719         (-[WebFrameLoader addSubresourceLoader:]):
19720         (-[WebFrameLoader removeSubresourceLoader:]):
19721         (-[WebFrameLoader mainResourceData]):
19722         (-[WebFrameLoader releaseMainResourceLoader]):
19723         (-[WebFrameLoader cancelMainResourceLoad]):
19724         (-[WebFrameLoader startLoadingMainResourceWithRequest:identifier:]):
19725         (-[WebFrameLoader stopLoadingWithError:]):
19726
19727 2006-06-21  Brady Eidson  <beidson@apple.com>
19728
19729         Reviewed by Maciej
19730
19731         The WebCoreIconDatabaseBridge was getting messages sent to it after it had been closed, resulting in a crash
19732         on an ASSERT().  After closing the databaseBridge, we simply set it to nil so this can't happen.
19733         anymore.
19734
19735         * Misc/WebIconDatabase.m:
19736         (-[WebIconDatabase _applicationWillTerminate:]):
19737
19738 2006-06-21  Tim Omernick  <timo@apple.com>
19739
19740         Reviewed by Geoff Garen.
19741
19742         <rdar://problem/4564131> WebPluginDatabase setAdditionalWebPlugInPaths needs to be per WebView
19743
19744         Added some WebView SPI so that individual WebViews may have different plugin search paths.  There are some 
19745         limitations with the approach taken here:
19746
19747         - JavaScript may only access the global plugin DB.
19748         - When this SPI is in use, certain WebView methods may not give accurate results, such as +canShowMIMEType:.
19749         - This only works for plugins referenced using the <object> or <embed> tags; plugins that reside in non-standard
19750         file system locations may not be loaded directly into frames.
19751         
19752         None of these issues are important to the client that needs this SPI.  Rather than re-architect our entire
19753         plugin database, I think it is better to simply accept these limitations for now.
19754
19755         * Plugins/WebPluginDatabase.h:
19756         Added "plugInPaths" ivar, so different plugin databases can have different search paths.
19757         * Plugins/WebPluginDatabase.m:
19758         (+[WebPluginDatabase installedPlugins]):
19759         Give the global plugin database the default plugin search paths.
19760         (+[WebPluginDatabase setAdditionalWebPlugInPaths:]):
19761         Removed static global; this method now sets the plugin paths on the global plugin database.
19762         (-[WebPluginDatabase setPlugInPaths:]):
19763         Setter method for plugin paths.
19764         (-[WebPluginDatabase close]):
19765         New method; called when the plugin database is no longer needed (when its WebView is being destroyed).
19766         (-[WebPluginDatabase init]):
19767         Don't refresh in -init, so that callers can set the DB's plugin path array before it refreshes.
19768         (-[WebPluginDatabase dealloc]):
19769         Moved here from near the bottom of the file.  Release new ivar.
19770         (-[WebPluginDatabase refresh]):
19771         Use the plugInPaths ivar instead of calling pluginLocations().
19772         Notify plugin packages when they are added to and removed from a plugin database.  A plugin package will
19773         unload itself when it is removed from all of its plugin databases.
19774         The only really tricky thing here is that the global MIME <-> view class registrations are only modified
19775         by the shared plugin DB.
19776         (+[WebPluginDatabase _defaultPlugInPaths]):
19777         Refactored from the old pluginLocations() function; returns the default set of plugin search paths.
19778
19779         * Plugins/WebBasePluginPackage.h:
19780         * Plugins/WebBasePluginPackage.m:
19781         (-[WebBasePluginPackage dealloc]):
19782         Assert that this package has been removed from all of its containing plugin databases.
19783         (-[WebBasePluginPackage finalize]):
19784         ditto
19785         (-[WebBasePluginPackage wasAddedToPluginDatabase:]):
19786         Add plugin database to set.
19787         (-[WebBasePluginPackage wasRemovedFromPluginDatabase:]):
19788         Remove plugin database from set.  If it was the last DB, then unload the plugin package.
19789
19790         * WebView/WebViewInternal.h:
19791         Added instance methods to find the view class or plugin package, given a MIME type or file extension.
19792         * WebView/WebViewPrivate.h:
19793         Added SPI to set plugin search paths per WebView.
19794         * WebView/WebView.m:
19795         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
19796         New method; tries the global MIME <-> view map first; failing that, it checks the WebView's plugin DB.
19797         (-[WebView _close]):
19798         Close the plugin DB.
19799         (-[WebView _setAdditionalWebPlugInPaths:]):
19800         Create the plugin DB if necessary, and set its plugin paths.
19801         (-[WebView _pluginForMIMEType:]):
19802         Checks global plugin DB, falls back on WebView DB.
19803         (-[WebView _pluginForExtension:]):
19804         ditto
19805         (-[WebView _isMIMETypeRegisteredAsPlugin:]):
19806         ditto
19807
19808         * WebCoreSupport/WebFrameBridge.m:
19809         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
19810         Use new WebView instance methods to look for plugins.
19811         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
19812         ditto
19813         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
19814         ditto
19815
19816 2006-06-20  Brady Eidson  <beidson@apple.com>
19817
19818         Reviewed by Maciej
19819
19820         Added calls through to the WebCoreIconDatabaseBridge for all the major WebIconDatabase API.  For now these calls
19821         are wrapped with #ifdef's and are for debugging only.
19822
19823         * Misc/WebIconDatabase.h:
19824         * Misc/WebIconDatabase.m:
19825         (-[NSMutableDictionary _scaleIcon:toSize:]):
19826         (-[NSMutableDictionary init]):
19827         (-[NSMutableDictionary iconForURL:withSize:cache:]):
19828         (-[NSMutableDictionary iconURLForURL:]):
19829         (-[NSMutableDictionary retainIconForURL:]):
19830         (-[NSMutableDictionary releaseIconForURL:]):
19831         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
19832         (-[WebIconDatabase _setIconURL:forURL:]):
19833         (-[WebIconDatabase _hasIconForIconURL:]):
19834         * Misc/WebIconLoader.m:
19835         (-[WebIconLoader didFinishLoading]):
19836
19837         * Misc/WebKitLogging.h:  Added a logging channel for WebIconDatabase debugging
19838         * Misc/WebKitLogging.m:
19839         (WebKitInitializeLoggingChannelsIfNecessary):
19840
19841 2006-06-20  Adele Peterson  <adele@apple.com>
19842
19843         Reviewed by Tim Hatcher.
19844
19845         * WebView/WebMainResourceLoader.m: Added missing header to fix build on Leopard.
19846
19847 2006-06-20  Timothy Hatcher  <timothy@apple.com>
19848
19849         Reviewed by Darin.
19850
19851         Removes the @try/@catch from the callbacks to improve performance,
19852         simply check if the proxy object's connection is still valid first.
19853         Listener objects are now required to be NSDistantObjects.
19854
19855         Adds pause, resume and step support. The debugger process use to handle this,
19856         but it caused problems when there were multiple listeners.
19857
19858         Sends the bundle identifier in the notification userInfo dictionary along with
19859         process name and process ID.
19860
19861         * DefaultDelegates/WebScriptDebugServer.h:
19862         * DefaultDelegates/WebScriptDebugServer.m:
19863         (-[WebScriptDebugServer serverQuery:]):
19864         (-[WebScriptDebugServer addListener:]):
19865         (-[WebScriptDebugServer removeListener:]):
19866         (-[WebScriptDebugServer step]):
19867         (-[WebScriptDebugServer pause]):
19868         (-[WebScriptDebugServer resume]):
19869         (-[WebScriptDebugServer isPaused]):
19870         (-[WebScriptDebugServer suspendProcessIfPaused]):
19871         (-[WebScriptDebugServer webView:didParseSource:fromURL:sourceId:forWebFrame:]):
19872         (-[WebScriptDebugServer webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
19873         (-[WebScriptDebugServer webView:willExecuteStatement:sourceId:line:forWebFrame:]):
19874         (-[WebScriptDebugServer webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
19875         * DefaultDelegates/WebScriptDebugServerPrivate.h:
19876         * WebKit.exp:
19877
19878 2006-06-19  Alexey Proskuryakov  <ap@nypop.com>
19879
19880         Reviewed by Darin.
19881
19882         - http://bugs.webkit.org/show_bug.cgi?id=5499
19883         Page reload does not send any cache control headers
19884
19885         * WebView/WebFrame.m:
19886         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]): Set a proper Cache-Control header for 
19887         reload requests.
19888         (-[WebFrame loadRequest:]): Reset loadType to WebFrameLoadTypeStandard (after a reload, it stayed at 
19889         WebFrameLoadTypeReload, so _addExtraFieldsToRequest erroneously added a Cache-Control header to them).
19890
19891 2006-06-19  John Sullivan  <sullivan@apple.com>
19892
19893         Reviewed by Darin.
19894         
19895         - added mechanism to notify UIDelegate when part of the webview is redrawn. For now, it only
19896           works for HTML views.
19897
19898         * WebView/WebUIDelegatePrivate.h:
19899         Define a new UIDelegate method -webView:didDrawRect:
19900         * WebView/WebHTMLView.m:
19901         (-[WebView drawSingleRect:]):
19902         Call through to UIDelegate if it implements that method. I tested that this does not impact PLT numbers
19903         in the case where the delegate implements the method but does nothing in it.
19904
19905 2006-06-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
19906
19907         Reviewed by Maciej.
19908
19909         - fix http://bugs.webkit.org/show_bug.cgi?id=9452
19910           Assertion failure in -[WebFramePrivate setProvisionalDataSource:]
19911
19912         * WebView/WebFrame.m:
19913         (-[WebFrame _checkLoadCompleteForThisFrame]): Avoid re-entering the delegate's
19914         -[webView:didFailProvisionalLoadWithError:forFrame].
19915
19916 2006-06-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
19917
19918         Reviewed by xenon.
19919
19920         - http://bugs.webkit.org/show_bug.cgi?id=9479
19921           Disassociate the inspector from the frame when it detaches from its parent
19922
19923         * WebInspector/WebInspector.m:
19924         (-[NSWindow setWebFrame:]): Added code to (de)register with the WebFrame
19925         the inspector is (no longer) targeting.
19926         (-[WebInspector _webFrameDetached:]): Added. Moved the code that was previously
19927         in -[inspectedWindowWillClose:] here. This is called by the WebFrame when it
19928         is detached from its parent.
19929         * WebInspector/WebInspectorInternal.h:
19930         * WebView/WebFrame.m:
19931         (-[WebFramePrivate dealloc]):
19932         (-[WebFrame _detachFromParent]): Added code to notify all registered inspectors
19933         that the WebFrame is detaching.
19934         (-[WebFrame _addInspector:]): Added.
19935         (-[WebFrame _removeInspector:]): Added.
19936         * WebView/WebFrameInternal.h:
19937
19938 2006-06-18  Anders Carlsson  <acarlsson@apple.com>
19939
19940         Reviewed by Geoff.
19941
19942         * WebCoreSupport/WebFrameBridge.m:
19943         (-[WebFrameBridge shouldInterruptJavaScript]):
19944         Ask the UI delegate if the script should be interrupted.
19945         
19946         * WebView/WebUIDelegatePrivate.h:
19947         Declare webViewShouldInterruptJavaScript: delegate method
19948
19949 2006-06-17  Mitz Pettel  <opendarwin.org@mitzpettel.com>
19950
19951         Reviewed by Darin.
19952
19953         - fix http://bugs.webkit.org/show_bug.cgi?id=9466
19954           Assertion failure when dragging an image from the document into Safari's address bar
19955
19956         * WebView/WebFrameView.m:
19957         (-[WebFrameView _setDocumentView:]): Reset the WebView's initiatedDrag flag
19958         when the document view is changed.
19959         * WebView/WebHTMLView.m:
19960         (-[WebHTMLView draggedImage:endedAt:operation:]): Changed the ASSERT to allow
19961         for drags that end after the view has been removed from the WebView.
19962
19963 2006-06-16  Timothy Hatcher  <timothy@apple.com>
19964
19965         Reviewed by Tim O.
19966
19967         Exposes a distributed objects server for clients to register for script debugger calls.
19968         For preformance concerns this is disabled by default, you will need to enable this per application.
19969         To enable for Safari do this: defaults write com.apple.Safari WebKitScriptDebuggerEnabled -bool true
19970
19971         Clients will need to listen to the following distributed notification to discover servers:
19972         WebScriptDebugServerDidLoadNotification
19973
19974         To discover servers that previously loaded before the client, the client needs to send the following notification:
19975         WebScriptDebugServerQueryNotification
19976
19977         All servers will reply with the WebScriptDebugServerQueryReplyNotification notification that contains the
19978         registered server connection name to use with distributed objects.
19979
19980         * DefaultDelegates/WebScriptDebugServer.h: Added.
19981         * DefaultDelegates/WebScriptDebugServer.m: Added.
19982         (+[WebScriptDebugServer sharedScriptDebugServer]):
19983         (-[WebScriptDebugServer init]):
19984         (-[WebScriptDebugServer dealloc]):
19985         (-[WebScriptDebugServer serverQuery:]):
19986         (-[WebScriptDebugServer listenerConnectionDidDie:]):
19987         (-[WebScriptDebugServer addListener:]):
19988         (-[WebScriptDebugServer removeListener:]):
19989         (-[WebScriptDebugServer webView:didParseSource:fromURL:sourceId:forWebFrame:]):
19990         (-[WebScriptDebugServer webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
19991         (-[WebScriptDebugServer webView:willExecuteStatement:sourceId:line:forWebFrame:]):
19992         (-[WebScriptDebugServer webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
19993         * DefaultDelegates/WebScriptDebugServerPrivate.h: Added.
19994         * WebCoreSupport/WebFrameBridge.m:
19995         (-[WebFrameBridge windowObjectCleared]):
19996         * WebKit.exp:
19997         * WebKit.xcodeproj/project.pbxproj:
19998         * WebView/WebScriptDebugDelegate.m:
19999         (-[WebScriptCallFrame parsedSource:fromURL:sourceId:]):
20000         (-[WebScriptCallFrame enteredFrame:sourceId:line:]):
20001         (-[WebScriptCallFrame hitStatement:sourceId:line:]):
20002         (-[WebScriptCallFrame leavingFrame:sourceId:line:]):
20003         * WebView/WebView.m:
20004         (+[WebView _developerExtrasEnabled]):
20005         (+[WebView _scriptDebuggerEnabled]):
20006         (-[WebView _menuForElement:defaultItems:]):
20007         (-[WebView _commonInitializationWithFrameName:groupName:]):
20008         * WebView/WebViewPrivate.h:
20009
20010 2006-06-16  Adele Peterson  <adele@apple.com>
20011
20012         Reviewed by Alice.
20013
20014         Added initialization for WKDrawBezeledTextArea.
20015
20016         * WebCoreSupport/WebSystemInterface.m:
20017         (InitWebCoreSystemInterface):
20018
20019 2006-06-15  Timothy Hatcher  <timothy@apple.com>
20020
20021         Reviewed by Geoff and Darin.
20022         
20023         Prefer the DWARF debugging symbols format for use in Xcode 2.3.
20024
20025         * WebKit.xcodeproj/project.pbxproj:
20026
20027 2006-06-15  John Sullivan  <sullivan@apple.com>
20028
20029         Reviewed by Tim O.
20030         
20031         Fixed bug in WebKit support for computing but not highlighting rects for text matches.
20032
20033         * WebView/WebView.m:
20034         (-[WebView rectsForTextMatches]):
20035         leave out empty rects, and convert rects to WebView coordinates. Since this makes a batch
20036         of autoreleased NSValue objects, use a local autorelease pool
20037
20038 2006-02-11  David Kilzer  <ddkilzer@kilzer.net>
20039
20040         Reviewed by John Sullivan.
20041
20042         * Plugins/WebPluginController.m:
20043         (-[WebPluginController _cancelOutstandingChecks]):
20044         add nil check before calling CFSetApplyFunction
20045
20046 2006-06-14  Levi Weintraub  <lweintraub@apple.com>
20047
20048         Reviewed by justin
20049         
20050         <http://bugs.webkit.org/show_bug.cgi?id=7580>
20051         TinyMCE: Implement execCommand(formatBlock, ...)
20052         
20053         * English.lproj/Localizable.strings:
20054         * WebCoreSupport/WebFrameBridge.m:
20055         (-[WebFrameBridge nameForUndoAction:]):
20056
20057 2006-06-14  Tim Omernick  <timo@apple.com>
20058
20059         Reviewed by John Sullivan.
20060
20061         <rdar://problem/4577988> GC: WebPluginController uses inefficient resurrecting enumeration
20062
20063         * Plugins/WebPluginController.m:
20064         (cancelOutstandingCheck):
20065         (-[WebPluginController _cancelOutstandingChecks]):
20066         Use CFSetApplyFunction() instead of an enumerator to guard against modifications to the set while enumerating.
20067
20068 2006-06-13  John Sullivan  <sullivan@apple.com>
20069
20070         Reviewed by Tim O.
20071         
20072         - fixed <rdar://problem/4498606> REGRESSION (417.8-420+): 3 missing items (but extra separators) in context 
20073         menu in Mail message body
20074
20075         * WebView/WebView.m:
20076         (-[WebView _menuForElement:defaultItems:]):
20077         Add special-case hackery to recover from this SPI -> API mismatch.
20078
20079 2006-06-13  Tim Omernick  <timo@apple.com>
20080
20081         Reviewed by Anders.
20082
20083         Fixed a recently-introduced assertion failure when handling 404 errors.
20084
20085         * WebView/WebDataSource.m:
20086         (-[WebDataSource _handleFallbackContent]):
20087         Use the -[WebFrame _bridge] instead of -[WebDataSource _bridge].  The former is not valid until the data
20088         source has been committed, which is not the case when the resource fails to load.  The latter is safe to call
20089         at any time.  This broke last night with Maciej's change to WebFrameResourceLoader.  The old code used to
20090         call -[WebFrame _bridge].
20091
20092 2006-06-13  Anders Carlsson  <acarlsson@apple.com>
20093
20094         Reviewed by Geoff.
20095
20096         http://bugs.webkit.org/show_bug.cgi?id=9406
20097         REGRESSION: fix for bug 9390 broke two layout tests
20098
20099         * Plugins/WebPluginDatabase.h:
20100         (-[WebPluginDatabase isMIMETypeRegistered:]):
20101         Add new function isMIMETypeRegistered which returns whether a given MIME type has a 
20102         plugin registered. 
20103
20104         * Plugins/WebPluginDatabase.m:
20105         (-[WebPluginDatabase init]):        
20106         Init set of registered MIME types.
20107         
20108         (-[WebPluginDatabase refresh]):
20109         Add and remove MIME types from the set of registered MIME types when registering and unregistering
20110         plugin MIME types.
20111         
20112         (-[WebPluginDatabase dealloc]):
20113         Release set of registered MIME types.
20114         
20115         * WebCoreSupport/WebFrameBridge.m:
20116         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
20117         Use isMIMETypeRegistered here.
20118
20119 2006-06-12  Maciej Stachowiak  <mjs@apple.com>
20120
20121         - fix for cocoa exception (whoops)
20122
20123         * WebView/WebView.m:
20124         (+[WebView _generatedMIMETypeForURLScheme:]): put this back
20125         * WebView/WebDataSource.m:
20126         (+[WebDataSource _generatedMIMETypeForURLScheme:]): call WebView
20127
20128 2006-06-12  Maciej Stachowiak  <mjs@apple.com>
20129
20130         Reviewed by Darin.
20131         
20132         - remove use of WebView and related from WebMainResourceLoader
20133
20134         * WebKit.xcodeproj/project.pbxproj:
20135         * WebView/WebDataSource.m:
20136         (+[WebDataSource _generatedMIMETypeForURLScheme:]):
20137         (+[WebDataSource _representationExistsForURLScheme:]):
20138         (+[WebDataSource _canShowMIMEType:]):
20139         (-[WebDataSource _handleFallbackContent]):
20140         (-[WebDataSource _decidePolicyForMIMEType:decisionListener:]):
20141         * WebView/WebDataSourceInternal.h:
20142         * WebView/WebFrame.m:
20143         (-[WebFrame _isMainFrame]):
20144         * WebView/WebFrameInternal.h:
20145         * WebView/WebMainResourceLoader.m:
20146         (-[WebMainResourceLoader willSendRequest:redirectResponse:]):
20147         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
20148         (-[WebMainResourceLoader checkContentPolicyForResponse:]):
20149         (-[WebMainResourceLoader loadWithRequestNow:]):
20150         * WebView/WebView.m:
20151
20152 2006-06-12  Tim Omernick  <timo@apple.com>
20153
20154         Reviewed by Maciej.
20155
20156         <rdar://problem/4526052> intermittent assertion failure in -[WebBasePluginPackage dealloc] running layout tests
20157
20158         * Plugins/WebNetscapePluginPackage.m:
20159         (-[WebNetscapePluginPackage _initWithPath:]):
20160         Renamed from -initWithPath:.  Instead of releasing/deallocating self on error, return NO.
20161         (-[WebNetscapePluginPackage initWithPath:]):
20162         Call the new -_initWithPath:.  If it returns NO, unload the plugin package before deallocating it.
20163
20164 2006-06-11  Darin Adler  <darin@apple.com>
20165
20166         - try to fix Windows build
20167
20168         * COM/WebKitDLL.cpp: (loadResourceIntoArray): Use Vector<char> instead of
20169         DeprecatedByteArray.
20170
20171 2006-06-11  Mitz Pettel  <opendarwin.org@mitzpettel.com>
20172
20173         Reviewed by Tim H.
20174
20175         - fix http://bugs.webkit.org/show_bug.cgi?id=8672
20176           Red outline from web inspector reappears after inspector is closed
20177
20178         * WebInspector/WebInspector.m:
20179         (-[NSWindow windowWillClose:]): Added a call to setWebFrame to avoid further
20180         load progress notifications.
20181         (-[NSWindow setWebFrame:]): Changed to resign the WebView's hostWindow rather
20182         than its window for close notifications, to avoid resigning from all windows' close
20183         notifications (including the inspector window's) when the WebView is in a hidden tab.
20184         Also changed to prevent highlighting the initial focused node.
20185
20186 2006-06-11  Anders Carlsson  <acarlsson@apple.com>
20187
20188         Reviewed by Tim.
20189
20190         http://bugs.webkit.org/show_bug.cgi?id=9390
20191         Move full-frame plugins to WebCore
20192
20193         * Plugins/WebBaseNetscapePluginStream.h:
20194         * Plugins/WebBaseNetscapePluginStream.m:
20195         (-[WebBaseNetscapePluginStream instance]):
20196         Add instance method which returns the plugin instance.
20197         
20198         * Plugins/WebBasePluginPackage.h:
20199         Add WebPluginManualLoader protocol
20200         
20201         * Plugins/WebNetscapePluginDocumentView.h: Removed.
20202         * Plugins/WebNetscapePluginDocumentView.m: Removed.
20203
20204         * Plugins/WebNetscapePluginEmbeddedView.h:
20205         * Plugins/WebNetscapePluginEmbeddedView.m:
20206         (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:]):
20207         (-[WebNetscapePluginEmbeddedView dealloc]):
20208         (-[WebNetscapePluginEmbeddedView didStart]):
20209         (-[WebNetscapePluginEmbeddedView pluginView:receivedResponse:]):
20210         (-[WebNetscapePluginEmbeddedView pluginView:receivedData:]):
20211         (-[WebNetscapePluginEmbeddedView pluginView:receivedError:]):
20212         (-[WebNetscapePluginEmbeddedView pluginViewFinishedLoading:]):
20213         (-[WebNetscapePluginEmbeddedView redeliverStream]):
20214         Make WebNetscapePluginEmbeddedView support the WebPluginManualLoader protocol. It creates a plugin stream and feeds the
20215         data manually. Much of this code has been copied from WebNetscapePluginRepresentation.
20216
20217         * Plugins/WebNetscapePluginRepresentation.h: Removed.
20218         * Plugins/WebNetscapePluginRepresentation.m: Removed.
20219
20220         * Plugins/WebPluginController.h:
20221         * Plugins/WebPluginController.m:
20222         (-[WebPluginController pluginView:receivedResponse:]):
20223         (-[WebPluginController pluginView:receivedData:]):
20224         (-[WebPluginController pluginView:receivedError:]):
20225         (-[WebPluginController pluginViewFinishedLoading:]):
20226         Make WebPluginController support the WebPluginManualLoader protocol so it can feed data manually to WebKit plugins.
20227
20228         * Plugins/WebPluginDatabase.m:        
20229         (-[WebPluginDatabase refresh]):
20230         Use WebHTMLView and WebHTMLRepresentation when registering/unregistering plug-in MIME types.
20231         
20232         * Plugins/WebPluginDocumentView.h: Removed.
20233         * Plugins/WebPluginDocumentView.m: Removed.
20234
20235         * WebCoreSupport/WebFrameBridge.m:
20236         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
20237         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
20238         Add loadManually argument.
20239         
20240         (-[WebFrameBridge redirectDataToPlugin:]):
20241         Call down to the HTML representation.
20242         
20243         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
20244         Pass NO to loadManually.
20245         
20246         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
20247         Explicitly check if the MIME type is supported by a plug-in instead of checking the view class.
20248         
20249         * WebCoreSupport/WebViewFactory.m:
20250         (-[WebViewFactory pluginSupportsMIMEType:]):
20251         New function which returns whether any plugins support a given MIME type.
20252         
20253         * WebKit.xcodeproj/project.pbxproj:
20254         Update for removed files.
20255         
20256         * WebView/WebFrame.m:
20257         (-[WebFrame _reloadForPluginChanges]):
20258         Remove view type checks.
20259         
20260         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
20261         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
20262         Remove FIXME comments.
20263         
20264         * WebView/WebHTMLRepresentation.m:
20265         (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):        
20266         New function which redirects incoming data to a manual loader.
20267         
20268         (-[WebHTMLRepresentation receivedData:withDataSource:]):
20269         (-[WebHTMLRepresentation receivedError:withDataSource:]):
20270         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
20271         Optionally redirect incoming data.
20272         
20273         * WebView/WebHTMLRepresentationPrivate.h:
20274
20275 2006-06-09  John Sullivan  <sullivan@apple.com>
20276
20277         Reviewed by Tim Omernick and Dave Hyatt.
20278
20279         WebKit support for computing but not highlighting rects for text matches.
20280
20281         * WebView/WebHTMLViewPrivate.h:
20282         added markedTextMatchesAreHighlighted/setMarkedTextMatchesAreHighlighted and
20283         rectsForTextMatches, and renamed related methods for clarity/consistency
20284         * WebView/WebHTMLView.m:
20285         (-[WebHTMLView markAllMatchesForText:caseSensitive:]):
20286         renamed, calls similarly-renamed method
20287         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
20288         new method, calls through to bridge
20289         (-[WebHTMLView markedTextMatchesAreHighlighted]):
20290         ditto
20291         (-[WebHTMLView unmarkAllTextMatches]):
20292         renamed
20293         (-[WebHTMLView rectsForTextMatches]):
20294         new method, calls through to bridge
20295
20296         * WebView/WebViewPrivate.h:
20297         added rectsForTextMatches, renamed other methods (and added highlight: parameter)
20298         * WebView/WebView.m:
20299         (-[WebView markAllMatchesForText:caseSensitive:highlight:]):
20300         renamed for clarity/consistency, and now has highlight: parameter, which is passed down
20301         (-[WebView unmarkAllTextMatches]):
20302         renamed for clarity/consistency, and calls similarly-renamed method lower down. diff got
20303         confused with the end of this and the end of the next method.
20304         (-[WebView rectsForTextMatches]):
20305         new method, calls through to WebHTMLView as related methods currently do
20306
20307 2006-06-10  Graham Dennis  <Graham.Dennis@gmail.com>
20308
20309         <http://bugs.webkit.org/show_bug.cgi?id=9384>
20310         WebView's initWithCoder: method does not set useBackForwardList
20311         correctly
20312         
20313         Reviewed by John Sullivan.
20314
20315         * WebView/WebView.m:
20316         (-[WebView initWithCoder:]):
20317         Make sure that the function variable useBackForwardList is correctly
20318         set, so that the copy in the _private ivar is set.
20319
20320 2006-06-09  David Hyatt  <hyatt@apple.com>
20321
20322         Rename updateFocusState to updateActiveState.
20323
20324         * WebView/WebHTMLView.m:
20325         (-[WebHTMLView _updateActiveState]):
20326         (-[WebHTMLView viewDidMoveToWindow]):
20327         (-[WebHTMLView windowDidBecomeKey:]):
20328         (-[WebHTMLView windowDidResignKey:]):
20329         (-[WebHTMLView becomeFirstResponder]):
20330         (-[WebHTMLView resignFirstResponder]):
20331         (-[WebHTMLView _formControlIsBecomingFirstResponder:]):
20332         (-[WebHTMLView _formControlIsResigningFirstResponder:]):
20333         * WebView/WebHTMLViewPrivate.h:
20334
20335 2006-06-09  David Hyatt  <hyatt@apple.com>
20336
20337         Rename displaysWithFocusAttributes to isActive.
20338
20339         Reviewed by sfalken
20340
20341         * WebKit.xcodeproj/project.pbxproj:
20342         * WebView/WebHTMLView.m:
20343         (-[WebHTMLView _updateFocusState]):
20344
20345 2006-06-08  Justin Garcia  <justin.garcia@apple.com>
20346
20347         Reviewed by levi
20348         
20349         <http://bugs.webkit.org/show_bug.cgi?id=4468>
20350         Implement execCommand(Insert{Un}OrderedList)
20351
20352         * WebView/WebFrame.m:
20353         (-[WebFrame _findFrameWithSelection]): Removed an assertion
20354         that we only have one frame with a selection.  
20355         * WebView/WebView.m:
20356         (-[WebView selectedFrame]): Ditto.
20357
20358 2006-06-08  Timothy Hatcher  <timothy@apple.com>
20359
20360         Reviewed by Darin and John.
20361
20362         <rdar://problem/3600734> API: please add a way to turn vertical scrollbar
20363         always on (for Mail, to avoid reflow when typing)
20364
20365         Adds new methods to lock the scrolling mode on WebDynamicScrollBarsView.
20366         Locking the scroll mode prevents WebCore from changing it as needed.
20367         Also adds an SPI on WebView that will lock the "always on" mode
20368         for each scroller.
20369
20370         * WebKit.xcodeproj/project.pbxproj:
20371         * WebView/WebDynamicScrollBarsView.h:
20372         * WebView/WebDynamicScrollBarsView.m:
20373         (-[WebDynamicScrollBarsView setAllowsScrolling:]):
20374         (-[WebDynamicScrollBarsView allowsScrolling]):
20375         (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]):
20376         (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]):
20377         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
20378         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
20379         (-[WebDynamicScrollBarsView setScrollingMode:]):
20380         (-[WebDynamicScrollBarsView setHorizontalScrollingModeLocked:]):
20381         (-[WebDynamicScrollBarsView setVerticalScrollingModeLocked:]):
20382         (-[WebDynamicScrollBarsView setScrollingModesLocked:]):
20383         (-[WebDynamicScrollBarsView horizontalScrollingModeLocked]):
20384         (-[WebDynamicScrollBarsView verticalScrollingModeLocked]):
20385         * WebView/WebView.m:
20386         (-[WebView setAlwaysShowVerticalScroller:]):
20387         (-[WebView alwaysShowVerticalScroller]):
20388         (-[WebView setAlwaysShowHorizontalScroller:]):
20389         (-[WebView alwaysShowHorizontalScroller]):
20390         * WebView/WebViewPrivate.h:
20391
20392 2006-06-08  Darin Adler  <darin@apple.com>
20393
20394         Reviewed by Justin.
20395
20396         - fix http://bugs.webkit.org/show_bug.cgi?id=8616
20397           REGRESSION: TinyMCE: Crash on Undo
20398
20399         * WebView/WebHTMLView.m:
20400         (-[WebHTMLView _topHTMLView]): Added.
20401         (-[WebHTMLView _isTopHTMLView]): Added.
20402         (-[WebHTMLView _insideAnotherHTMLView]): Changed to use _topHTMLView.
20403         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
20404         Forward to the top HTML view, so that only the top view ever starts a dragging operation.
20405         Change dragging code to not assume that the dragged node is in the current view's document.
20406         Added checks that the node is an element in a couple places and coordinate conversions.
20407         (-[WebHTMLView _mayStartDragAtEventLocation:]): Forward to the top HTML view.
20408         (-[WebHTMLView addMouseMovedObserver]): Change to do nothing when the dataSource field is 0,
20409         since we now use the dataSource field to get to the WebView.
20410         (-[WebHTMLView removeMouseMovedObserver]): Added a comment.
20411         (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
20412         Forward to the top HTML view.
20413         (-[WebHTMLView draggingSourceOperationMaskForLocal:]): Assert that it's the top HTML view.
20414         (-[WebHTMLView draggedImage:movedTo:]): Ditto.
20415         (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
20416         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
20417         (-[WebHTMLView _canProcessDragWithDraggingInfo:]): Ditto.
20418         (-[WebHTMLView _isMoveDrag]): Ditto.
20419         (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Ditto.
20420         (-[WebHTMLView draggingCancelledWithDraggingInfo:]): Ditto.
20421         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Ditto. Also added code to work
20422         with the appropriate bridge when receiving a drag. This fixes the problem where the
20423         top level frame got a selection intended for the inner frame; the source of the bug.
20424         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Added code to convert the coordinates
20425         so this works properly when returning an element from an inner frame.
20426         (-[WebHTMLView setDataSource:]): Added a call to addMouseMovedObserver, needed now that
20427         addMouseMovedObserver won't do anything if called when dataSource is nil.
20428         (-[WebHTMLView _delegateDragSourceActionMask]): Forward to the top HTML view.
20429
20430         * WebView/WebView.m:
20431         (-[WebViewPrivate dealloc]): Removed code to release dragCaretBridge since that field
20432         is now gone.
20433         (-[WebView moveDragCaretToPoint:]): Always call the main frame's bridge, since the
20434         drag caret is now a page-level item. Later we'll move it to the page bridge.
20435         (-[WebView removeDragCaret]): Ditto.
20436
20437 2006-06-07  David Hyatt  <hyatt@apple.com>
20438
20439         Add support for custom highlighting to WebKit.
20440
20441         Reviewed by justin
20442
20443         * WebCoreSupport/WebFrameBridge.m:
20444         (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:]):
20445         * WebView/WebHTMLView.m:
20446         (-[WebHTMLView _highlighterForType:]):
20447         * WebView/WebHTMLViewInternal.h:
20448         * WebView/WebHTMLViewPrivate.h:
20449
20450 2006-06-07  Adele Peterson  <adele@apple.com>
20451
20452         Reviewed by Hyatt. 
20453
20454         Added resources for missingImage and textAreaResizeCorner.
20455
20456         * COM/WebKitDLL.cpp:
20457         (loadResourceIntoArray): Added. Returns a DeprecatedByteArray with the resource's data.
20458         * WebKit.vcproj/WebKit.rc: Added missing image and resize pngs as resources. 
20459         * WebKit.vcproj/WebKit.vcproj: Added pngs.
20460         * WebKit.vcproj/missingImage.png: Added.
20461         * WebKit.vcproj/resource.h: Added entries for pngs.
20462         * WebKit.vcproj/textAreaResizeCorner.png: Added.
20463
20464 2006-06-07  David Hyatt  <hyatt@apple.com>
20465
20466         Add SPI for setting and removing custom highlighters.
20467
20468         Reviewed by Tim H
20469
20470         * WebView/WebHTMLView.m:
20471         (-[WebTextCompleteController dealloc]):
20472         (-[WebHTMLView _setHighlighter:ofType:]):
20473         (-[WebHTMLView _removeHighlighterOfType:]):
20474         * WebView/WebHTMLViewInternal.h:
20475         * WebView/WebHTMLViewPrivate.h:
20476
20477 2006-06-06  Adele Peterson  <adele@apple.com>
20478
20479         Reviewed by Justin. 
20480
20481         * COM/WebView.cpp:
20482         (WebView::keyPress): Added case for VK_RETURN. 
20483
20484 2006-06-06  Anders Carlsson  <acarlsson@apple.com>
20485
20486         Reviewed by John.
20487
20488         * WebView/WebFrame.m:
20489         (-[WebFrame _reloadForPluginChanges]):
20490         Don't traverse the view hierarchy looking for plugin views. Instead, just
20491         ask the frame whether it contains any plugins.
20492
20493 2006-06-03  Steve Falkenburg  <sfalken@apple.com>
20494
20495         Reviewed by hyatt.
20496         
20497         Add implementation of loadHTMLString for Spinneret
20498
20499         * COM/WebFrame.cpp:
20500         (WebFrame::loadHTMLString):
20501
20502 2006-06-02  Steve Falkenburg  <sfalken@apple.com>
20503
20504         Reviewed by darin.
20505
20506         New hosting for Spinneret to avoid static linking
20507
20508         * COM: Added.
20509         * COM/Interfaces: Added.
20510         * COM/Interfaces/DOMCSS.idl: Added.
20511         * COM/Interfaces/DOMCore.idl: Added.
20512         * COM/Interfaces/DOMHTML.idl: Added.
20513         * COM/Interfaces/DOMRange.idl: Added.
20514         * COM/Interfaces/IWebArchive.idl: Added.
20515         * COM/Interfaces/IWebAttributedString.idl: Added.
20516         * COM/Interfaces/IWebBackForwardList.idl: Added.
20517         * COM/Interfaces/IWebDataSource.idl: Added.
20518         * COM/Interfaces/IWebDocument.idl: Added.
20519         * COM/Interfaces/IWebDownload.idl: Added.
20520         * COM/Interfaces/IWebEditingDelegate.idl: Added.
20521         * COM/Interfaces/IWebError.idl: Added.
20522         * COM/Interfaces/IWebFrame.idl: Added.
20523         * COM/Interfaces/IWebFrameLoadDelegate.idl: Added.
20524         * COM/Interfaces/IWebFrameView.idl: Added.
20525         * COM/Interfaces/IWebHistoryItem.idl: Added.
20526         * COM/Interfaces/IWebIconDatabase.idl: Added.
20527         * COM/Interfaces/IWebImage.idl: Added.
20528         * COM/Interfaces/IWebMutableURLRequest.idl: Added.
20529         * COM/Interfaces/IWebNotification.idl: Added.
20530         * COM/Interfaces/IWebPolicyDelegate.idl: Added.
20531         * COM/Interfaces/IWebPreferences.idl: Added.
20532         * COM/Interfaces/IWebResource.idl: Added.
20533         * COM/Interfaces/IWebResourceLoadDelegate.idl: Added.
20534         * COM/Interfaces/IWebScriptObject.idl: Added.
20535         * COM/Interfaces/IWebUIDelegate.idl: Added.
20536         * COM/Interfaces/IWebURLAuthenticationChallenge.idl: Added.
20537         * COM/Interfaces/IWebURLRequest.idl: Added.
20538         * COM/Interfaces/IWebURLResponse.idl: Added.
20539         * COM/Interfaces/IWebUndoManager.idl: Added.
20540         * COM/Interfaces/IWebView.idl: Added.
20541         * COM/Interfaces/WebKit.idl: Added.
20542         * COM/WebBackForwardList.cpp: Added.
20543         (WebBackForwardList::WebBackForwardList):
20544         (WebBackForwardList::~WebBackForwardList):
20545         (WebBackForwardList::createInstance):
20546         (WebBackForwardList::QueryInterface):
20547         (WebBackForwardList::AddRef):
20548         (WebBackForwardList::Release):
20549         (WebBackForwardList::addItem):
20550         (WebBackForwardList::goBack):
20551         (WebBackForwardList::goForward):
20552         (WebBackForwardList::goToItem):
20553         (WebBackForwardList::backItem):
20554         (WebBackForwardList::currentItem):
20555         (WebBackForwardList::forwardItem):
20556         (WebBackForwardList::backListWithLimit):
20557         (WebBackForwardList::forwardListWithLimit):
20558         (WebBackForwardList::capacity):
20559         (WebBackForwardList::setCapacity):
20560         (WebBackForwardList::backListCount):
20561         (WebBackForwardList::forwardListCount):
20562         (WebBackForwardList::containsItem):
20563         (WebBackForwardList::itemAtIndex):
20564         (WebBackForwardList::setPageCacheSize):
20565         (WebBackForwardList::pageCacheSize):
20566         * COM/WebBackForwardList.h: Added.
20567         * COM/WebDataSource.cpp: Added.
20568         (WebDataSource::WebDataSource):
20569         (WebDataSource::~WebDataSource):
20570         (WebDataSource::createInstance):
20571         (WebDataSource::QueryInterface):
20572         (WebDataSource::AddRef):
20573         (WebDataSource::Release):
20574         (WebDataSource::initWithRequest):
20575         (WebDataSource::data):
20576         (WebDataSource::representation):
20577         (WebDataSource::webFrame):
20578         (WebDataSource::initialRequest):
20579         (WebDataSource::request):
20580         (WebDataSource::response):
20581         (WebDataSource::textEncodingName):
20582         (WebDataSource::isLoading):
20583         (WebDataSource::pageTitle):
20584         (WebDataSource::unreachableURL):
20585         (WebDataSource::webArchive):
20586         (WebDataSource::mainResource):
20587         (WebDataSource::subresources):
20588         (WebDataSource::subresourceForURL):
20589         (WebDataSource::addSubresource):
20590         * COM/WebDataSource.h: Added.
20591         * COM/WebFrame.cpp: Added.
20592         (WebFrame::WebFramePrivate::WebFramePrivate):
20593         (WebFrame::WebFramePrivate::~WebFramePrivate):
20594         (WebFrame::WebFrame):
20595         (WebFrame::~WebFrame):
20596         (WebFrame::createInstance):
20597         (WebFrame::QueryInterface):
20598         (WebFrame::AddRef):
20599         (WebFrame::Release):
20600         (WebFrame::initWithName):
20601         (WebFrame::name):
20602         (WebFrame::webView):
20603         (WebFrame::frameView):
20604         (WebFrame::DOMDocument):
20605         (WebFrame::frameElement):
20606         (WebFrame::loadRequest):
20607         (WebFrame::loadData):
20608         (WebFrame::loadHTMLString):
20609         (WebFrame::loadAlternateHTMLString):
20610         (WebFrame::loadArchive):
20611         (WebFrame::dataSource):
20612         (WebFrame::provisionalDataSource):
20613         (WebFrame::stopLoading):
20614         (WebFrame::reload):
20615         (WebFrame::findFrameNamed):
20616         (WebFrame::parentFrame):
20617         (WebFrame::childFrames):
20618         (WebFrame::paint):
20619         (WebFrame::impl):
20620         (WebFrame::loadDataSource):
20621         (WebFrame::loading):
20622         (WebFrame::goToItem):
20623         (WebFrame::loadItem):
20624         (WebSystemMainMemory):
20625         (WebFrame::getObjectCacheSize):
20626         (WebFrame::receivedRedirect):
20627         (WebFrame::receivedResponse):
20628         (WebFrame::receivedData):
20629         (WebFrame::receivedAllData):
20630         (WebFrame::openURL):
20631         (WebFrame::submitForm):
20632         (WebFrame::setTitle):
20633         (WebFrame::setStatusText):
20634         * COM/WebFrame.h: Added.
20635         * COM/WebHistoryItem.cpp: Added.
20636         (WebHistoryItem::WebHistoryItem):
20637         (WebHistoryItem::~WebHistoryItem):
20638         (WebHistoryItem::createInstance):
20639         (WebHistoryItem::QueryInterface):
20640         (WebHistoryItem::AddRef):
20641         (WebHistoryItem::Release):
20642         (WebHistoryItem::initWithURLString):
20643         (WebHistoryItem::originalURLString):
20644         (WebHistoryItem::URLString):
20645         (WebHistoryItem::title):
20646         (WebHistoryItem::lastVisitedTimeInterval):
20647         (WebHistoryItem::setAlternateTitle):
20648         (WebHistoryItem::alternateTitle):
20649         (WebHistoryItem::icon):
20650         * COM/WebHistoryItem.h: Added.
20651         * COM/WebIconDatabase.cpp: Added.
20652         (WebIconDatabase::WebIconDatabase):
20653         (WebIconDatabase::~WebIconDatabase):
20654         (WebIconDatabase::createInstance):
20655         (WebIconDatabase::QueryInterface):
20656         (WebIconDatabase::AddRef):
20657         (WebIconDatabase::Release):
20658         (WebIconDatabase::sharedIconDatabase):
20659         (WebIconDatabase::iconForURL):
20660         (WebIconDatabase::defaultIconWithSize):
20661         (WebIconDatabase::retainIconForURL):
20662         (WebIconDatabase::releaseIconForURL):
20663         (WebIconDatabase::delayDatabaseCleanup):
20664         (WebIconDatabase::allowDatabaseCleanup):
20665         * COM/WebIconDatabase.h: Added.
20666         * COM/WebKitClassFactory.cpp: Added.
20667         (WebKitClassFactory::WebKitClassFactory):
20668         (WebKitClassFactory::~WebKitClassFactory):
20669         (WebKitClassFactory::QueryInterface):
20670         (WebKitClassFactory::AddRef):
20671         (WebKitClassFactory::Release):
20672         (WebKitClassFactory::CreateInstance):
20673         (WebKitClassFactory::LockServer):
20674         * COM/WebKitClassFactory.h: Added.
20675         * COM/WebKitDLL.cpp: Added.
20676         (DllMain):
20677         (DllGetClassObject):
20678         (DllCanUnloadNow):
20679         (DllUnregisterServer):
20680         (DllRegisterServer):
20681         * COM/WebKitDLL.h: Added.
20682         * COM/WebMutableURLRequest.cpp: Added.
20683         (WebMutableURLRequest::WebMutableURLRequest):
20684         (WebMutableURLRequest::~WebMutableURLRequest):
20685         (WebMutableURLRequest::createInstance):
20686         (WebMutableURLRequest::QueryInterface):
20687         (WebMutableURLRequest::AddRef):
20688         (WebMutableURLRequest::Release):
20689         (WebMutableURLRequest::requestWithURL):
20690         (WebMutableURLRequest::allHTTPHeaderFields):
20691         (WebMutableURLRequest::cachePolicy):
20692         (WebMutableURLRequest::HTTPBody):
20693         (WebMutableURLRequest::HTTPBodyStream):
20694         (WebMutableURLRequest::HTTPMethod):
20695         (WebMutableURLRequest::HTTPShouldHandleCookies):
20696         (WebMutableURLRequest::initWithURL):
20697         (WebMutableURLRequest::mainDocumentURL):
20698         (WebMutableURLRequest::timeoutInterval):
20699         (WebMutableURLRequest::URL):
20700         (WebMutableURLRequest::valueForHTTPHeaderField):
20701         (WebMutableURLRequest::addValue):
20702         (WebMutableURLRequest::setAllHTTPHeaderFields):
20703         (WebMutableURLRequest::setCachePolicy):
20704         (WebMutableURLRequest::setHTTPBody):
20705         (WebMutableURLRequest::setHTTPBodyStream):
20706         (WebMutableURLRequest::setHTTPMethod):
20707         (WebMutableURLRequest::setHTTPShouldHandleCookies):
20708         (WebMutableURLRequest::setMainDocumentURL):
20709         (WebMutableURLRequest::setTimeoutInterval):
20710         (WebMutableURLRequest::setURL):
20711         (WebMutableURLRequest::setValue):
20712         (WebMutableURLRequest::setFormData):
20713         (WebMutableURLRequest::formData):
20714         * COM/WebMutableURLRequest.h: Added.
20715         * COM/WebView.cpp: Added.
20716         (WebView::WebView):
20717         (WebView::~WebView):
20718         (WebView::createInstance):
20719         (WebView::mouseMoved):
20720         (WebView::mouseDown):
20721         (WebView::mouseUp):
20722         (WebView::mouseDoubleClick):
20723         (WebView::keyPress):
20724         (registerWebView):
20725         (WebViewWndProc):
20726         (calculateScrollDelta):
20727         (scrollMessageForKey):
20728         (WebView::goToItem):
20729         (WebView::QueryInterface):
20730         (WebView::AddRef):
20731         (WebView::Release):
20732         (WebView::canShowMIMEType):
20733         (WebView::canShowMIMETypeAsHTML):
20734         (WebView::MIMETypesShownAsHTML):
20735         (WebView::setMIMETypesShownAsHTML):
20736         (WebView::URLFromPasteboard):
20737         (WebView::URLTitleFromPasteboard):
20738         (WebView::initWithFrame):
20739         (WebView::setUIDelegate):
20740         (WebView::uiDelegate):
20741         (WebView::setResourceLoadDelegate):
20742         (WebView::resourceLoadDelegate):
20743         (WebView::setDownloadDelegate):
20744         (WebView::downloadDelegate):
20745         (WebView::setFrameLoadDelegate):
20746         (WebView::frameLoadDelegate):
20747         (WebView::setPolicyDelegate):
20748         (WebView::policyDelegate):
20749         (WebView::mainFrame):
20750         (WebView::backForwardList):
20751         (WebView::setMaintainsBackForwardList):
20752         (WebView::goBack):
20753         (WebView::goForward):
20754         (WebView::goToBackForwardItem):
20755         (WebView::setTextSizeMultiplier):
20756         (WebView::textSizeMultiplier):
20757         (WebView::setApplicationNameForUserAgent):
20758         (WebView::applicationNameForUserAgent):
20759         (WebView::setCustomUserAgent):
20760         (WebView::customUserAgent):
20761         (WebView::userAgentForURL):
20762         (WebView::supportsTextEncoding):
20763         (WebView::setCustomTextEncodingName):
20764         (WebView::customTextEncodingName):
20765         (WebView::setMediaStyle):
20766         (WebView::mediaStyle):
20767         (WebView::stringByEvaluatingJavaScriptFromString):
20768         (WebView::windowScriptObject):
20769         (WebView::setPreferences):
20770         (WebView::preferences):
20771         (WebView::setPreferencesIdentifier):
20772         (WebView::preferencesIdentifier):
20773         (WebView::setHostWindow):
20774         (WebView::hostWindow):
20775         (WebView::searchFor):
20776         (WebView::registerViewClass):
20777         (WebView::takeStringURLFrom):
20778         (WebView::stopLoading):
20779         (WebView::reload):
20780         (WebView::canGoBack):
20781         (WebView::canGoForward):
20782         (WebView::canMakeTextLarger):
20783         (WebView::makeTextLarger):
20784         (WebView::canMakeTextSmaller):
20785         (WebView::makeTextSmaller):
20786         (WebView::computedStyleForElement):
20787         (WebView::editableDOMRangeForPoint):
20788         (WebView::setSelectedDOMRange):
20789         (WebView::selectedDOMRange):
20790         (WebView::selectionAffinity):
20791         (WebView::setEditable):
20792         (WebView::isEditable):
20793         (WebView::setTypingStyle):
20794         (WebView::typingStyle):
20795         (WebView::setSmartInsertDeleteEnabled):
20796         (WebView::smartInsertDeleteEnabled):
20797         (WebView::setContinuousSpellCheckingEnabled):
20798         (WebView::isContinuousSpellCheckingEnabled):
20799         (WebView::spellCheckerDocumentTag):
20800         (WebView::undoManager):
20801         (WebView::setEditingDelegate):
20802         (WebView::editingDelegate):
20803         (WebView::styleDeclarationWithText):
20804         (WebView::replaceSelectionWithNode):
20805         (WebView::replaceSelectionWithText):
20806         (WebView::replaceSelectionWithMarkupString):
20807         (WebView::replaceSelectionWithArchive):
20808         (WebView::deleteSelection):
20809         (WebView::applyStyle):
20810         (WebView::copy):
20811         (WebView::cut):
20812         (WebView::paste):
20813         (WebView::copyFont):
20814         (WebView::pasteFont):
20815         (WebView::delete_):
20816         (WebView::pasteAsPlainText):
20817         (WebView::pasteAsRichText):
20818         (WebView::changeFont):
20819         (WebView::changeAttributes):
20820         (WebView::changeDocumentBackgroundColor):
20821         (WebView::changeColor):
20822         (WebView::alignCenter):
20823         (WebView::alignJustified):
20824         (WebView::alignLeft):
20825         (WebView::alignRight):
20826         (WebView::checkSpelling):
20827         (WebView::showGuessPanel):
20828         (WebView::performFindPanelAction):
20829         (WebView::startSpeaking):
20830         (WebView::stopSpeaking):
20831         (WebView::viewWindow):
20832         * COM/WebView.h: Added.
20833         * WebKit.vcproj: Added.
20834         * WebKit.vcproj/Interfaces.vcproj: Added.
20835         * WebKit.vcproj/WebKit.def: Added.
20836         * WebKit.vcproj/WebKit.rc: Added.
20837         * WebKit.vcproj/WebKit.sln: Added.
20838         * WebKit.vcproj/WebKit.vcproj: Added.
20839         * WebKit.vcproj/WebKitGUID.vcproj: Added.
20840         * WebKit.vcproj/autoversion.h: Added.
20841         * WebKit.vcproj/resource.h: Added.
20842
20843 2006-06-02  Darin Adler  <darin@apple.com>
20844
20845         * WebCoreSupport/WebImageRendererFactory.m: Fix crash on Safari startup
20846         by include NSObject as a superclass (oops!).
20847
20848 2006-06-01  Darin Adler  <darin@apple.com>
20849
20850         Reviewed by Maciej.
20851
20852         - WebCore doesn't need to load WebKit images any more; removed code for that
20853
20854         * Resources/missing_image.tiff: Removed.
20855         * WebCoreSupport/WebImageRendererFactory.h: Removed.
20856
20857         * WebCoreSupport/WebImageRendererFactory.m: Moved @interface in here.
20858         Removed all but the "threaded decoding" calls that older Safari calls.
20859         This file can go altogether when compatibility with that older Safari
20860         is no longer needed.
20861
20862         * WebKit.xcodeproj/project.pbxproj: Removed WebImageRendererFactory.h
20863         and missing_image.tiff.
20864
20865         * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Removed call
20866         to [WebImageRendererFactory createSharedFactory].
20867
20868 2006-06-01  Brady Eidson  <beidson@apple.com>
20869
20870         Reviewed by Maciej.
20871
20872         Simple changes to hook up the new WebCore based Icon Database
20873         for testing.
20874
20875         * ChangeLog:
20876         * Misc/WebIconDatabase.m:
20877         (-[WebIconDatabase _applicationWillTerminate:]):
20878         * Misc/WebIconDatabasePrivate.h:
20879         * WebKit.xcodeproj/project.pbxproj:
20880
20881 2006-06-01  Anders Carlsson  <acarlsson@apple.com>
20882
20883         Reviewed by Darin.
20884
20885         http://bugs.webkit.org/show_bug.cgi?id=6309
20886         multiple problems prevent bookmarking/back button technique for AJAX/DHTML applications from working
20887
20888         * Misc/WebNSURLExtras.m:
20889         (-[NSString _webkit_URLFragment]):
20890         Don't include the "#" character in the fragment.
20891         
20892         * WebCoreSupport/WebFrameBridge.m:
20893         (-[WebFrameBridge historyURL:]):
20894         New function, returns the history URL for a given position in the back/forward list
20895         
20896         * WebView/WebFrame.m:
20897         (-[WebFrame _loadItem:withLoadType:]):
20898         Always call scrollToAnchorWithURL, even if there is no fragment. This way we keep the WebCore frame's
20899         URL up-to-date.
20900
20901 2006-06-01  Maciej Stachowiak  <mjs@apple.com>
20902
20903         Reviewed by Anders.
20904         
20905         - fixed "REGRESSION: Can't order from Pizza Hut (ToT, 05/24/06)"
20906         http://bugs.webkit.org/show_bug.cgi?id=9103
20907
20908         * WebView/WebDataSource.m:
20909         (-[WebDataSource _willSendRequest:forResource:redirectResponse:]): Set up the
20910         User-Agent header.
20911         * WebView/WebDataSourceInternal.h:
20912         * WebView/WebLoader.m:
20913         (-[NSURLProtocol willSendRequest:redirectResponse:]): Pass a mutable URL request
20914         so the above can work.
20915
20916 2006-06-01  Anders Carlsson  <acarlsson@apple.com>
20917
20918         Reviewed by Darin.
20919
20920         * WebView/WebFrameView.m:
20921         (+[WebFrameView _canShowMIMETypeAsHTML:]):
20922         Use _webkit_objectForMIMEType here so we'll get an object back for "text/".
20923
20924 2006-05-31  David Hyatt  <hyatt@apple.com>
20925
20926         Make programmatic focus/blur actually work on sub-frames.  Make the
20927         top-level UI delegate get called for deactivation of windows.
20928
20929         Reviewed by darin
20930
20931         * WebCoreSupport/WebFrameBridge.m:
20932         (-[WebFrameBridge activateWindow]):
20933         (-[WebFrameBridge deactivateWindow]):
20934         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
20935         (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
20936         * WebKit.xcodeproj/project.pbxproj:
20937
20938 === WebKit-521.12 ===
20939
20940 2006-05-26  David Harrison  <harrison@apple.com>
20941
20942         Reviewed by John Sullivan.
20943
20944         <rdar://problem/4514529> Add a list type parameter and a return value to _increaseSelectionListLevel
20945
20946         * WebView/WebHTMLView.m:
20947         (-[WebHTMLView _increaseSelectionListLevel]):
20948         - Now returns DOMNode*
20949
20950         (-[WebHTMLView _increaseSelectionListLevelOrdered]):
20951         (-[WebHTMLView _increaseSelectionListLevelUnordered]):
20952         - Added.  These also return DOMNode*
20953
20954         * WebView/WebHTMLViewPrivate.h:
20955         - Updated as above
20956
20957 2006-05-25  Tim Omernick  <timo@apple.com>
20958
20959         Reviewed by Anders.
20960
20961         <http://bugs.webkit.org/show_bug.cgi?id=8347>
20962         REGRESSION: Flash movie audible but not visible until window is resized
20963
20964         * Plugins/WebNetscapePluginDocumentView.m:
20965         (-[WebNetscapePluginDocumentView dataSourceUpdated:]):
20966         Layout if needed here.  Maciej recently removed the "LayoutAcceptable" frame state, which used to
20967         cause plugin document views to lay out immediately upon receiving data.  This call to -layout has
20968         the same effect.
20969
20970 === WebKit-521.11.1 ===
20971
20972 2006-05-25  Timothy Hatcher  <timothy@apple.com>
20973
20974         Reviewed by Tim O.
20975
20976         <rdar://problem/4559808> WebKit fails to compile for ppc64
20977         <rdar://problem/4522085> 64-bit: WebKit uses FSSpec which is not available in 64-bit
20978         Gets WebKit building under 64-bit. Rename WebNSInt and WebNSUInt to WebNSInteger and WebNSUInteger.
20979         Start using WebNSInteger where we need to match AppKit API usage of NSInteger.
20980
20981         HIWebView and a couple of helper functions are disabled until they can be moved off of QuickDraw.
20982         <rdar://problem/4561772> HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit
20983
20984         * Carbon/CarbonUtils.m: disabled this file in 64-bit <rdar://problem/4561772>
20985         * Carbon/CarbonWindowAdapter.m:
20986         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
20987         * Carbon/CarbonWindowFrame.m:
20988         (+[CarbonWindowFrame frameRectForContentRect:styleMask:]):
20989         (+[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
20990         (+[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
20991         (-[CarbonWindowFrame frameRectForContentRect:styleMask:]):
20992         (-[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
20993         (-[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
20994         * Carbon/HIViewAdapter.m: disabled this file in 64-bit <rdar://problem/4561772>
20995         * Carbon/HIWebView.m: disabled this file in 64-bit <rdar://problem/4561772>
20996         (HIWebViewEventHandler):
20997         * DefaultDelegates/WebDefaultResourceLoadDelegate.m:
20998         (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
20999         * History/WebBackForwardList.m:
21000         (-[WebBackForwardList removeItem:]):
21001         (-[WebBackForwardList goToItem:]):
21002         * Misc/WebDownload.m:
21003         (-[WebDownloadInternal download:didReceiveDataOfLength:]):
21004         * Misc/WebFileDatabase.m:
21005         (UniqueFilePathForKey):
21006         * Misc/WebIconDatabase.m:
21007         (-[NSMutableDictionary retainIconForURL:]):
21008         (-[NSMutableDictionary releaseIconForURL:]):
21009         (-[WebIconDatabase _totalRetainCountForIconURLString:]):
21010         (-[WebIconDatabase _retainIconForIconURLString:]):
21011         (-[WebIconDatabase _releaseIconForIconURLString:]):
21012         * Misc/WebSearchableTextView.m:
21013         (-[NSString selectionRect]):
21014         * Misc/WebTypesInternal.h: Added.
21015         * Plugins/WebBaseNetscapePluginStream.m:
21016         (-[WebBaseNetscapePluginStream _destroyStream]):
21017         (CarbonPathFromPOSIXPath):
21018         * Plugins/WebBaseNetscapePluginView.m:
21019         (-[WebBaseNetscapePluginView sendActivateEvent:]):
21020         (-[WebBaseNetscapePluginView sendUpdateEvent]):
21021         (TSMEventHandler):
21022         (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
21023         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
21024         (-[NSData _web_locationAfterFirstBlankLine]):
21025         * Plugins/WebBasePluginPackage.m:
21026         (-[WebBasePluginPackage hash]):
21027         * Plugins/WebNetscapePluginPackage.m:
21028         (-[WebNetscapePluginPackage load]):
21029         (functionPointerForTVector):
21030         * WebInspector/WebInspector.m:
21031         (-[WebInspector _updateSystemColors]):
21032         * WebKit.xcodeproj/project.pbxproj:
21033         * WebView/WebDataSource.m:
21034         (-[WebDataSource _didReceiveData:contentLength:forResource:]):
21035         * WebView/WebFrame.m:
21036         (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
21037         * WebView/WebHTMLView.m:
21038         (-[WebHTMLView drawRect:]):
21039         (-[WebHTMLView characterIndexForPoint:]):
21040         (-[WebHTMLView conversationIdentifier]):
21041         * WebView/WebResourceLoadDelegate.h:
21042         * WebView/WebUIDelegate.h:
21043         * WebView/WebView.h:
21044         * WebView/WebView.m:
21045         (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
21046         (-[WebView spellCheckerDocumentTag]):
21047         * WebView/WebViewInternal.h:
21048         * WebView/WebViewPrivate.h:
21049
21050 === WebKit-521.11 ===
21051
21052 2006-05-23  Maciej Stachowiak  <mjs@apple.com>
21053
21054         Reviewed by Tim.
21055         
21056         - more loader refactoring to simplify things and remove knowledge of WebView from WebSubresourceLoader
21057
21058         * WebCoreSupport/WebSubresourceLoader.m:
21059         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
21060         (-[WebSubresourceLoader didReceiveResponse:]):
21061         * WebView/WebDataSource.m:
21062         (-[WebDataSource _loadIcon]):
21063         (-[WebDataSource _startLoading]):
21064         * WebView/WebFrame.m:
21065         (-[WebFrame _loadRequest:archive:]):
21066         (-[WebFrame _loadItem:withLoadType:]):
21067         (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
21068         (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
21069         (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]):
21070         * WebView/WebFrameInternal.h:
21071         * WebView/WebFramePrivate.h:
21072         * WebView/WebLoader.h:
21073         * WebView/WebLoader.m:
21074         * WebView/WebMainResourceLoader.m:
21075         (-[WebMainResourceLoader initWithDataSource:]):
21076         (-[WebMainResourceLoader didReceiveResponse:]):
21077
21078 2006-05-23  Tim Omernick  <timo@apple.com>
21079
21080         Reviewed by John Sullivan.
21081
21082         <rdar://problem/4558301> REGRESSION (420+): After clearing history and closing bookmark view window,
21083         attempting to select Safari's menu bar results in a crash
21084
21085         * Misc/WebNSWindowExtras.m:
21086         (replacementPostWindowNeedsDisplay):
21087         My fix yesterday for 4557117 was not quite good enough.  Now that we cancel the display timer for a
21088         window *before* it deallocates, we need to make sure that while a window deallocates, no new display
21089         timers are scheduled for that window.  This is actually possible, as 4558301 demonstrates.
21090         Luckily, NSWindow sets a handy "windowDying" flag when it deallocates, so we can just check that flag
21091         and bail out of the throttle hack if it is set.  This should fix the last of the crashes involving
21092         display timers scheduled for deallocated or deallocating windows.
21093
21094 2006-05-23  Maciej Stachowiak  <mjs@apple.com>
21095
21096         Reviewed by Eric.
21097         
21098         - remove knowledge of WebView from WebLoader in preparation for moving the code down
21099
21100         * WebView/WebDataSource.m:
21101         (-[WebDataSource _defersCallbacks]):
21102         (-[WebDataSource _identifierForInitialRequest:]):
21103         (-[WebDataSource _willSendRequest:forResource:redirectResponse:]):
21104         (-[WebDataSource _didReceiveAuthenticationChallenge:forResource:]):
21105         (-[WebDataSource _didCancelAuthenticationChallenge:forResource:]):
21106         (-[WebDataSource _didReceiveResponse:forResource:]):
21107         (-[WebDataSource _didReceiveData:contentLength:forResource:]):
21108         (-[WebDataSource _didFinishLoadingForResource:]):
21109         (-[WebDataSource _didFailLoadingWithError:forResource:]):
21110         (-[WebDataSource _downloadWithLoadingConnection:request:response:proxy:]):
21111         (-[WebDataSource _privateBrowsingEnabled]):
21112         * WebView/WebDataSourceInternal.h:
21113         * WebView/WebLoader.h:
21114         * WebView/WebLoader.m:
21115         (-[WebLoader releaseResources]):
21116         (-[WebLoader setDataSource:]):
21117         (-[WebLoader willSendRequest:redirectResponse:]):
21118         (-[WebLoader didReceiveAuthenticationChallenge:]):
21119         (-[WebLoader didCancelAuthenticationChallenge:]):
21120         (-[WebLoader didReceiveResponse:]):
21121         (-[WebLoader didReceiveData:lengthReceived:]):
21122         (-[WebLoader signalFinish]):
21123         (-[WebLoader didFinishLoading]):
21124         (-[WebLoader didFailWithError:]):
21125         (-[WebLoader willCacheResponse:]):
21126         (-[WebLoader cancelWithError:]):
21127         * WebView/WebMainResourceLoader.m:
21128         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
21129         * WebView/WebView.m:
21130         (-[WebView _incrementProgressForIdentifier:response:]):
21131         (-[WebView _incrementProgressForIdentifier:data:]):
21132         (-[WebView _completeProgressForIdentifier:]):
21133         * WebView/WebViewInternal.h:
21134
21135 === WebKit-521.10 ===
21136
21137 2006-05-22  Tim Omernick  <timo@apple.com>
21138
21139         Reviewed by Geoff.
21140
21141         <rdar://problem/4557117> TOT REGRESSION: Repro crash in cancelPendingWindowDisplay --> _timerRelease when
21142         opening file from file open dialog
21143
21144         Note that I could not reproduce this situation at all on any of my machines; I had to debug this on Geoff's
21145         machine.
21146
21147         * Misc/WebNSWindowExtras.m:
21148         (replacementDealloc):
21149         Cancel display timer before dealloc, not after.  Cancelling the timer can cause a message to be sent to the
21150         window; best to do that before the window deallocates.
21151         (replacementFinalize):
21152         ditto
21153
21154 2006-05-20  Maciej Stachowiak  <mjs@apple.com>
21155
21156         Reviewed by Beth.
21157         
21158         - fix assertion failure on layout tests
21159
21160         * WebView/WebDataSource.m:
21161         (-[WebDataSource _mainReceivedError:complete:]): Don't do anything
21162         if this data source is no longer connected to a frame. Used to be
21163         this couldn't happen because the WebView would have been nil, but
21164         we no longer go through the WebView.
21165
21166 2006-05-20  Timothy Hatcher  <timothy@apple.com>
21167
21168         Reviewed by Anders.
21169
21170         Bug 9018: REGRESSION: resizing the top area of the inspector does not grow as expected
21171         http://bugs.webkit.org/show_bug.cgi?id=9018
21172         
21173         Use clientHeight now that offsetHeight includes the border and padding.
21174         clientHeight should have been used initially.
21175
21176         * WebInspector/WebInspector.m:
21177         (-[WebInspector resizeTopArea]):
21178
21179 2006-05-18  Maciej Stachowiak  <mjs@apple.com>
21180
21181         Reviewed by Eric.
21182         
21183         - remove loading-related code from WebView
21184         http://bugs.webkit.org/show_bug.cgi?id=8981
21185
21186         * Plugins/WebNetscapePluginStream.m:
21187         (-[WebNetscapePlugInStreamLoader didFinishLoading]):
21188         (-[WebNetscapePlugInStreamLoader didFailWithError:]):
21189         * WebCoreSupport/WebSubresourceLoader.m:
21190         (-[WebSubresourceLoader receivedError:]):
21191         (-[WebSubresourceLoader signalFinish]):
21192         * WebView/WebDataSource.m:
21193         (-[WebDataSource _stopLoading]):
21194         (-[WebDataSource _receivedMainResourceError:complete:]):
21195         (-[WebDataSource _finishedLoadingResource]):
21196         (-[WebDataSource _mainReceivedBytesSoFar:complete:]):
21197         (-[WebDataSource _receivedError:]):
21198         (-[WebDataSource _mainReceivedError:complete:]):
21199         * WebView/WebDataSourceInternal.h:
21200         * WebView/WebFrame.m:
21201         (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
21202         * WebView/WebMainResourceLoader.m:
21203         (-[WebMainResourceLoader didReceiveData:lengthReceived:]):
21204         (-[WebMainResourceLoader didFinishLoading]):
21205         * WebView/WebView.m:
21206         * WebView/WebViewInternal.h:
21207
21208 2006-05-18  Tim Omernick  <timo@apple.com>
21209
21210         Reviewed by John Sullivan.
21211
21212         <rdar://problem/4551938> More options needed for window display throttle
21213
21214         We decided to play it safe and leave our window flushing behavior unchanged from the previous
21215         public release.  By default, CoreGraphics deferred updates are once again OFF, and the window
21216         display throttle is OFF.
21217
21218         Individual applications should set the WebKitThrottleWindowDisplayPreferenceKey and 
21219         WebKitEnableDeferredUpdatesPreferenceKey defaults to suit their needs.
21220
21221         Old behavior (like 10.4.6): WebKitThrottleWindowDisplayPreferenceKey=0 (or unset), 
21222         WebKitEnableDeferredUpdatesPreferenceKey (or unset).
21223
21224         Tear-free scrolling/animations: WebKitThrottleWindowDisplayPreferenceKey=0 (or unset),
21225         WebKitEnableDeferredUpdatesPreferenceKey=1.  While this configuration fixes the tearing issues
21226         caused by over-flushing, some applications will experience performance problems as over-flushing
21227         with CG deferred updates enabled will cause the app to block.
21228
21229         Tear-free scrolling/animations, high performance: WebKitThrottleWindowDisplayPreferenceKey=1, 
21230         WebKitEnableDeferredUpdatesPreferenceKey=1.  This is the riskiest configuration in that it
21231         enables the window display throttle "feature", potentially breaking applications' assumptions
21232         about when displays occur.  However, it provides the "best of both worlds", in that updates
21233         are tear-free, and performance impact should me minimal.
21234
21235         * WebView/WebPreferenceKeysPrivate.h:
21236         Declared WebKitThrottleWindowDisplayPreferenceKey and WebKitEnableDeferredUpdatesPreferenceKey.
21237
21238         * WebView/WebFrameView.m:
21239         (-[WebFrameView initWithFrame:]):
21240         Turn off CG deferred updates if WebKitEnableDeferredUpdatesPreferenceKey is NO or has no value.
21241         Added some comments.
21242
21243 2006-05-18  John Sullivan  <sullivan@apple.com>
21244
21245         Reviewed by Darin Adler.
21246         
21247         - fixed <rdar://problem/4552713> REGRESSION: WebFrameView no longer responds to responder methods sent by Safari code
21248
21249         * WebView/WebView.m:
21250         (-[WebView _responderForResponderOperations]):
21251         Treat sibling views of the main frameView the same as views outside of the webview for the purposes of this mechanism.
21252
21253 2006-05-18  Tim Omernick  <timo@apple.com>
21254
21255         Reviewed by John Sullivan.
21256
21257         <rdar://problem/4553450> Make disabling window throttle safer
21258
21259         * Misc/WebNSWindowExtras.m:
21260         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
21261         Don't assume that +_webkit_disableWindowDisplayThrottle restored the NSWindow method implementations; 
21262         now we'll only swizzle them once, and our replacement IMPs will call the old IMPs when the window
21263         throttle is disabled.  This is a safer approach when other components/"haxies" override the same methods
21264         that we are overriding, as it allows the overrides to "chain" properly.
21265         Moved the dictionary initialization code down a bit.  The order doesn't matter here.
21266         (disableWindowDisplayThrottleApplierFunction):
21267         Noticed that this could have been written safer with respect to the timer having the last reference to
21268         the window.  I never experienced a crash here, but this code is definitely safer.
21269         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
21270         Don't restore NSWindow method implementations; just clear the flag, flush pending displays, and destroy
21271         the dictionary.
21272         (replacementPostWindowNeedsDisplay):
21273         If throttling is disabled, just call the original IMP.
21274         (clearWindowDisplayInfo):
21275         Added an assert.
21276         (replacementDealloc):
21277         Don't call clearWindowDisplayInfo() when throttling is disabled.
21278         (replacementFinalize):
21279         ditto
21280         (cancelPendingWindowDisplay):
21281         Removed an unnecessary assertion.
21282
21283 2006-05-17  Tim Omernick  <timo@apple.com>
21284
21285         Reviewed by Kevin Decker and John Sullivan.
21286
21287         <rdar://problem/4550801> REGRESSION: Window throttle code can sometimes leak NSWindows
21288
21289         The window display throttle depended on windows being closed before they were deallocated; this is
21290         not guaranteed by AppKit.  Windows that were being released without being closed were getting stuck
21291         in our NSWindow -> WindowDisplayInfo dictionary.
21292         
21293         * Misc/WebNSWindowExtras.m:
21294         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
21295         Don't retain the NSWindow keys in the window display info dictionary.
21296         Instead of overriding -close, override -dealloc and -finalize so that we can remove the NSWindow ->
21297         WindowDisplayInfo mapping when a window deallocates.
21298         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
21299         Restore -dealloc and -finalize.
21300         (clearWindowDisplayInfo):
21301         Factored the WindowDisplayInfo cleanup code out of the now-defunct replacementClose().
21302         (replacementClose):
21303         Removed; no longer needed.
21304         (replacementDealloc):
21305         Clear the WindowDisplayInfo for the window after deallocation.
21306         (replacementFinalize):
21307         ditto
21308         (-[NSWindow _webkit_doPendingPostWindowNeedsDisplay:]):
21309         Rewrote this method to be safe in the case where the firing display timer has the last reference to the
21310         window.
21311         Added comments.
21312         
21313 2006-05-17  bradeeoh  <beidson@apple.com>
21314
21315         Reviewed by Tim Hatcher
21316
21317         Consolidated WebDatabase base class into WebFileDatabase as the inheritance relationship became 
21318         obsolete.  This improves readability and sets the stage for a further in-depth rewrite of the 
21319         WebIcon* code.
21320
21321         * Misc/WebDatabase.h: Removed.
21322         * Misc/WebDatabase.m: Removed.
21323         * Misc/WebFileDatabase.h:
21324         * Misc/WebFileDatabase.m:
21325         (-[WebFileDatabaseOp dealloc]): 
21326         (-[WebFileDatabase dealloc]):  
21327         (-[WebFileDatabase path]):
21328         (-[WebFileDatabase isOpen]):
21329         (-[WebFileDatabase sizeLimit]):
21330         * WebKit.xcodeproj/project.pbxproj:
21331
21332 2006-05-17  Adele Peterson  <adele@apple.com>
21333
21334         Reviewed by Hyatt.
21335
21336         WebKit part of initial checkin to prepare for http://bugs.webkit.org/show_bug.cgi?id=8948
21337         Switch to use new text field implementation for <textarea>
21338
21339         * WebView/WebHTMLView.m:
21340         (-[WebHTMLView insertNewline:]): If we're in plain text mode, insert a line break instead of a paragraph separator.
21341         (-[WebHTMLView insertParagraphSeparator:]): ditto.
21342         * WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]):
21343         Checks for textareas as well as textfields before allowing the delegate to control
21344         the context menu.  This won't affect the old textareas because AppKit handles those context menus.
21345
21346 2006-05-17  John Sullivan  <sullivan@apple.com>
21347
21348         Reviewed by Maciej.
21349
21350         First step towards making text-matching mechanism more flexible; updated for changes
21351         to WebCoreFrameBridge calls.
21352
21353         * WebView/WebHTMLView.m:
21354         (-[WebHTMLView highlightAllMatchesForString:caseSensitive:]):
21355         updated for name change in WebCoreFrameBridge, also now calls setMarkedTextMatchesAreHighlighted:
21356         (-[WebHTMLView clearHighlightedMatches]):
21357         updated for name change in WebCoreFrameBridge
21358
21359 2006-05-16  Matt Gough  <matt@softchaos.com>
21360
21361         Reviewed by Geoff.
21362         
21363         Ensured all the public headers have a newline at their end.
21364
21365         Client code can now have 'Missing Newline at end of File' warnings enabled without emitting
21366         such warnings against any WebKit includes.
21367
21368         * Misc/WebDownload.h:
21369         * Plugins/npfunctions.h:
21370         * WebView/WebResourceLoadDelegate.h:
21371         * WebView/WebUIDelegate.h:
21372         * WebView/WebView.h:
21373
21374 2006-05-16  Tim Omernick  <timo@apple.com>
21375
21376         Reviewed by Tim Hatcher.
21377
21378         http://bugs.webkit.org/show_bug.cgi?id=8945 (REGRESSION: Scrolling is very slow when dragging
21379         the thumb)
21380
21381         Rolled out one of my tweaks to the window display throttle hack (remember the last flush time instead
21382         of the last display time).  While that was technically a better approach, we discovered a problem
21383         with how it interacts with NSView scroll tracking.  Rather than further complicate this already
21384         crazy hack, I'm reverting back to the simple version.  This should yield similar numbers on iBench,
21385         but not exhibit the nasty scrolling problem.
21386         
21387         * Misc/WebNSWindowExtras.m:
21388         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
21389         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
21390         (getWindowDisplayInfo):
21391         (requestWindowDisplay):
21392
21393 2006-05-16  bradeeoh  <beidson@apple.com>
21394
21395         Reviewed by Maciej Stachowiak
21396
21397         - Fixed an old deprecated method in Misc/WebFileDatabase.m
21398
21399         * Misc/WebFileDatabase.m:
21400         (UniqueFilePathForKey):  changed `lossyCString` to `UTF8String`
21401
21402 2006-05-16  Darin Adler  <darin@apple.com>
21403
21404         Reviewed by Anders.
21405
21406         - did the name change from "ImageElement" to "ImageForElement" that I said I would
21407           (oops!)
21408
21409         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
21410         (-[WebDefaultUIDelegate copyImageToClipboard:]):
21411         * Misc/WebNSPasteboardExtras.h:
21412         * Misc/WebNSPasteboardExtras.m:
21413         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
21414         * Misc/WebNSViewExtras.h:
21415         * Misc/WebNSViewExtras.m:
21416         (-[NSView _web_DragImageForElement:rect:event:pasteboard:source:offset:]):
21417         * WebView/WebHTMLView.m:
21418         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
21419         * WebView/WebView.m:
21420         (-[WebView _writeImageForElement:withPasteboardTypes:toPasteboard:]):
21421         (-[WebView writeElement:withPasteboardTypes:toPasteboard:]):
21422         * WebView/WebViewInternal.h:
21423
21424 2006-05-16  Darin Adler  <darin@apple.com>
21425
21426         Reviewed by Anders.
21427
21428         - http://bugs.webkit.org/show_bug.cgi?id=8940
21429           remove extra copy of image code
21430
21431         * English.lproj/StringsNotToBeLocalized.txt: Updated for many recent changes.
21432
21433         * WebKit.xcodeproj/project.pbxproj: Removed files.
21434         * WebCoreSupport/WebImageData.h: Removed.
21435         * WebCoreSupport/WebImageData.m: Removed.
21436         * WebCoreSupport/WebImageDecodeItem.h: Removed.
21437         * WebCoreSupport/WebImageDecodeItem.m: Removed.
21438         * WebCoreSupport/WebImageDecoder.h: Removed.
21439         * WebCoreSupport/WebImageDecoder.m: Removed.
21440         * WebCoreSupport/WebImageRenderer.h: Removed.
21441         * WebCoreSupport/WebImageRenderer.m: Removed.
21442
21443         * WebCoreSupport/WebImageRendererFactory.h:
21444         * WebCoreSupport/WebImageRendererFactory.m: Removed everything except for
21445         shouldUseThreadedDecoding, setShouldUseThreadedDecoding, and imageDataForName:.
21446
21447         * Misc/WebNSPasteboardExtras.h: Removed WebImageRenderer parameter from
21448         _web_declareAndWriteDragImage and renamed _web_declareAndWriteDragImageElement.
21449         * Misc/WebNSPasteboardExtras.m:
21450         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]): Changed to
21451         call +[WebFrameBridge supportedImageResourceMIMETypes] instead of
21452         -[WebImageRendererFactory supportedMIMETypes].
21453         (-[NSPasteboard _web_declareAndWriteDragImageElement:URL:title:archive:source:]):
21454         Removed WebImageRenderer parameter, and updated code since it was always nil.
21455
21456         * Misc/WebNSViewExtras.h: Removed WebImageRenderer parameter from
21457         _web_dragImage and renamed _web_dragImageElement.
21458         * Misc/WebNSViewExtras.m:
21459         (-[NSView _web_dragImageElement:rect:event:pasteboard:source:offset:]):
21460         Removed WebImageRenderer parameter, and updated code since it was always nil.
21461
21462         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Added some new
21463         functions now used by WebCore.
21464
21465         * WebView/WebDataSource.m: (-[WebDataSource _documentFragmentWithArchive:]):
21466         Call +[WebFrameBridge supportedImageResourceMIMETypes] instead of
21467         -[WebImageRendererFactory supportedMIMETypes].
21468
21469         * WebView/WebFrameView.m: Removed include of WebImageRenderer.h.
21470
21471         * WebView/WebHTMLRepresentation.m: (+[WebHTMLRepresentation supportedImageMIMETypes]):
21472         Removed call to +[WebImageRendererFactory createSharedFactory].
21473
21474         * WebView/WebHTMLView.m:
21475         (-[WebHTMLView _imageExistsAtPaths:]): Call +[WebFrameBridge supportedImageResourceMIMETypes]
21476         instead of -[WebImageRendererFactory supportedMIMETypes].
21477         (-[WebHTMLView _documentFragmentWithPaths:]): Ditto.
21478         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): Update
21479         to no longer pass nil for an image to _web_declareAndWriteDragImageElement and to
21480         _web_dragImageElement.
21481         (-[WebHTMLView dealloc]): Remove call to now-unneeded _reset.
21482         (-[WebHTMLView finalize]): Ditto.
21483         (-[WebHTMLView viewDidMoveToWindow]): Remove logic for calling _reset, including the inWindow
21484         boolean field.
21485
21486         * WebView/WebHTMLViewInternal.h: Removed inWindow boolean.
21487         * WebView/WebHTMLViewPrivate.h: Removed _reset method.
21488
21489 2006-05-16  Darin Adler  <darin@apple.com>
21490
21491         Reviewed by Hyatt.
21492
21493         - fix http://bugs.webkit.org/show_bug.cgi?id=8898
21494           REGRESSION: Attempting to right-click image in own tab on website causes crash
21495         - fix http://bugs.webkit.org/show_bug.cgi?id=8919
21496           REGRESSION: image could not be dragged, subsequent click-drag activity caused crash
21497
21498         These fixes may become obsolete when Anders lands his standalone image viewer
21499         patch, but in my tree they are needed to make Copy Image work after the fix
21500         over on the WebCore side to avoid the crashes.
21501
21502         * Misc/WebNSPasteboardExtras.h: Change _web_writeImage parameter to an NSImage.
21503         * Misc/WebNSPasteboardExtras.m:
21504         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]): Change parameter
21505         to an NSImage instead of a WebImageRenderer.
21506         (-[NSPasteboard _web_declareAndWriteDragImage:element:URL:title:archive:source:]):
21507         Call -[WebImageRenderer image] to get an NSImage to pass to _web_writeImage.
21508
21509         * WebView/WebView.m: (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
21510         Get the image using WebElementImageKey if WebElementDOMNodeKey is nil.
21511
21512 2006-05-16  Anders Carlsson  <acarlsson@apple.com>
21513
21514         Reviewed by Maciej.
21515
21516         http://bugs.webkit.org/show_bug.cgi?id=8921
21517         Use WebCore to render full-frame images
21518         
21519         * WebCoreSupport/WebFrameBridge.m:
21520         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
21521         Remove WebImageView handling.
21522         
21523         (-[WebFrameBridge mainResourceURLResponse]):
21524         New function which returns the URL response for the main resource. This is used by the
21525         manual loading of images.
21526         
21527         (-[WebFrameBridge imageTitleForFilename:size:]):
21528         New function which returns a correctly translated image title given a filename and a size.
21529         
21530         * WebCoreSupport/WebImageRenderer.m:
21531         (-[WebImageRenderer _startOrContinueAnimationIfNecessary]):
21532         Remove WebImageView handling.
21533         
21534         * WebKit.xcodeproj/project.pbxproj:
21535         Remove WebImageRepresentation and WebImageView.
21536         
21537         * WebView/WebArchiver.h:
21538         * WebView/WebArchiver.m:
21539         (+[WebArchiver archiveMainResourceForFrame:]):
21540         New functions which returns a WebArchive with just the main resource, ignoring any subresources.
21541         
21542         * WebView/WebDataSource.m:
21543         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
21544         Use MIME types from WebHTMLRepresentation instead of WebImageRepresentation.
21545         
21546         * WebView/WebFrameView.m:
21547         (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
21548         Use MIME types from WebHTMLRepresentation instead of WebImageRepresentation.
21549         
21550         (+[WebHTMLRepresentation supportedMIMETypes]):
21551         Create an array of image and non-image MIME Types.
21552         
21553         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
21554         (+[WebHTMLRepresentation supportedImageMIMETypes]):
21555         New functions, separating the list of MIME types into image and non-image ones.
21556         
21557         * WebView/WebHTMLView.m:
21558         (+[WebHTMLView supportedImageMIMETypes]):
21559         (+[WebHTMLView supportedNonImageMIMETypes]):
21560         New functions which call down to WebHTMLRepresentation.
21561         
21562         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
21563         If the image element comes from an ImageDocument, just use an archive of the main resource
21564         instead of the generated HTML document.
21565         
21566         * WebView/WebHTMLViewPrivate.h:
21567         Declare new functions.
21568         
21569         * WebView/WebImageRepresentation.h: Removed.
21570         * WebView/WebImageRepresentation.m: Removed.
21571         * WebView/WebImageView.h: Removed.
21572         * WebView/WebImageView.m: Removed.
21573         
21574 2006-05-15  Tim Omernick  <timo@apple.com>
21575
21576         Reviewed by John Sullivan.
21577
21578         Part of <rdar://problem/4466508> Add 64-bit support to the Netscape Plugin API
21579
21580         Added to the Netscape Plugin API the concept of "plugin drawing models".  The drawing model
21581         determines the kind of graphics context created by the browser for the plugin, as well as 
21582         the Mac types of various Netscape Plugin API data structures.
21583
21584         There is a drawing model to represent the old QuickDraw-based API.  It is used by default
21585         if QuickDraw is available on the system, unless the plugin specifies another drawing model.
21586
21587         The big change is the addition of the CoreGraphics drawing model.  A plugin may request this
21588         drawing model to obtain access to a CGContextRef for drawing, instead of a QuickDraw CGrafPtr.
21589
21590         * Plugins/WebBaseNetscapePluginView.h:
21591         Added PluginPort union, which wraps a NP_Port and a NP_CGContext.  This is to make access to
21592         the nPort and lastSetPort ivars more convenient now that the port type differs based on the 
21593         drawing model.
21594         Changed types of nPort and lastSetPort to PluginPort so they can be used with any drawing model.
21595         Added drawingModel ivar.
21596         * Plugins/WebBaseNetscapePluginView.m:
21597         Renamed PortState to PortState_QD.  PortState is now an opaque pointer.  PortState_QD cannot be
21598         used if QuickDraw is unavailable.
21599         (-[WebBaseNetscapePluginView fixWindowPort]):
21600         Cannot be used if QuickDraw is unavailable.
21601         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
21602         Only fix window port if drawing model is QuickDraw.
21603         Re-ordered some code so I could group QuickDraw-specific stuff into switch and if blocks (that's
21604         why the diff here is so terrible).
21605         Now returns a malloc()'ed PortState that the caller is responsible for freeing.  Renamed to
21606         better reflect this behavior.
21607         Support for the CoreGraphics drawing model -- fill PortState_CG struct, save CGContext state.
21608         (-[WebBaseNetscapePluginView restorePortState:]):
21609         Switch based on drawing model.
21610         Support for the CoreGraphics drawing model -- restore CGContext state saved earlier.
21611         (-[WebBaseNetscapePluginView sendEvent:]):
21612         Formatting.
21613         Don't set save/set port state or set the window in CoreGraphics mode unless the event being
21614         sent is an updateEvt.  We can't provide the plugin with a CGContext outside of our view display
21615         cycle.
21616         Don't restore PortState if it's NULL (didn't used to be a pointer).  Free when we're done with it.
21617         (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]):
21618         Formatting.
21619         Switch how we compare ports based on the drawing model.
21620         (-[WebBaseNetscapePluginView updateAndSetWindow]):
21621         Fixed for CoreGraphics by triggering a redisplay instead of sending an update event to the plugin
21622         outside of the view display cycle.
21623         Don't restore PortState if it's NULL (didn't used to be a pointer).  Free when we're done with it.
21624         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
21625         Assert that the window is only set when updating in CoreGraphics mode.
21626         Log differently depending on the drawing model.
21627         (-[WebBaseNetscapePluginView start]):
21628         Fall back on QuickDraw if the plugin does not specify a drawing model.
21629         (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
21630         Cannot be used if QuickDraw is unavailable.
21631         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
21632         Only call -tellQuickTimeToChill in QuickDraw mode.
21633         (-[WebBaseNetscapePluginView viewHasMoved:]):
21634         ditto
21635         (-[WebBaseNetscapePluginView invalidateRegion:]):
21636         NPRegion is a CGPathRef in CoreGraphics mode.
21637         (-[WebBaseNetscapePluginView getVariable:value:]):
21638         Added support for retriveing the NPNVpluginDrawingModel, NPNVsupportsQuickDrawBool, and
21639         NPNVsupportsCoreGraphicsBool browser variables.
21640         (-[WebBaseNetscapePluginView setVariable:value:]):
21641         Added support for setting the NPNVpluginDrawingModel variable.
21642
21643 2006-05-15  Tim Omernick  <timo@apple.com>
21644
21645         Reviewed by Kevin Decker.
21646
21647         Follow-up to my previous PLT fix.  I found upon further testing (by dramatically decreasing the
21648         allowed display rate) that +_webkit_displayThrottledWindows did not always force a display when
21649         necessary.  The reason is that I was not giving a proper timeout to CFRunLoopRunInMode().  I was
21650         passing 0, which was causing only "expired" timers to fire.  This method is actually supposed to
21651         block until all currently scheduled display timers fire.
21652
21653         I tested this change and found that it did not affect my PLT times when the display rate was
21654         capped to 60 fps.  It also behaves as expected when the display rate is set much lower (say, 1
21655         display per second); my previous fix did not work well at such display rates.
21656
21657         * Misc/WebNSWindowExtras.m:
21658         (+[NSWindow _webkit_displayThrottledWindows]):
21659         Run the runloop for an amount of time equal to the minimum allowed interval between displays.
21660         This ensures that we'll block until all currently scheduled display timers fire (but we won't
21661         block for future display timers).
21662
21663 2006-05-15  John Sullivan  <sullivan@apple.com>
21664
21665         Reviewed by Tim Omernick.
21666         
21667         - followup to previous fix; I hadn't tested quitting adequately
21668
21669         * WebView/WebHTMLView.m:
21670         (-[WebHTMLView dealloc]):
21671         call removeAllToolTips before clearing _private so that removeTrackingRect: override can work 
21672         properly. Normally removeAllToolTips would be called by super, but that's too late.
21673         (-[WebHTMLView finalize]):
21674         ditto
21675
21676 2006-05-15  John Sullivan  <sullivan@apple.com>
21677
21678         Reviewed by Darin.
21679         
21680         - fixed <rdar://problem/4503016> TOT assertion failure in -[WebHTMLView(WebPrivate) removeTrackingRect:]
21681         
21682         We have some tricky code to deal with tracking rects, which succumbed to a fix in AppKit. Updated our
21683         tricky code to work with the AppKit fix.
21684
21685         * WebView/WebHTMLViewInternal.h:
21686         new instance variable lastToolTipTag
21687         
21688         * WebView/WebHTMLView.m:
21689         (-[WebHTMLView removeTrackingRect:]):
21690         handle removing lastToolTipTag by calling super
21691         (-[WebHTMLView _setToolTip:]):
21692         save tool tip tag in lastToolTipTag; this apparently used to always return 0, so we formerly had no way
21693         to distinguish it from the no-tool-tips-yet case.
21694
21695         * WebKit.xcodeproj/project.pbxproj:
21696         Xcode removed some old cruft
21697
21698 2006-05-15  Tim Omernick  <timo@apple.com>
21699
21700         Reviewed by Darin.
21701
21702         Safari's Page Load Test (PLT) saturates the runloop with so many sources that timers are not allowed to fire 
21703         as frequently as they should.  This is a general problem with the PLT -- because of this, it does not measure
21704         work done in timer callbacks during/after the page load process.
21705
21706         Unfortunately, this aspect of the PLT interferes with our window display throttle hack.  Because we throttle
21707         display using timers, and the PLT starves timers, most of the pages loaded by the PLT do not actually display.
21708         This makes the PLT run "too fast", yielding ridiculously fast numbers compared to when throttling is disabled.
21709
21710         I've added a new method that the PLT can call after each page load to force any starved display throttle timers
21711         to fire.  By doing this, Safari's PLT will be guaranteed to display each page at least once.
21712
21713         * Misc/WebNSWindowExtras.h:
21714         * Misc/WebNSWindowExtras.m:
21715         Added a special internal runloop mode for the throttle timers.
21716         (+[NSWindow _webkit_displayThrottledWindows]):
21717         Run the runloop in our special internal mode until there are no more sources to handle.
21718         (requestWindowDisplay):
21719         Schedule the timer in the new mode as well as the standard modes.
21720         
21721 2006-05-15  Anders Carlsson  <acarlsson@apple.com>
21722
21723         Reviewed by Maciej.
21724
21725         http://bugs.webkit.org/show_bug.cgi?id=8913
21726         REGRESSION: Can view source for text files
21727
21728         * WebView/WebDocumentPrivate.h:
21729         Add canSaveAsWebArchive.
21730         
21731         * WebView/WebHTMLRepresentation.m:
21732         (-[WebHTMLRepresentation canProvideDocumentSource]):
21733         Call the bridge.
21734         
21735         (-[WebHTMLRepresentation canSaveAsWebArchive]):
21736         New function. This will be used in Safari ToT to determine if a page can be saved as an archive.
21737
21738 2006-05-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
21739
21740         Reviewed by Darin.
21741
21742         - fix http://bugs.webkit.org/show_bug.cgi?id=8739
21743           Crash in RenderTableSection::paint due to manipulating DOM on resize
21744
21745         Manual test: manual-tests/dom-manipulation-on-resize.html
21746
21747         * WebView/WebHTMLView.m:
21748         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Relayout if necessary
21749         after sending the resize event.
21750
21751 2006-05-12  Maciej Stachowiak  <mjs@apple.com>
21752
21753         Reviewed by Brady.
21754         
21755         http://bugs.webkit.org/show_bug.cgi?id=8876
21756         - move most private WebDataSource methods to uninstalled header
21757         
21758         I put the declarations for the ones only used in WebKit in WebDataSourceInternal.h
21759         and removed two entirey unused ones.
21760
21761         * Plugins/WebNetscapePluginRepresentation.m:
21762         * Plugins/WebNetscapePluginStream.m:
21763         * Plugins/WebPluginController.m:
21764         * Plugins/WebPluginDocumentView.m:
21765         * WebCoreSupport/WebFrameBridge.m:
21766         (-[WebFrameBridge dataSource]):
21767         * WebCoreSupport/WebSubresourceLoader.m:
21768         * WebKit.xcodeproj/project.pbxproj:
21769         * WebView/WebDataSource.m:
21770         (-[WebDataSource _updateIconDatabaseWithURL:]):
21771         (-[WebDataSource _loadIcon]):
21772         (-[WebDataSource _clearErrors]):
21773         (-[WebDataSource _commitLoadWithData:]):
21774         (-[WebDataSource _doesProgressiveLoadWithMIMEType:]):
21775         (-[WebDataSource _addResponse:]):
21776         * WebView/WebDataSourceInternal.h: Added.
21777         * WebView/WebDataSourcePrivate.h:
21778         * WebView/WebFrame.m:
21779         * WebView/WebHTMLRepresentation.m:
21780         * WebView/WebHTMLView.m:
21781         * WebView/WebImageView.m:
21782         * WebView/WebLoader.m:
21783         * WebView/WebMainResourceLoader.m:
21784         * WebView/WebPDFView.m:
21785         * WebView/WebRenderNode.m:
21786         * WebView/WebView.m:
21787
21788 2006-05-12  Tim Omernick  <timo@apple.com>
21789
21790         Reviewed by John Sullivan.
21791
21792         <rdar://problem/4542808> REGRESSION: benchjs test 1 has slowed by over 150% (8740)
21793         <http://bugs.webkit.org/show_bug.cgi?id=8740>
21794
21795         Improvement to my NSWindow display throttle hack.  Remember the last flush time instead of the last display time.
21796         Our goal is to never draw less than 1/60th of a second after the window is flushed in order to avoid blocking on
21797         a CG coalesced update.  Using the last display time is close, but this is much more accurate.  I have verified that
21798         this further improves our score on BenchJS Test 1 (by 9.8% with the status bar shown compared to the previous build),
21799         as well as on our internal PLT scores by a smaller percentage.
21800
21801         * Misc/WebNSWindowExtras.m:
21802         Renamed lastDisplayTime to lastFlushTime.
21803         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
21804         Replace -[NSWindow flushWindow] with our own implementation.
21805         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
21806         Restore -[NSWindow flushWindow].
21807         (replacementFlushWindow):
21808         Use the last flush time instead of the last display time.
21809         (getWindowDisplayInfo):
21810         Renamed lastDisplayTime to lastFlushTime.
21811         (requestWindowDisplay):
21812         Moved some code to replacementFlushWindow().
21813
21814 2006-05-11  Timothy Hatcher  <timothy@apple.com>
21815
21816         Reviewed by Darin.
21817
21818         Bug 8856: Web Inspector should show the Xpath for the selected node
21819         http://bugs.webkit.org/show_bug.cgi?id=8856
21820         
21821         Adds an Xpath area to the Node panel.
21822
21823         * WebInspector/webInspector/inspector.css:
21824         * WebInspector/webInspector/inspector.html:
21825         * WebInspector/webInspector/inspector.js:
21826
21827 2006-05-11  Timothy Hatcher  <timothy@apple.com>
21828
21829         Reviewed by Anders.
21830
21831         Fixes <rdar://problem/4411845> lots of SPOD trying to scroll through
21832         Markup & Content inspecting body at apple.com (6614)
21833         http://bugs.webkit.org/show_bug.cgi?id=6614
21834
21835         Removed the Markup & Content pane when viewing a element.
21836         This pane was not that useful and made the inspector really slow
21837         when the markup was large. Only show this pane for text nodes.
21838
21839         * WebInspector/webInspector/inspector.css: use -webkit prefix
21840         * WebInspector/webInspector/inspector.html:
21841         * WebInspector/webInspector/inspector.js:
21842
21843 2006-05-11  Sam Weinig  <sam.weinig@gmail.com>
21844
21845         Reviewed by Timothy.
21846
21847         Patch for <http://bugs.webkit.org/show_bug.cgi?id=8810>
21848         Bug 8810: Scrollbars in WebInspector rendered incorrectly
21849
21850         * WebInspector/webInspector/inspector.css: 
21851         Make scroll bars absolutely positioned.
21852
21853 2006-05-10  Tim Omernick  <timo@apple.com>
21854
21855         Reviewed by Darin.
21856
21857         <rdar://problem/4542808> REGRESSION: benchjs test 1 has slowed by over 150% (8740)
21858         <http://bugs.webkit.org/show_bug.cgi?id=8740>
21859
21860         * Misc/WebNSWindowExtras.h:
21861         * Misc/WebNSWindowExtras.m:
21862         (+[NSWindow _webkit_enableWindowDisplayThrottle]):
21863         Overrides certain NSWindow methods so that window autodisplay can be throttled to 60Hz.
21864
21865         (disableWindowDisplayThrottleApplierFunction):
21866         CFDictionary applier function for when the throttle is disabled.  Cancels all pending window displays,
21867         and calls -displayIfNeeded on each window with a pending display.
21868
21869         (+[NSWindow _webkit_disableWindowDisplayThrottle]):
21870         Restores default NSWindow method implementations and clears pending window displays.
21871
21872         (swizzleInstanceMethod):
21873         Helper function to swizzle ObjC method implementations.
21874
21875         (replacementPostWindowNeedsDisplay):
21876         Don't call into -[NSWindow _postWindowNeedsDisplay] if requestWindowDisplay() returns NO (this is the
21877         function that throttles display).
21878
21879         (replacementClose):
21880         Clean up the WindowDisplayInfo struct for the window, since it's about to go away.
21881
21882         (getWindowDisplayInfo):
21883         Gets the WindowDisplayInfo struct for the window, or creates it if absent.
21884
21885         (requestWindowDisplay):
21886         Returns YES if a display is allowed right now.  Returns NO otherwise, and schedules a timer to try the
21887         display again.
21888
21889         (cancelPendingWindowDisplay):
21890         Cancels the pending display for the window, if any.
21891
21892         (-[NSWindow _webkit_doPendingPostWindowNeedsDisplay:]):
21893         Try to call _postWindowNeedsDisplay again.
21894
21895         * WebView/WebFrameView.m:
21896         (-[WebFrameView initWithFrame:]):
21897         If the secret "WebKitThrottleWindowDisplay" default is set, then enable the NSWindow throttle.
21898
21899 2006-05-10  Anders Carlsson  <acarlsson@apple.com>
21900
21901         Reviewed by Maciej.
21902
21903         * WebView/WebHTMLView.m:
21904         (+[WebHTMLView unsupportedTextMIMETypes]):
21905         Add text/rtf
21906         
21907 2006-05-09  Levi Weintraub  <lweintraub@apple.com>
21908
21909         Reviewed by justin.
21910
21911         <rdar://problem/4442395>
21912         Tiny MCE: Link isn't inserted after dragging into textarea field
21913         
21914         * WebView/WebHTMLView.m:
21915         (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]):
21916         Modified to create an anchor object with a title as opposed to just the URL as text.
21917
21918 2006-05-09  Tim Omernick  <timo@apple.com>
21919
21920         Reviewed by Dave Harrison.
21921
21922         <rdar://problem/4523432> safari crashed right after disabling "block pop up windows" (or
21923         other WebPreferences changes)
21924
21925         * Plugins/WebBaseNetscapePluginView.m:
21926         (-[WebBaseNetscapePluginView viewWillMoveToHostWindow:]):
21927         When the plugin view is removed from both its window and its hostWindow, stop observing
21928         WebPreferences.
21929
21930 2006-05-09  Anders Carlsson  <acarlsson@apple.com>
21931
21932         Reviewed by Darin.
21933
21934         http://bugs.webkit.org/show_bug.cgi?id=8808
21935         WebCore should handle text files
21936
21937         * WebKit.exp:
21938         Remove WebTextView.
21939         
21940         * WebKit.xcodeproj/project.pbxproj:
21941         Get rid of WebTextView and WebTextRepresentation.
21942         
21943         * WebView/WebDataSource.m:
21944         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
21945         * WebView/WebFrameView.m:
21946         (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
21947         * WebView/WebHTMLView.m:
21948         The text MIME types are now handled by WebHTMLView.
21949         
21950         (+[WebHTMLView unsupportedTextMIMETypes]):
21951         New function, moved here from WebTextView.
21952         
21953         * WebView/WebHTMLViewPrivate.h:
21954         * WebView/WebTextRepresentation.h: Removed.
21955         * WebView/WebTextRepresentation.m: Removed.
21956         * WebView/WebTextView.h: Removed.
21957         * WebView/WebTextView.m: Removed.
21958         
21959         * WebView/WebView.m:
21960         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
21961         Now special-case WebHTMLView instead of WebTextView for MIME types
21962         that shouldn't be shown.
21963
21964 2006-05-09  Maciej Stachowiak  <mjs@apple.com>
21965
21966         Rubber stamped by Anders.
21967         
21968         - renamed kxmlcore to wtf
21969         
21970         kxmlcore --> wtf
21971         KXMLCore --> WTF
21972         KXC --> WTF
21973
21974         * Misc/WebKitLogging.h:
21975         * Misc/WebKitLogging.m:
21976         (initializeLogChannel):
21977
21978 2006-05-09  Timothy Hatcher  <timothy@apple.com>
21979
21980         Reviewed by Anders.
21981
21982         Bug 8804: Inspector should support searching by Xpath query
21983         http://bugs.webkit.org/show_bug.cgi?id=8804
21984
21985         * WebInspector/WebInspector.m:
21986         (-[WebInspector _refreshSearch]):
21987         * WebInspector/webInspector/inspector.js:
21988
21989 2006-05-08  Maciej Stachowiak  <mjs@apple.com>
21990
21991         Reviewed by Tim Hatcher.
21992         
21993         - refactor things so that WebKit doesn't save a WebResource for every loaded URL,
21994         but rather retrieves the data from the WebCore cache as needed.
21995         http://bugs.webkit.org/show_bug.cgi?id=8802
21996
21997         * WebCoreSupport/WebFrameBridge.m:
21998         (-[WebFrameBridge objectLoadedFromCacheWithURL:response:data:]):
21999         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
22000         * WebCoreSupport/WebSubresourceLoader.m:
22001         (-[WebSubresourceLoader didReceiveResponse:]):
22002         * WebView/WebDataSource.m:
22003         (-[WebDataSourcePrivate dealloc]):
22004         (-[WebDataSource _setupForReplaceByMIMEType:]):
22005         (-[WebDataSource _archivedSubresourceForURL:]):
22006         (-[WebDataSource initWithRequest:]):
22007         (-[WebDataSource subresources]):
22008         (-[WebDataSource subresourceForURL:]):
22009         (-[WebDataSource addSubresource:]):
22010         * WebView/WebDataSourcePrivate.h:
22011         * WebView/WebFrame.m:
22012         * WebView/WebFrameInternal.h:
22013         * WebView/WebHTMLView.m:
22014         * WebView/WebLoader.h:
22015         * WebView/WebLoader.m:
22016         (-[NSURLProtocol loadWithRequest:]):
22017         (-[NSURLProtocol didFinishLoading]):
22018         * WebView/WebUnarchivingState.h:
22019         * WebView/WebUnarchivingState.m:
22020         (-[WebUnarchivingState addResource:]):
22021
22022 2006-05-04  Mitz Pettel  <opendarwin.org@mitzpettel.com>
22023
22024         Reviewed by Darin.
22025
22026         - fix http://bugs.webkit.org/show_bug.cgi?id=8594
22027           REGRESSION: Exception on closing a page containing (just) an mp3
22028
22029         Test: plugins/pluginDocumentView-deallocated-dataSource.html
22030
22031         * Plugins/WebPluginDocumentView.m:
22032         (-[WebPluginDocumentView dealloc]): Release the dataSource.
22033         (-[WebPluginDocumentView setDataSource:]): Retain the dataSource.
22034
22035 2006-05-04  Tim Omernick  <timo@apple.com>
22036
22037         Reviewed by Darin.
22038
22039         <rdar://problem/4537606> Give Java WebKit plugin access to its own DOM element
22040
22041         * WebCoreSupport/WebFrameBridge.m:
22042         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
22043         Pass the DOMElement to the plugin if it's a WebKit plugin (we need to handle Netscape plugins
22044         differently).
22045
22046 2006-05-04  Tim Omernick  <timo@apple.com>
22047
22048         Reviewed by John Sullivan.
22049
22050         <rdar://problem/4480186> Give WebKit plugins access to their own DOM element
22051
22052         This does not fix <rdar://problem/4480187> Give Netscape plugins access to their own DOM element --
22053         we're not going to use the ObjC DOM API for that, but rather the NP bindings API.
22054
22055         * Plugins/WebPluginPackage.m:
22056         Declared WebPlugInContainingElementKey.  This is not a new plugin argument -- it's been in our public
22057         headers since all along, but has never been concretely declared -- plugins that referenced it would not
22058         link.
22059
22060         * WebCoreSupport/WebFrameBridge.m:
22061         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:]):
22062         Added DOMElement parameter, which is now included in the plugin arguments dictionary.
22063         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:]):
22064         ditto
22065
22066         * WebKit.exp:
22067         Export WebPlugInContainingElementKey.
22068
22069 2006-05-02  Darin Adler  <darin@apple.com>
22070
22071         Reviewed by Eric.
22072
22073         - http://bugs.webkit.org/show_bug.cgi?id=8677
22074           REGRESSION: wkSetUpFontCache() may be called before the SPIs are connected.
22075
22076         I don't know how reproduce this without one of Rosyna's hacks installed, so I
22077         did not include a test.
22078
22079         * Misc/WebStringTruncator.m: (+[WebStringTruncator initialize]): Add call to
22080         InitWebCoreSystemInterface.
22081
22082         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add a boolean
22083         so we will only do this one time.
22084
22085 2006-05-02  Adele Peterson  <adele@apple.com>
22086
22087         Reviewed by Tim O.
22088
22089         - fix http://bugs.webkit.org/show_bug.cgi?id=6988
22090         REGRESSION: Display correct context menus for new text fields
22091
22092         * WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]):
22093         Don't let the UI delegate have control over the context menu for text fields.
22094
22095 2006-05-01  Mitz Pettel  <opendarwin.org@mitzpettel.com>
22096
22097         Reviewed by Darin.
22098
22099         - fix http://bugs.webkit.org/show_bug.cgi?id=8658
22100           Assertion failure in -[WebPluginContainerCheck _isForbiddenFileLoad]
22101           (bridge is null) when clicking QuickTime object with href
22102
22103         * WebView/WebHTMLView.m:
22104        (-[WebHTMLView setDataSource:]): Set the pluginController's dataSource.
22105
22106 2006-05-01  Maciej Stachowiak  <mjs@apple.com>
22107
22108         - fix build
22109
22110         * WebKit.exp: Add symbol that the new Safari will need.
22111
22112 2006-05-01  John Sullivan  <sullivan@apple.com>
22113
22114         Reviewed by Tim Omernick.
22115         
22116         - fixed <rdar://problem/3126419> history load enforces history limit, but deletes the newest instead of oldest items
22117         - added notification reporting items discarded during load because the age limit or item count limit is exceeded
22118         - a few other minor tweaks
22119
22120         * History/WebHistory.h:
22121         fixed a typo and an incorrect method name
22122         
22123         * History/WebHistoryPrivate.h:
22124         Added declaration of WebHistoryItemsDiscardedWhileLoadingNotification. Also changed signature of
22125         WebHistoryPrivate method -loadFromURL:error: to have new collectDiscardedItemsInto: parameter.
22126         Also deleted declarations of two methods that didn't actually exist (loadHistory and initWithFile:), 
22127         and added comments about which methods should become public API, WebKit-internal, or file-internal.
22128
22129         * History/WebHistory.m:
22130         (-[WebHistoryPrivate arrayRepresentation]):
22131         This method, called only by _saveHistoryGuts:, used to deliberately leave out items that violated
22132         either the age limit or the item count limit. Now all the items are included (and thus saved), and
22133         all the pruning is done at load time, so clients can keep track of the pruned items by observing
22134         the new WebHistoryItemsDiscardedWhileLoadingNotification
22135         (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
22136         Now keeps track of all the items that violated the age limit or item count limit in the new
22137         collectedDiscardedItemsInto: parameter. Also, now processes items in forward order rather than
22138         reverse order to fix 3126419. Now uses compare: rather than _webkit_compareDay: to check against
22139         age limit; this is faster and also more correct (most noticeable with small age limits).
22140         (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]):
22141         new collectDiscardedItemsInto: parameter, passed into _loadHistoryGuts:...
22142         (-[WebHistory loadFromURL:error:]):
22143         Now sends new WebHistoryItemsDiscardedWhileLoadingNotification if any items were discarded due
22144         to age limit or item count limit.
22145         
22146         * WebKit.exp:
22147         exported symbol for WebHistoryItemsDiscardedWhileLoadingNotification
22148
22149 2006-04-29  Timothy Hatcher  <timothy@apple.com>
22150
22151         Reviewed by Maciej.
22152
22153         Bug 8577: [TabBarView _web_superviewOfClass:stoppingAtClass:]
22154         http://bugs.webkit.org/show_bug.cgi?id=8577
22155
22156         Added back _web_superviewOfClass:stoppingAtClass:.
22157         This method was removed in r14032 (bug 8562), but Safari 2.0 still uses it.
22158         We should remove this method once Open Source users have a new version
22159         to use with TOT WebKit.
22160
22161         * Misc/WebNSViewExtras.m:
22162         (-[NSView _web_superviewOfClass:stoppingAtClass:]):
22163
22164 2006-04-28  David Hyatt  <hyatt@apple.com>
22165
22166         Double the cache size to account for our revised (more accurate)
22167         measurement of the image buffers.
22168
22169         Reviewed by darin
22170
22171         * WebView/WebPreferences.m:
22172         (+[WebPreferences initialize]):
22173
22174 2006-04-28  David Hyatt  <hyatt@apple.com>
22175
22176         Fix for 8586, move WebTextRenderer into WebCore.
22177
22178         Reviewed by darin
22179
22180         * Misc/WebKitNSStringExtras.m:
22181         (-[NSString _web_drawAtPoint:font:textColor:]):
22182         (-[NSString _web_widthWithFont:]):
22183         * Misc/WebStringTruncator.m:
22184         (+[WebStringTruncator centerTruncateString:toWidth:]):
22185         (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
22186         (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
22187         (+[WebStringTruncator widthOfString:font:]):
22188         * WebCoreSupport/WebSystemInterface.m:
22189         (InitWebCoreSystemInterface):
22190         * WebCoreSupport/WebTextRenderer.h: Removed.
22191         * WebCoreSupport/WebTextRenderer.m: Removed.
22192         * WebCoreSupport/WebTextRendererFactory.h: Removed.
22193         * WebCoreSupport/WebTextRendererFactory.m: Removed.
22194         * WebKit.xcodeproj/project.pbxproj:
22195         * WebView/WebFrameView.m:
22196         (-[WebFrameView initWithFrame:]):
22197         * WebView/WebHTMLView.m:
22198         (-[WebHTMLView _addToStyle:fontA:fontB:]):
22199         * WebView/WebTextView.m:
22200         (-[WebTextView setFixedWidthFont]):
22201         * WebView/WebView.m:
22202         (+[WebView _setAlwaysUseATSU:]):
22203         (+[WebView _setShouldUseFontSmoothing:]):
22204         (+[WebView _shouldUseFontSmoothing]):
22205
22206 2006-04-28  Eric Seidel  <eseidel@apple.com>
22207
22208         Reviewed by darin.
22209
22210         Misc. style cleanup.
22211         http://bugs.webkit.org/show_bug.cgi?id=8643
22212
22213         * Misc/WebIconDatabase.m:
22214         (-[NSMutableDictionary iconForURL:withSize:cache:]):
22215         (-[NSMutableDictionary iconURLForURL:]):
22216         (-[NSMutableDictionary retainIconForURL:]):
22217         (-[NSMutableDictionary releaseIconForURL:]):
22218         (-[WebIconDatabase _setIcon:forIconURL:]):
22219         (-[WebIconDatabase _iconsForIconURLString:]):
22220         (-[WebIconDatabase _forgetIconForIconURLString:]):
22221         (-[WebIconDatabase _releaseIconForIconURLString:]):
22222         (-[WebIconDatabase _iconsBySplittingRepresentationsOfIcon:]):
22223         * Plugins/WebBasePluginPackage.m:
22224         (+[WebBasePluginPackage pluginWithPath:]):
22225         (-[WebBasePluginPackage pathByResolvingSymlinksAndAliasesInPath:]):
22226         (-[WebBasePluginPackage initWithPath:]):
22227         (-[WebBasePluginPackage getPluginInfoFromBundleAndMIMEDictionary:]):
22228         (-[WebBasePluginPackage pListForPath:createFile:]):
22229         (-[WebBasePluginPackage getPluginInfoFromPLists]):
22230         (-[WebBasePluginPackage load]):
22231         (-[WebBasePluginPackage setMIMEToExtensionsDictionary:]):
22232         (-[WebBasePluginPackage isNativeLibraryData:]):
22233         (-[NSArray _web_lowercaseStrings]):
22234         * Plugins/WebNetscapePluginPackage.m:
22235         (-[WebNetscapePluginPackage openResourceFile]):
22236         (-[WebNetscapePluginPackage closeResourceFile:]):
22237         (-[WebNetscapePluginPackage stringForStringListID:andIndex:]):
22238         (-[WebNetscapePluginPackage getPluginInfoFromResources]):
22239         (-[WebNetscapePluginPackage initWithPath:]):
22240         (-[WebNetscapePluginPackage executableType]):
22241         (-[WebNetscapePluginPackage unloadWithoutShutdown]):
22242         (-[WebNetscapePluginPackage load]):
22243         (-[WebNetscapePluginPackage unload]):
22244         * Plugins/WebNetscapePluginRepresentation.m:
22245         (-[WebNetscapePluginRepresentation redeliverStream]):
22246         * Plugins/WebPluginDatabase.m:
22247         (+[WebPluginDatabase installedPlugins]):
22248         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
22249         (-[WebPluginDatabase pluginForExtension:]):
22250         (pluginLocations):
22251         (-[WebPluginDatabase init]):
22252         (-[WebPluginDatabase refresh]):
22253         * Plugins/npapi.m:
22254         (NPN_MemAlloc):
22255         (NPN_MemFree):
22256         (pluginViewForInstance):
22257         * WebCoreSupport/WebSubresourceLoader.m:
22258         (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
22259         (-[WebSubresourceLoader willSendRequest:redirectResponse:]):
22260         * WebView/WebDataSource.m:
22261         (-[WebDataSource isLoading]):
22262         * WebView/WebFrame.m:
22263         (-[WebFrame _loadDataSource:withLoadType:formState:]):
22264         (-[WebFrame _subframeIsLoading]):
22265         * WebView/WebView.m:
22266         (-[WebView initWithFrame:]):
22267         (-[WebView initWithFrame:frameName:groupName:]):
22268
22269 2006-04-26  Tim Omernick  <timo@apple.com>
22270
22271         Reviewed by Geoff.
22272
22273         <rdar://problem/4525105> Repro TOT crash in [WebBaseNetscapePluginView dealloc] at coachella.com
22274         <http://bugs.webkit.org/show_bug.cgi?id=8564> crashed when closing a tab
22275
22276         * WebView/WebFrame.m:
22277         (-[WebFramePrivate dealloc]):
22278         Assert that plugInViews has been released.
22279         (-[WebFrame _addPlugInView:]):
22280         New method.  Adds the plug-in view to the plugInViews set and calls -setWebFrame: on it.
22281         (-[WebFrame _removeAllPlugInViews]):
22282         New method.  Calls -setWebFrame:nil on all plug-in views and releases the plugInViews set.
22283         (-[WebFrame _willCloseURL]):
22284         New method.  Dispose of plug-in views when leaving a page (or closing the WebView).
22285
22286         * WebView/WebFrameInternal.h:
22287         Declared -_addPlugInView:, -_removeAllPlugInViews, -_willCloseURL
22288
22289         * WebCoreSupport/WebFrameBridge.m:
22290         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
22291         Call -[WebFrame _addPlugInView:] instead of directly setting plug-in views' frames.  This
22292         allows us to keep track of them so that we can explicitly dispose of them when leaving the page.
22293         (-[WebFrameBridge closeURL]):
22294         Override -[WebCoreFrameBridge closeURL] so that we can perform our own teardown when leaving
22295         a page or closing the WebView.
22296
22297         * Plugins/WebBaseNetscapePluginView.h:
22298         Declared -stop so that subclass WebNetscapePluginEmbeddedView can call it.
22299
22300         * Plugins/WebNetscapePluginEmbeddedView.m:
22301         (-[WebNetscapePluginEmbeddedView setWebFrame:]):
22302         Stop the plug-in when it is removed from its WebFrame.
22303
22304 2006-04-25  Tim Omernick  <timo@apple.com>
22305
22306         Reviewed by John Sullivan.
22307
22308         <rdar://problem/4472035> SPI that checks for URL policy fails in plugin documents
22309
22310         * Plugins/WebPluginController.h:
22311         * Plugins/WebPluginController.m:
22312         (-[WebPluginController URLPolicyCheckReferrer]):
22313         New method.  Get the referrer from the frame's data source's NSURLResponse.  Note that for
22314         document types loaded by WebCore, this URL is the same as -[WebCorePageBridge referrer],
22315         since the response URL is what we pass to -[WebCorePageBridge openURL:].
22316
22317         * Plugins/WebPluginContainerCheck.m:
22318         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
22319         Use the WebPluginController's -URLPolicyCheckReferrer instead of assuming that the bridge's
22320         -referrer is valid.  -[WebCorePageBridge referrer] is only set during the normal WebCore page
22321         load process, which has nothing to do with loading standalone plugin documents.
22322
22323 2006-04-25  Tim Omernick  <timo@apple.com>
22324
22325         Reviewed by Eric.
22326
22327         <rdar://problem/4526052> intermittent assertion failure in -[WebBasePluginPackage dealloc]
22328         running layout tests
22329
22330         * Plugins/WebPluginPackage.m:
22331         (-[WebPluginPackage unload]):
22332         Clear isLoaded here.  It turns out that only WebNetscapePluginPackage cleared its isLoaded
22333         flag in -unload.  We need to also do it here, because the superclass (WebBasePluginPackage)
22334         asserts in -dealloc that -unload has been called.
22335
22336 2006-04-25  Tim Omernick  <timo@apple.com>
22337
22338         Reviewed by Eric.
22339
22340         <rdar://problem/4526120> -[WebBasePluginPackage finalize] leaks the CFBundle (under GC only)
22341
22342         * Plugins/WebBasePluginPackage.m:
22343         (-[WebBasePluginPackage finalize]):
22344         Release the CFBundle here.
22345
22346 2006-04-25  Tim Omernick  <timo@apple.com>
22347
22348         Reviewed by Geoff.
22349
22350         <rdar://problem/4472037>
22351         
22352         Private extensions to the WebPlugin interface.  A plugin may implement these methods to receive loading callbacks
22353         for its main resource.  Plug-ins that implement this SPI show better loading progress in the browser, can be saved
22354         to disk, and are more efficient by avoiding making duplicate GET or POST requests for the plug-in's main resource.
22355
22356         I want to provide a solid API for plug-in networking, but time constraints require that I first provide this simple
22357         SPI for internal clients.
22358
22359         * Plugins/WebPluginViewFactoryPrivate.h:
22360         Added a new plugin argument, WebPlugInShouldLoadMainResourceKey.  If YES, the plugin is responsible
22361         for loading its own content.  If NO, the plugin should wait for WebKit to send it the data via the
22362         new request-sharing SPI.
22363
22364         * Plugins/WebPluginPrivate.h: Added.
22365         Request-sharing SPI.  See comments in code.
22366
22367         * Plugins/WebPluginDocumentView.h:
22368         Hang onto the plugin view as an ivar so we can call the new resource loading methods on it.
22369         * Plugins/WebPluginDocumentView.m:
22370         (-[WebPluginDocumentView dealloc]):
22371         Release pluginView ivar.
22372         (-[WebPluginDocumentView setDataSource:]):
22373         Pass NO for WebPlugInShouldLoadMainResourceKey to indicate to the plugin that it should not 
22374         load its own main resource -- the data will come from WebKit.  This is only necessary for plugin
22375         documents.  By the time we create the view for a plugin document, we already have fetched some
22376         of its main resource's data.  Embedded plugins do not have this issue because WebKit is not
22377         involved in loading their content.
22378         Call -webPlugInMainResourceDidReceivResponse: on the plugin if necessary.  This lets the plugin
22379         know how much and what kind of data is going to be received.
22380         (-[WebPluginDocumentView dataSourceUpdated:]):
22381         If the plugin implements the new request-sharing SPI, don't cancel the in-progress request.
22382         (-[WebPluginDocumentView receivedData:withDataSource:]):
22383         Forward to the plugin via the new request-sharing SPI.
22384         (-[WebPluginDocumentView receivedError:withDataSource:]):
22385         ditto
22386         (-[WebPluginDocumentView finishedLoadingWithDataSource:]):
22387         ditto
22388
22389         * Plugins/WebPluginPackage.m:
22390         Added WebPlugInShouldLoadMainResourceKey, tweaked some style a bit.
22391
22392         * WebCoreSupport/WebFrameBridge.m:
22393         (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]):
22394         Pass YES for WebPlugInShouldLoadMainResourceKey.  Embedded plugins must load their own data.
22395         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
22396         ditto
22397         
22398         * WebKit.xcodeproj/project.pbxproj:
22399         Added WebPluginPrivate.h
22400
22401 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
22402
22403         Reviewed by Geoff.
22404         
22405         <rdar://problem/4525364> REGRESSION (yesterday?): LOG() mechanism is broken
22406         
22407         - initialize WebKit's log channels
22408
22409         * Misc/WebKitLogging.h:
22410         * Misc/WebKitLogging.m:
22411         (initializeLogChannel):
22412         (WebKitInitializeLoggingChannelsIfNecessary):
22413         * WebView/WebPreferences.m:
22414         (+[WebPreferences initialize]):
22415         * WebView/WebView.m:
22416         (-[WebView _commonInitializationWithFrameName:groupName:]):
22417
22418 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
22419
22420         Build fix:
22421         
22422         - move some prematurely moved code back
22423
22424         * WebCoreSupport/WebFrameBridge.h:
22425         * WebCoreSupport/WebFrameBridge.m:
22426         (-[WebFrameBridge fini]):
22427         (-[WebFrameBridge _preferences]):
22428         (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
22429         (-[WebFrameBridge keyboardUIMode]):
22430
22431 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
22432
22433         Reviewed by Darin.
22434
22435         - move more code from WebFrameBridge to WebCoreFrameBridge
22436
22437         * WebCoreSupport/WebFrameBridge.h:
22438         * WebCoreSupport/WebFrameBridge.m:
22439         (-[WebFrameBridge fini]):
22440         (-[WebFrameBridge expiresTimeForResponse:]):
22441         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
22442         (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
22443         (-[WebFrameBridge valueForKey:keys:values:]):
22444         (-[WebFrameBridge _preferences]):
22445
22446 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
22447
22448         Reviewed by Anders.
22449         
22450         - Remove use of _webSuperviewOfClass: and related
22451         http://bugs.webkit.org/show_bug.cgi?id=8562
22452         
22453         I removed all use of these, now objects get at each other via
22454         actual pointers, not using the view hierarchy. However, I left two
22455         of the calls in because other clients rely on them as SPI (ugh).
22456
22457         * History/WebHistoryItem.m:
22458         * Misc/WebNSViewExtras.h:
22459         * Misc/WebNSViewExtras.m:
22460         (-[NSView _web_superviewOfClass:]):
22461         (-[NSView _web_parentWebFrameView]):
22462         * Plugins/WebNetscapePluginDocumentView.m:
22463         (-[WebNetscapePluginDocumentView layout]):
22464         * Plugins/WebNetscapePluginEmbeddedView.h:
22465         * Plugins/WebNetscapePluginEmbeddedView.m:
22466         (-[WebNetscapePluginEmbeddedView setWebFrame:]):
22467         (-[WebNetscapePluginEmbeddedView dataSource]):
22468         * Plugins/WebNullPluginView.h:
22469         * Plugins/WebNullPluginView.m:
22470         (-[WebNullPluginView setWebFrame:]):
22471         (-[WebNullPluginView viewDidMoveToWindow]):
22472         * Plugins/WebPluginController.h:
22473         * Plugins/WebPluginController.m:
22474         (-[WebPluginController setDataSource:]):
22475         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
22476         (-[WebPluginController webPlugInContainerShowStatus:]):
22477         (-[WebPluginController webPlugInContainerSelectionColor]):
22478         (-[WebPluginController webFrame]):
22479         * Plugins/WebPluginDocumentView.h:
22480         * Plugins/WebPluginDocumentView.m:
22481         (-[WebPluginDocumentView setDataSource:]):
22482         (-[WebPluginDocumentView layout]):
22483         (-[WebPluginDocumentView currentWindow]):
22484         (-[WebPluginDocumentView viewWillMoveToWindow:]):
22485         * WebCoreSupport/WebFrameBridge.m:
22486         (-[WebFrameBridge formControlIsBecomingFirstResponder:]):
22487         (-[WebFrameBridge formControlIsResigningFirstResponder:]):
22488         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
22489         * WebCoreSupport/WebViewFactory.m:
22490         (-[WebViewFactory bridgeForView:]):
22491         * WebView/WebClipView.m:
22492         (-[NSView initWithFrame:]):
22493         * WebView/WebFrameView.m:
22494         (-[WebFrameView _shouldDrawBorder]):
22495         (-[WebFrameView webCoreBridge]):
22496         * WebView/WebHTMLView.m:
22497         (-[WebTextCompleteController dealloc]):
22498         (-[WebHTMLView _dataSource]):
22499         (-[WebHTMLView _bridge]):
22500         (-[WebHTMLView _webView]):
22501         (-[WebHTMLView _frameView]):
22502         (-[WebHTMLView _web_firstResponderCausesFocusDisplay]):
22503         (-[WebHTMLView becomeFirstResponder]):
22504         (-[WebHTMLView setDataSource:]):
22505         (-[WebHTMLView pageUp:]):
22506         (-[WebHTMLView pageDown:]):
22507         (-[WebHTMLView pageUpAndModifySelection:]):
22508         (-[WebHTMLView pageDownAndModifySelection:]):
22509         (-[WebHTMLView _frame]):
22510         * WebView/WebHTMLViewInternal.h:
22511         * WebView/WebImageView.h:
22512         * WebView/WebImageView.m:
22513         (-[WebImageView drawRect:]):
22514         (-[WebImageView adjustFrameSize]):
22515         (-[WebImageView setDataSource:]):
22516         (-[WebImageView webView]):
22517         (-[WebImageView writeImageToPasteboard:types:]):
22518         (-[WebImageView copy:]):
22519         (-[WebImageView elementAtPoint:]):
22520         (-[WebImageView mouseDragged:]):
22521         * WebView/WebPDFView.h:
22522         * WebView/WebPDFView.m:
22523         (-[WebPDFView _applyPDFDefaults]):
22524         (-[WebPDFView _trackFirstResponder]):
22525         (-[PDFPrefUpdatingProxy forwardInvocation:]):
22526         * WebView/WebRenderNode.m:
22527         (-[WebRenderNode initWithWebFrameView:]):
22528         * WebView/WebTextView.h:
22529         * WebView/WebTextView.m:
22530         (-[WebTextView _textSizeMultiplierFromWebView]):
22531         (-[WebTextView _preferences]):
22532         (-[WebTextView setDataSource:]):
22533         (-[WebTextView _webFrame]):
22534         (-[WebTextView dragSelectionWithEvent:offset:slideBack:]):
22535         (-[WebTextView menuForEvent:]):
22536         (-[WebTextView resignFirstResponder]):
22537         (-[WebTextView drawPageBorderWithSize:]):
22538         (-[WebTextView knowsPageRange:]):
22539         * WebView/WebView.m:
22540         (-[WebView searchFor:direction:caseSensitive:wrap:]):
22541         (containingFrameView):
22542         (-[WebView _focusedFrame]):
22543         (-[WebView _frameViewAtWindowPoint:]):
22544
22545 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
22546
22547         Reviewed by Darin.
22548         
22549         - push WebFileButton and WebStringTruncator code down to WebCore
22550         http://bugs.webkit.org/show_bug.cgi?id=8552
22551
22552         * Misc/WebStringTruncator.m:
22553         (+[WebStringTruncator centerTruncateString:toWidth:]):
22554         (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
22555         (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
22556         (+[WebStringTruncator widthOfString:font:]):
22557         * WebCoreSupport/WebFileButton.h: Removed.
22558         * WebCoreSupport/WebFileButton.m: Removed.
22559         * WebCoreSupport/WebFrameBridge.h:
22560         * WebCoreSupport/WebFrameBridge.m:
22561         (-[WebFrameBridge runOpenPanelForFileButtonWithResultListener:]):
22562         * WebCoreSupport/WebViewFactory.m:
22563         (-[WebViewFactory fileButtonChooseFileLabel]):
22564         (-[WebViewFactory fileButtonNoFileSelectedLabel]):
22565         * WebKit.xcodeproj/project.pbxproj:
22566
22567 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
22568
22569         Reviewed by Eric.
22570         
22571         - remove WebCookieAdapter, WebCore can just use Foundation directly.
22572
22573         * WebCoreSupport/WebCookieAdapter.h: Removed.
22574         * WebCoreSupport/WebCookieAdapter.m: Removed.
22575         * WebKit.xcodeproj/project.pbxproj:
22576         * WebView/WebFrameView.m:
22577         (-[WebFrameView initWithFrame:]):
22578
22579 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
22580
22581         Reviewed by Adele.
22582         
22583         - prune WebView SPI of unused calls
22584         
22585         Specifically I moved methods that have no callers outside WebKit
22586         to WebViewInternal.h or removed them entirely.
22587
22588         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
22589         * Plugins/WebBaseNetscapePluginView.m:
22590         * Plugins/WebNetscapePluginDocumentView.m:
22591         * Plugins/WebNetscapePluginStream.m:
22592         * Plugins/WebNullPluginView.m:
22593         * Plugins/WebPluginContainerCheck.m:
22594         * Plugins/WebPluginController.m:
22595         * WebCoreSupport/WebFrameBridge.m:
22596         * WebCoreSupport/WebPageBridge.m:
22597         * WebCoreSupport/WebSubresourceLoader.m:
22598         * WebView/WebDataSource.m:
22599         * WebView/WebHTMLView.m:
22600         * WebView/WebImageView.m:
22601         * WebView/WebLoader.m:
22602         * WebView/WebMainResourceLoader.m:
22603         * WebView/WebPDFView.m:
22604         * WebView/WebScriptDebugDelegate.m:
22605         * WebView/WebView.m:
22606         (-[WebView _downloadURL:]):
22607         * WebView/WebViewInternal.h:
22608         * WebView/WebViewPrivate.h:
22609
22610 2006-04-22  Maciej Stachowiak  <mjs@apple.com>
22611
22612         Reviewed by Eric.
22613
22614         - remove WebKit copy of assertions code, use the assertions
22615         stuff from JavaScriptCore instead.
22616
22617         * Carbon/HIViewAdapter.m:
22618         * DOM/WebDOMOperations.m:
22619         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
22620         * DefaultDelegates/WebDefaultPolicyDelegate.m:
22621         (-[WebDefaultPolicyDelegate webView:unableToImplementPolicyWithError:frame:]):
22622         * History/WebBackForwardList.m:
22623         * History/WebHistory.m:
22624         (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
22625         (-[WebHistoryPrivate _saveHistoryGuts:URL:error:]):
22626         * History/WebHistoryItem.m:
22627         * Misc/WebAssertions.h: Removed.
22628         * Misc/WebAssertions.m: Removed.
22629         * Misc/WebDatabase.m:
22630         * Misc/WebDownload.m:
22631         * Misc/WebFileDatabase.m:
22632         (SetThreadPriority):
22633         * Misc/WebIconDatabase.m:
22634         (-[NSMutableDictionary iconForURL:withSize:cache:]):
22635         (-[NSMutableDictionary releaseIconForURL:]):
22636         (-[NSMutableDictionary delayDatabaseCleanup]):
22637         (-[NSMutableDictionary allowDatabaseCleanup]):
22638         (-[WebIconDatabase _loadIconDictionaries]):
22639         (-[WebIconDatabase _updateFileDatabase]):
22640         (-[WebIconDatabase _iconsBySplittingRepresentationsOfIcon:]):
22641         * Misc/WebIconLoader.m:
22642         * Misc/WebKitLogging.h:
22643         * Misc/WebKitLogging.m:
22644         * Misc/WebKitSystemBits.m:
22645         (initCapabilities):
22646         * Misc/WebLRUFileList.m:
22647         (WebLRUFileListRemoveOldestFileFromList):
22648         (WebLRUFileListGetFileSize):
22649         * Misc/WebLocalizableStrings.m:
22650         * Misc/WebNSCalendarDateExtras.m:
22651         * Misc/WebNSDataExtras.m:
22652         * Misc/WebNSDictionaryExtras.m:
22653         * Misc/WebNSFileManagerExtras.m:
22654         * Misc/WebNSPasteboardExtras.m:
22655         * Misc/WebNSURLExtras.m:
22656         (hexDigit):
22657         (hexDigitValue):
22658         (allCharactersInIDNScriptWhiteList):
22659         * Misc/WebNSURLRequestExtras.m:
22660         * Misc/WebNSUserDefaultsExtras.m:
22661         * Misc/WebStringTruncator.m:
22662         * Panels/WebAuthenticationPanel.m:
22663         (-[WebAuthenticationPanel loadNib]):
22664         * Panels/WebPanelAuthenticationHandler.m:
22665         * Plugins/WebBaseNetscapePluginStream.m:
22666         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
22667         (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
22668         * Plugins/WebBaseNetscapePluginView.m:
22669         (TSMEventHandler):
22670         (-[WebBaseNetscapePluginView start]):
22671         (-[WebBaseNetscapePluginView status:]):
22672         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
22673         * Plugins/WebBasePluginPackage.m:
22674         * Plugins/WebNetscapePluginDocumentView.m:
22675         * Plugins/WebNetscapePluginPackage.m:
22676         (-[WebNetscapePluginPackage load]):
22677         * Plugins/WebNetscapePluginRepresentation.m:
22678         * Plugins/WebPluginContainerCheck.m:
22679         * Plugins/WebPluginController.m:
22680         (-[WebPluginController addPlugin:]):
22681         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
22682         (-[WebPluginController webPlugInContainerShowStatus:]):
22683         * Plugins/WebPluginDatabase.m:
22684         * Plugins/WebPluginDocumentView.m:
22685         * WebCoreSupport/WebCookieAdapter.m:
22686         * WebCoreSupport/WebFileButton.m:
22687         * WebCoreSupport/WebFrameBridge.m:
22688         (-[WebFrameBridge runModal]):
22689         * WebCoreSupport/WebImageData.m:
22690         (-[WebImageData _checkSolidColor:]):
22691         (-[WebImageData tileInRect:fromPoint:context:]):
22692         (-[WebImageData scaleAndTileInRect:fromRect:withHorizontalTileRule:withVerticalTileRule:context:]):
22693         * WebCoreSupport/WebImageDecoder.m:
22694         * WebCoreSupport/WebImageRenderer.m:
22695         (-[WebImageRenderer TIFFRepresentation]):
22696         * WebCoreSupport/WebImageRendererFactory.m:
22697         * WebCoreSupport/WebJavaScriptTextInputPanel.m:
22698         * WebCoreSupport/WebKeyGenerator.m:
22699         * WebCoreSupport/WebPageBridge.m:
22700         * WebCoreSupport/WebSubresourceLoader.m:
22701         * WebCoreSupport/WebTextRenderer.m:
22702         (widthForGlyph):
22703         (-[WebTextRenderer initWithFont:]):
22704         (drawGlyphs):
22705         (initializeATSUStyle):
22706         (createATSULayoutParameters):
22707         (getTextBounds):
22708         (ATSU_draw):
22709         * WebCoreSupport/WebTextRendererFactory.m:
22710         * WebCoreSupport/WebViewFactory.m:
22711         * WebKit.exp:
22712         * WebKit.xcodeproj/project.pbxproj:
22713         * WebKitPrefix.h:
22714         * WebView/WebArchiver.m:
22715         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
22716         * WebView/WebClipView.m:
22717         * WebView/WebDataProtocol.m:
22718         * WebView/WebDataSource.m:
22719         (-[WebDataSource _startLoading]):
22720         * WebView/WebFormDataStream.m:
22721         (formEventCallback):
22722         (webSetHTTPBody):
22723         * WebView/WebFrame.m:
22724         (-[WebFrame _transitionToCommitted:]):
22725         * WebView/WebFrameView.m:
22726         * WebView/WebHTMLRepresentation.m:
22727         * WebView/WebHTMLView.m:
22728         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
22729         (-[WebHTMLView drawSingleRect:]):
22730         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
22731         (-[WebHTMLView _scaleFactorForPrintOperation:]):
22732         (-[WebHTMLView deleteBackwardByDecomposingPreviousCharacter:]):
22733         (-[WebHTMLView checkSpelling:]):
22734         (-[WebHTMLView showGuessPanel:]):
22735         (-[WebHTMLView _changeSpellingToWord:]):
22736         (-[WebHTMLView ignoreSpelling:]):
22737         (-[WebHTMLView performFindPanelAction:]):
22738         (-[WebTextCompleteController doCompletion]):
22739         * WebView/WebImageView.m:
22740         * WebView/WebLoader.m:
22741         (-[NSURLProtocol connection:willCacheResponse:]):
22742         * WebView/WebPDFRepresentation.m:
22743         (+[WebPDFRepresentation PDFDocumentClass]):
22744         * WebView/WebPDFView.m:
22745         (+[WebPDFView PDFKitBundle]):
22746         (+[WebPDFView PDFViewClass]):
22747         (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
22748         * WebView/WebTextRepresentation.m:
22749         * WebView/WebTextView.m:
22750         * WebView/WebUnarchivingState.m:
22751         * WebView/WebView.m:
22752
22753 2006-04-22  Timothy Hatcher  <timothy@apple.com>
22754
22755         Reviewed by Eric.
22756
22757         http://bugs.webkit.org/show_bug.cgi?id=8514
22758         Bug 8514: Web Inspector hides when the app is in the background
22759
22760         Makes the inspector not hide in the background. Since the inspector is a floating panel
22761         we need to call setFloatingPanel:NO when the app is switching into the background. Then
22762         call setFloatingPanel:YES when the app is activated again. Without this the inspector
22763         would float above all applications.
22764
22765         * WebInspector/WebInspector.m:
22766         (-[NSWindow window]): setHidesOnDeactivate:NO
22767         (-[NSWindow windowWillClose:]): de-regiser appliction active notifications
22768         (-[NSWindow showWindow:]): register for appliction active notifications
22769         (-[WebInspector _applicationWillResignActive]): setFloatingPanel:NO
22770         (-[WebInspector _applicationDidBecomeActive]): setFloatingPanel:YES
22771
22772 2006-04-21  Adele Peterson  <adele@apple.com>
22773
22774         Reviewed by Darin.
22775
22776         - Fix for http://bugs.webkit.org/show_bug.cgi?id=8181
22777         REGRESSION: After tabbing in page's field, attempting to tab from Google toolbar search to page fails on first try
22778
22779         Test: manual-tests/tabbing-input-google.html
22780
22781         * WebView/WebHTMLView.m: (-[WebHTMLView resignFirstResponder]):
22782         When resigning first responder, reset willBecomeFirstResponderForNodeFocus, so when the WebHTMLView gets focus again
22783         it knows it can start moving through the tab cycle.
22784
22785 2006-04-20  Tim Omernick  <timo@apple.com>
22786
22787         Reviewed by John Sullivan.
22788
22789         <rdar://problem/4476875> Support printing for embedded Netscape plugins
22790
22791         NOTE: This only works with the Flash plugin right now.  It appears that the other
22792         major plugins either have awful printing support, or no printing support.  If someone
22793         can find an example of any other embedded Netscape plugin printing in any browser on
22794         the Mac, I will be happy to eat my own words!
22795
22796         * Plugins/WebBaseNetscapePluginView.m:
22797         (-[WebBaseNetscapePluginView drawRect:]):
22798         When printing, get the printed bitmap via -_printedPluginBitmap, and draw it into the
22799         plugin view.
22800         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
22801         Call NPP_Print on the plugin to render it into a GWorld.  This GWorld has the same
22802         underlying buffer as an NSBitmapImageRep, which is returned to the caller.
22803
22804 2006-04-20 Mitz Pettel  <opendarwin.org@mitzpettel.com>
22805
22806         Reviewed by Darin.
22807
22808         WebKit part of:
22809         - fix http://bugs.webkit.org/show_bug.cgi?id=8276
22810           REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
22811             a file: URL being pasted instead of just the file name
22812         - fix http://bugs.webkit.org/show_bug.cgi?id=8283
22813           REGRESSION: File's path doesn't appear after dragging file into input field
22814
22815         * WebView/WebHTMLView.m:
22816         (-[WebHTMLView _plainTextFromPasteboard:]): Added method that tries to copy AppKit
22817         text fields' logic for extracting plain text from the pasteboard.
22818         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Added helper method.
22819         (-[WebHTMLView _shouldInsertText:replacingDOMRange:givenAction:]):
22820         (-[WebHTMLView _shouldReplaceSelectionWithText:givenAction:]):
22821         (-[WebHTMLView readSelectionFromPasteboard:]): Paste as plain text if
22822         rich text is not allowed.
22823         (-[WebHTMLView validateUserInterfaceItem:]): Changed to not allow pasteAsRichText:
22824         if the paste is not going to be handled by the DOM and the selection
22825         does not allow pasting rich text.
22826         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Paste as plain text if
22827         rich text is not allowed.
22828         (-[WebHTMLView paste:]): Ditto.
22829         (-[WebHTMLView pasteAsPlainText:]):
22830
22831 2006-04-20  Darin Adler  <darin@apple.com>
22832
22833         Reviewed by Adele.
22834
22835         - WebKit part of http://bugs.webkit.org/show_bug.cgi?id=8505
22836           eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
22837
22838         * WebCoreSupport/WebGraphicsBridge.h: Removed.
22839         * WebCoreSupport/WebGraphicsBridge.m: Removed.
22840         * WebCoreSupport/WebSystemInterface.h: Added.
22841         * WebCoreSupport/WebSystemInterface.m: Added.
22842
22843         * WebKit.xcodeproj/project.pbxproj: Updated for removed and added files.
22844
22845         * WebCoreSupport/WebImageData.m: Removed unneeded include of WebGraphicsBridge.h.
22846         * WebCoreSupport/WebImageRenderer.m: Ditto.
22847         * WebCoreSupport/WebTextRenderer.m: Ditto.
22848
22849         * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Guarded all the one-time
22850         initialization inside a boolean, just in case some things take a little time. Added
22851         a call to InitWebCoreSystemInterface to the one-time initialization here. Later, we
22852         will need to add it in some other places if we call code that requires the use of
22853         WebCoreSystemInterface functions from anywhere that can be invoked before creations
22854         of the first WebFrameView, but for now there is no need.
22855
22856 2006-04-19  James G. Speth  <speth@end.com>
22857
22858         Reviewed by Timothy.
22859
22860         http://bugs.webkit.org/show_bug.cgi?id=8442
22861         Bug 8442: improvements to Cocoa bindings support in WebView - code simplification
22862
22863         Removes the WebController class added earlier; changes NSTreeController and 
22864         WebView to together without it. Now you can just bind the contentObject binding
22865         of the tree controller directly to the mainFrameDocument key of the WebView.
22866
22867         * WebCoreSupport/WebFrameBridge.m:
22868         (-[WebFrameBridge windowObjectCleared]):
22869         * WebView/WebDataSource.m:
22870         (-[WebDataSource _setTitle:]):
22871         * WebView/WebFrame.m:
22872         (-[WebFrame _closeOldDataSources]):
22873         * WebView/WebView.m:
22874         (-[WebView _progressStarted:]):
22875         (-[WebView _finalProgressComplete]):
22876         (-[WebView _commonInitializationWithFrameName:groupName:]):
22877         (-[WebView setMainFrameDocumentReady:]):
22878         (-[WebView mainFrameDocument]):
22879         * WebView/WebViewPrivate.h:
22880
22881 2006-04-19  James G. Speth  <speth@end.com>
22882
22883         Reviewed by Timothy.
22884
22885         http://bugs.webkit.org/show_bug.cgi?id=6635
22886         Bug 6635: Crash selecting inspector nodes for tabs that aren't foremost
22887
22888         Stop observing window will close notifications before we tell the highlight window to close,
22889         this prevents the crash. Also prevent drawing highlights for hidden tabs.
22890
22891         * WebInspector/WebInspector.m:
22892         (-[WebInspector _highlightNode:]):
22893         * WebInspector/WebNodeHighlight.m:
22894         (-[WebNodeHighlight expire]):
22895
22896 2006-04-19  James G. Speth  <speth@end.com>
22897
22898         Reviewed by Timothy.
22899
22900         http://bugs.webkit.org/show_bug.cgi?id=6637
22901         Bug 6637: selecting node in Inspector after closing window crashes Safari
22902
22903         When the window the Web Inspector was inspecting is closed, the inspector goes into its
22904         no-selection state. Choosing to inspect another element activates it again. The inspector
22905         will also follow the WebView if the URL changes and select the root element on the new page.
22906
22907         * WebInspector/WebInspector.m:
22908         (-[NSWindow setWebFrame:]):
22909         (-[NSWindow setRootDOMNode:]):
22910         (-[WebInspector _revealAndSelectNodeInTree:]):
22911         (-[WebInspector _update]):
22912         (-[WebInspector _updateRoot]):
22913         (-[WebInspector inspectedWebViewProgressFinished:]):
22914         (-[WebInspector inspectedWindowWillClose:]):
22915         (-[WebInspector webView:didFinishLoadForFrame:]):
22916         * WebInspector/WebInspectorPanel.m:
22917         (-[WebInspectorPanel canBecomeMainWindow]):
22918
22919 2006-04-18  Darin Adler  <darin@apple.com>
22920
22921         Reviewed by Beth.
22922
22923         * WebInspector/webInspector/inspector.css: Add "-webkit-" prefixes to the border
22924         radius properties to make the corners rounded again.
22925
22926 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
22927
22928         Reviewed by Darin.
22929
22930         - WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=8324
22931           REGRESSION: textarea :focus not applied immediately
22932
22933         * WebCoreSupport/WebFrameBridge.m:
22934         (-[WebFrameBridge formControlIsBecomingFirstResponder:]): Added. Calls the ancestor
22935         WebHTMLView's _formControlIsBecomingFirstResponder:
22936         * WebView/WebHTMLView.m:
22937         (-[WebHTMLView _updateFocusState:]): If a descendant is becoming first responder,
22938         enable focused appearance.
22939         (-[WebHTMLView _formControlIsBecomingFirstResponder:]): Added. Calls _updateFocusState,
22940         causing the frame to display with focus attributes.
22941         * WebView/WebHTMLViewInternal.h:
22942
22943 2006-04-14  James G. Speth  <speth@end.com>
22944
22945         Reviewed by Timothy.
22946
22947         Bug 8389: support for Cocoa bindings - binding an NSTreeController to the WebView's DOM
22948         http://bugs.webkit.org/show_bug.cgi?id=8389
22949
22950         Added a controller class, WebController, that is a subclass of
22951         NSTreeController that has a new outlet/binding for the WebView.
22952
22953         * WebCoreSupport/WebFrameBridge.m:
22954         (-[WebFrameBridge windowObjectCleared]): notify bindings about the document change
22955         * WebView/WebView.m:
22956         (-[WebView _progressStarted:]): notify bindings about the document change
22957         (-[WebView _finalProgressComplete]): notify bindings about the document change
22958         (-[WebView _declaredKeys]): added a key for the main frame document
22959         (-[WebController init]):
22960         (-[WebController exposedBindings]):
22961         (-[WebController valueClassForBinding:]):
22962         (-[WebController setContent:]):
22963         (-[WebController webView]):
22964         (-[WebController setWebView:]):
22965         (-[WebView mainFrameDocument]): get the main frame's DOMDocument
22966         * WebView/WebViewPrivate.h: Adds mainFrameDocument to pending public.
22967
22968 2006-04-12  David Harrison  <harrison@apple.com>
22969
22970         Reviewed by Darin.
22971         
22972         <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
22973         <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app
22974         
22975         (see related changes in WebCore)
22976         
22977         Tests added:
22978         * editing/selection/extend-by-sentence-001.html: Added.
22979         * fast/dom/inner-text-001.html: Added.
22980
22981         * WebView/WebHTMLView.m:
22982         (-[WebHTMLView validateUserInterfaceItem:]):
22983         (-[WebHTMLView moveToBeginningOfSentence:]):
22984         (-[WebHTMLView moveToBeginningOfSentenceAndModifySelection:]):
22985         (-[WebHTMLView moveToEndOfSentence:]):
22986         (-[WebHTMLView moveToEndOfSentenceAndModifySelection:]):
22987         (-[WebHTMLView selectSentence:]):
22988         * WebView/WebView.m:
22989         * WebView/WebViewPrivate.h:
22990         Add sentence navigation and selection.
22991
22992 2006-04-12  Tim Omernick  <timo@apple.com>
22993
22994         Reviewed by Darin.
22995
22996         Part of <rdar://problem/4482530>
22997
22998         * WebView/WebView.m:
22999         (-[WebView _focusedFrame]):
23000         Fixed up the logic here to take into account immediate subviews of WebView, which are not actually in a WebFrameView
23001         (they are peers to the main frame's WebFrameView).
23002
23003 2006-04-10  John Sullivan  <sullivan@apple.com>
23004
23005         Reviewed by Tim Omernick.
23006         
23007         - fixed <rdar://problem/4139799> Seed: Safari: Private Browsing leaves traces in Icon Cache
23008         
23009         * Misc/WebIconDatabasePrivate.h:
23010         new ivars: pageURLsBoundDuringPrivateBrowsing, iconURLsBoundDuringPrivateBrowsing, and privateBrowsingEnabled
23011
23012         * Misc/WebIconDatabase.m:
23013         (-[NSMutableDictionary init]):
23014         initialize new ivars, and listen for notifications that WebPreferences changed so we can react to changes
23015         to private browsing.
23016         (-[NSMutableDictionary iconForURL:withSize:cache:]):
23017         Don't remove icon URL from extraRetain dictionary; that's now done in _forgetIconForIconURLString. (I left a
23018         comment here earlier about why I was worried about this change, but I convinced myself that it's fine.)
23019         (-[WebIconDatabase removeAllIcons]):
23020         Removed no-longer-true (and never very clear) comment, and braces. Also remove all objects from the two
23021         private-browsing-related dictionaries.
23022         (-[WebIconDatabase _setIcon:forIconURL:]):
23023         remember icon URL if private browsing is enabled
23024         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
23025         remember icon URL if private browsing is enabled
23026         (-[WebIconDatabase _setIconURL:forURL:]):
23027         added an assert that helped me out at one point
23028         (-[WebIconDatabase _clearDictionaries]):
23029         clear the two new dictionaries too
23030         (-[WebIconDatabase _loadIconDictionaries]):
23031         made an existing ERROR not fire in the expected case where there are no icons at all on disk
23032         (-[WebIconDatabase _updateFileDatabase]):
23033         when saving the pageURLToIconURL dictionary to disk, first remove any values that were created during
23034         private browsing
23035         (-[WebIconDatabase _retainIconForIconURLString:]):
23036         skip the code that deals with saving changes to disk if private browsing is enabled
23037         (-[WebIconDatabase _forgetIconForIconURLString:]):
23038         Remove the icon URL from extraRetain dictionary here. We're forgetting everything about this icon URL
23039         so we should forget its former extraRetain count too.
23040         (-[WebIconDatabase _resetCachedWebPreferences:]):
23041         Cache the new value of private browsing. If it has now been turned off, forget everything we learned
23042         while it was on. This causes (e.g.) icons for bookmarks or pre-existing history items to be forgotten
23043         if the icon was only learned during private browsing.
23044
23045         * History/WebHistoryItem.m:
23046         removed an unnecessary #import I happened to notice
23047         
23048 2006-04-10  David Hyatt  <hyatt@apple.com>
23049
23050         Make the broken CG focus ring painting work when WebCore sets a clip
23051         (in addition to respecting the dirty rect clip).
23052
23053         Reviewed by darin
23054
23055         * WebCoreSupport/WebGraphicsBridge.m:
23056         (-[WebGraphicsBridge drawFocusRingWithPath:radius:color:clipRect:]):
23057
23058 2006-04-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
23059
23060         Reviewed by Darin.
23061
23062         - fix http://bugs.webkit.org/show_bug.cgi?id=8100
23063           REGRESSION (NativeTextField): Right-aligned and RTL text jitters in new text fields
23064
23065         * WebCoreSupport/WebTextRenderer.m:
23066         (overrideLayoutOperation): For RTL runs, apply the word-rounding on the left.
23067         (CG_floatWidthForRun): For RTL runs, apply the last character's rounding
23068         on the left by adjusting the start position.
23069         (initializeWidthIterator): Added finalRoundingWidth field to WidthIterator.
23070         (advanceWidthIterator): For RTL runs, apply rounding on the left of the character,
23071         by increasing the width of the next character (which is the character to the left). For
23072         the last character, keep the rounding width in the iterator's finalRoundingWidth, to be used by
23073         CG_floatWidthForRun().
23074
23075 2006-04-08  John Sullivan  <sullivan@apple.com>
23076
23077         Reviewed by Adele Peterson.
23078
23079         - fixed http://bugs.webkit.org/show_bug.cgi?id=8260
23080         REGRESSION: Assertion failure: ![_private->iconsToSaveWithURLs containsObject:iconURLString] 
23081         in WebIconDatabase.m:695-[WebIconDatabase(WebInternal) _retainIconForIconURLString:]
23082
23083         * Misc/WebIconDatabase.m:
23084         (-[WebIconDatabase _retainIconForIconURLString:]):
23085         This new assertion was one block too high; moved it in.
23086
23087 2006-04-07  David Hyatt  <hyatt@apple.com>
23088
23089         A fix that makes coalesced updates work much better (and makes our
23090         single animated GIF timer work better).  The new rect painting algorithm
23091         for WebHTMLView will use the single unioned rect if the # of rects exceeds
23092         a threshold (10 is my initial cut), or if the union has enough "wasted"
23093         additional pixels (conservatively set at 75%).
23094
23095         Reviewed by darin
23096
23097         * WebView/WebHTMLView.m:
23098         (-[WebHTMLView drawSingleRect:]):
23099         (-[WebHTMLView drawRect:]):
23100
23101 2006-04-07  Maciej Stachowiak  <mjs@apple.com>
23102
23103         Reviewed by Darin.
23104         
23105         - simplify archive loading
23106
23107         * WebView/WebDataSource.m:
23108         (-[WebDataSource representation]): fix whitespace
23109         * WebView/WebHTMLRepresentation.m:
23110         (-[WebHTMLRepresentation loadArchive]): Use WebFrame's loadArchive: instead
23111         of trying to do a manual load here.
23112         (-[WebHTMLRepresentation documentSource]): No more special case for WebArchive.
23113
23114 2006-04-07  John Sullivan  <sullivan@apple.com>
23115
23116         Reviewed by Tim Omernick.
23117         
23118         - fixed <rdar://problem/4507054> If an icon file is removed from disk behind Safari's back, 
23119         Safari will not try to refetch it
23120         
23121         In addition to letting WebIconDatabase recover from disk/memory mismatches as per 4507054, I also found
23122         a bug in the way icons are remembered that could account for some of the other cases where
23123         site icons didn't appear (and you'd get an ERROR on debug builds about WebIconDatabase saying it
23124         had some icon when it really doesn't).
23125
23126         * Misc/WebIconDatabase.m:
23127         (-[WebIconDatabase iconForURL:withSize:cache:]):
23128         When the icon file for a previously-saved site icon isn't found, forget about the darn icon URL thoroughly
23129         so that this situation is self-correcting. Formerly, once you got into this state WebKit would never find
23130         the icon again (short of removing the entire icon database cleanly). Note that this does *not* change
23131         the behavior of sites that didn't have a site icon when WebKit checked -- these will continue to not
23132         return a site icon indefinitely (that's a separate, possibly performance-sensitive issue).
23133         (-[WebIconDatabase _retainIconForIconURLString:]):
23134         This code did the wrong thing in the case where an icon was in the process of being forgotten about. In
23135         that case, the icon would still be in _private->iconsOnDiskWithURLs, so we wouldn't try to save it here,
23136         so the new icon wouldn't stick.
23137
23138 2006-04-07  David Hyatt  <hyatt@apple.com>
23139
23140         Re-enable coalesced updates.  Our move to a single timer has essentially
23141         implemented coalescing of updates anyway, so the regression has already
23142         come back.  Since we have to deal with that now anyway, there's no reason
23143         to visually tear also. :)
23144
23145         Reviewed by darin
23146
23147         * ChangeLog:
23148         * WebView/WebView.m:
23149         (-[WebView _commonInitializationWithFrameName:groupName:]):
23150
23151 2006-04-05  Darin Adler  <darin@apple.com>
23152
23153         - fixed a storage leak from that last check-in
23154
23155         * WebView/WebUnarchivingState.m: (-[WebUnarchivingState dealloc]):
23156         Release the two dictionaries.
23157
23158 2006-04-05  Maciej Stachowiak  <mjs@apple.com>
23159
23160         Reviewed by Eric.
23161         
23162         - start on factoring WebArchive unpacking more into a separate class.
23163         http://bugs.webkit.org/show_bug.cgi?id=8208
23164         
23165         * WebKit.xcodeproj/project.pbxproj:
23166         * WebView/WebDataSource.m:
23167         (-[WebDataSourcePrivate dealloc]):
23168         (-[WebDataSource _addToUnarchiveState:]):
23169         (-[WebDataSource _popSubframeArchiveWithName:]):
23170         (-[WebDataSource _documentFragmentWithArchive:]):
23171         (-[WebDataSource _setupForReplaceByMIMEType:]):
23172         (-[WebDataSource subresourceForURL:]):
23173         * WebView/WebDataSourcePrivate.h:
23174         * WebView/WebFrame.m:
23175         (-[WebFrame _loadRequest:archive:]):
23176         (-[WebFrame loadRequest:]):
23177         (-[WebFrame loadArchive:]):
23178         * WebView/WebFramePrivate.h:
23179         * WebView/WebHTMLRepresentation.m:
23180         (-[WebHTMLRepresentation loadArchive]):
23181         * WebView/WebUnarchivingState.h: Added.
23182         * WebView/WebUnarchivingState.m: Added.
23183         (-[WebUnarchivingState init]):
23184         (-[WebUnarchivingState addArchive:]):
23185         (-[WebUnarchivingState archivedResourceForURL:]):
23186         (-[WebUnarchivingState popSubframeArchiveWithFrameName:]):
23187
23188 2006-04-04  Timothy Hatcher  <timothy@apple.com>
23189
23190         Reviewed by Darin.
23191
23192         The Debug and Release frameworks are now built with install paths relative to the build products directory.
23193         This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore. 
23194
23195         * WebKit.xcodeproj/project.pbxproj:
23196
23197 2006-04-04  John Sullivan  <sullivan@apple.com>
23198
23199         Reviewed by Adele Peterson.
23200
23201         - WebKit part of <rdar://problem/4498418> "Autosaved" searchterms are saved during private browsing
23202
23203         * WebView/WebView.m:
23204         (-[WebView _updateWebCoreSettingsFromPreferences:]):
23205         Pass private browsing setting down to WebCore.
23206
23207 2006-04-03  John Sullivan  <sullivan@apple.com>
23208
23209         Reviewed by Tim Hatcher.
23210         
23211         - re-fixed <rdar://problem/4481198> REGRESSION (TOT): search results list in bookmarks view 
23212         remains when search text is deleted
23213
23214         * WebView/WebView.m:
23215         (-[WebView searchFor:direction:caseSensitive:wrap:]):
23216         I fixed this recently, but then broke it again by adding an early bail-out to this method. So
23217         now I'm removing the early bail-out.
23218
23219 2006-04-02  Trey Matteson  <trey@usa.net>
23220
23221         Reviewed by Maciej.
23222
23223         fix http://bugs.webkit.org/show_bug.cgi?id=8121
23224         REGRESSION: 404s are not displayed
23225
23226         * WebView/WebMainResourceLoader.m:
23227         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
23228         Only cancel failed loads for object elements, not for frames or a whole page.
23229
23230 2006-04-02  Maciej Stachowiak  <mjs@apple.com>
23231
23232         Reviewed by Hyatt.
23233
23234         - fixed <rdar://problem/4198619> REGRESSION: tabbing through links fails after hitting text field w/ sys's "tab to all controls" off
23235         - fixed <rdar://problem/4463760> REGRESSION: Can't tab from old text field (like password fields) to new text field (6811)
23236         (http://bugs.webkit.org/show_bug.cgi?id=6811)
23237         - fixed tab and shift tab don't select the right things
23238         http://bugs.webkit.org/show_bug.cgi?id=5685
23239
23240         * WebCoreSupport/WebFrameBridge.m:
23241         (-[WebFrameBridge willMakeFirstResponderForNodeFocus]): New method
23242         - let WebHTMLView know that the next time it becomes first
23243         responder, it's to change focus within the page and the right node
23244         has already been set, so it should not move focus forward or
23245         backward inside it.
23246         * WebView/WebHTMLView.m:
23247         (-[WebHTMLView needsPanelToBecomeKey]): Override to return YES, oddly enough this
23248         is the right way to tell AppKit that you should be in the tab cycle loop.
23249         (-[WebHTMLView becomeFirstResponder]): Don't move forward or back in tab cycle
23250         when this becomeFirstResponder is for tabbing from a control in the page.
23251         (-[WebHTMLView _willMakeFirstResponderForNodeFocus]): Note that the next
23252         time this view becomes first responder, it will be for in-page focus 
23253         navigation.
23254         * WebView/WebHTMLViewInternal.h:
23255
23256 2006-04-01  Darin Adler  <darin@apple.com>
23257
23258         Reviewed by Maciej.
23259
23260         - fix http://bugs.webkit.org/show_bug.cgi?id=8105
23261           REGRESSION (NativeTextField): Option-delete deletes one space before the deleted word
23262
23263         Test: fast/forms/input-text-option-delete.html
23264
23265         * WebView/WebHTMLView.m:
23266         (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Pass NO for
23267         smartDeleteOK. Smart deletion only applies to deleting a word at a time, and none of
23268         the callers of this function that delete a word at a time want smart deletion.
23269         (-[WebHTMLView deleteToEndOfLine:]): Fixed tiny formatting glitch.
23270
23271 2006-03-31  Timothy Hatcher  <timothy@apple.com>
23272
23273         Reviewed by Darin.
23274
23275         We need to set reachedTerminalState to YES before we release
23276         the resources to prevent a double dealloc of WebView
23277
23278         Fixes <rdar://problem/4372628> crash deallocating a WebView in -[WebFrame stopLoading]
23279
23280         * WebView/WebLoader.m:
23281         (-[NSURLProtocol releaseResources]): set reachedTerminalState earlier
23282
23283 2006-03-31  John Sullivan  <sullivan@apple.com>
23284
23285         Reviewed by Tim Omernick.
23286         
23287         Some cleanup in the WebIconDatabase code in a fruitless search for the cause
23288         of the mysterious -[WebFileDatabase performSetObject:forKey] crash
23289
23290         * Misc/WebIconDatabase.m:
23291         (-[WebIconDatabase _createFileDatabase]):
23292         removed obsolete comment
23293         (-[WebIconDatabase _loadIconDictionaries]):
23294         Added ERRORs for unexpected early returns. Made dictionaries be autoreleased until
23295         the end of the method where they are retained, so that the early returns don't leak;
23296         added ASSERTs that the _private->dictionary values aren't being leaked.
23297         (-[WebIconDatabase _updateFileDatabase]):
23298         Added an ERROR for an unexpected early return, and made a trivial style fix.
23299
23300 2006-03-31  Trey Matteson  <trey@usa.net>
23301
23302         Reviewed by Maciej, landed by ap.
23303
23304         http://bugs.webkit.org/show_bug.cgi?id=7739
23305         REGRESSION: Assertion failure loading acid2 test in -[WebCoreFrameBridge installInFrame:]
23306
23307         Tests: http/tests/misc/acid2.html, http/tests/misc/acid2-pixel.html
23308
23309         The gist of this change is that we must cancel the load from the Webkit side when we
23310         realize we're switching to the fallback content.  This is somewhat a temp workaround
23311         since control of loading will be moving to WebCore.
23312
23313         * WebView/WebMainResourceLoader.m:
23314         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
23315
23316 2006-03-30  Justin Garcia  <justin.garcia@apple.com>
23317
23318         Reviewed by darin
23319         
23320         http://bugs.webkit.org/show_bug.cgi?id=6989
23321         REGRESSION: Plain-text mode needed for contenteditable area used in new text field
23322
23323         * WebView/WebHTMLView.m:
23324         (-[WebHTMLView _canEditRichly]): Added.
23325         (-[WebHTMLView _canIncreaseSelectionListLevel]): Use _canEditRichly
23326         (-[WebHTMLView _canDecreaseSelectionListLevel]): Ditto.
23327         (-[WebHTMLView _increaseSelectionListLevel]):
23328         (-[WebHTMLView _decreaseSelectionListLevel]):
23329         (-[WebHTMLView validateUserInterfaceItem:]): 
23330         Split rich text editing actions off from ones that can be applied anywhere.
23331         (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
23332         (-[WebHTMLView _applyParagraphStyleToSelection:withUndoAction:]):
23333         (-[WebHTMLView _alignSelectionUsingCSSValue:withUndoAction:]):
23334         * WebView/WebHTMLViewPrivate.h:
23335
23336 2006-03-29  Tim Omernick  <timo@apple.com>
23337
23338         Reviewed by John Sullivan.
23339
23340         <rdar://problem/4495316> REGRESSION (420+): After page has loaded, spinning progress indicator is displayed on
23341         tab at versiontracker.com
23342
23343         * WebView/WebFrame.m:
23344         (-[WebFrame _receivedMainResourceError:]):
23345         Call -_clientRedirectCancelledOrFinished: here so that the frame load delegate is notified that the redirect's
23346         status has changed, if there was a redirect.  The frame load delegate may have saved some state about
23347         the redirect in its -webView:willPerformClientRedirectToURL:delay:fireDate:forFrame:.  Since we are definitely
23348         not going to use this provisional resource, as it was cancelled, notify the frame load delegate that the redirect
23349         has ended.
23350         The fix for 4432562 was similar to this, but only took care of the case where the redirect load was actually
23351         committed to the frame.  The new call to -_clientRedirectCancelledOrFinished: handles the case where the redirect
23352         load was successful, but was not committed.  This happens with downloads.
23353         
23354 2006-03-29  John Sullivan  <sullivan@apple.com>
23355
23356         Reviewed by Tim Omernick.
23357         
23358         - fixed these bugs:
23359         <rdar://problem/4483806> REGRESSION (417.8-TOT): PDFs don't scale correctly with auto-size (5356)
23360         <rdar://problem/3874856> Safari PDF display should be full width by default rather than 
23361         sized to show the entire page
23362
23363         * WebView/WebPDFRepresentation.m:
23364         (-[WebPDFRepresentation finishedLoadingWithDataSource:]):
23365         Let the WebPDFView handle setting the document, because that's the best time to apply
23366         the sizing-related preferences.
23367         
23368         * WebView/WebPDFView.h:
23369         eliminated firstLayoutDone ivar and -PDFSubview public method; added -setPDFDocument:
23370         
23371         * WebView/WebPDFView.m:
23372         (-[WebPDFView initWithFrame:]):
23373         eliminate use of obsolete firstLayoutDone ivar
23374         (-[WebPDFView _applyPDFDefaults]):
23375         renamed from _readPDFDefaults for clarity
23376         (-[WebPDFView layout]):
23377         removed code that applied the preferences here. This was too early to handle auto-sizing correctly,
23378         because -layout can be called before the document exists, and calling setAutoSize:YES at that
23379         point confuses PDFView into setting the scale factor to 20 (the maximum).
23380         (-[WebPDFView setPDFDocument:]):
23381         New method, does what WebPDFRepresentation used to do and also applies the preferences here.
23382         This is a good place to apply them because the document is guaranteed to now exist (of course).
23383         (-[WebPDFView PDFSubview]):
23384         Moved this into a new FileInternal category because it's still needed by another class in
23385         this file but no longer needs to be public.
23386         
23387         * WebView/WebPreferences.m:
23388         (+[WebPreferences initialize]):
23389         Change WebKitPDFScaleFactorPreferenceKey to 0, which represents auto-size. This fixes 3874856,
23390         but wasn't feasible until 4483806 was fixed.
23391
23392 2006-03-28  Darin Adler  <darin@apple.com>
23393
23394         Reviewed by Geoff.
23395
23396         - added a build step that checks for init routines
23397
23398         * WebKit.xcodeproj/project.pbxproj: Added a custom build phase that invokes the
23399         check-for-global-initializers script.
23400
23401 2006-03-28  Tim Omernick  <timo@apple.com>
23402
23403         Reviewed by Darin.
23404
23405         <rdar://problem/3694090> -[WebBaseNetscapePluginView finalize] is incorrect; design change needed
23406
23407         * Plugins/WebBaseNetscapePluginView.m:
23408         (-[WebBaseNetscapePluginView initWithFrame:]):
23409         Don't observe preferences changes here -- we only want to observe preferences while the view is 
23410         installed in the view hierarchy.  Plugins will appropriately start and stop themselves when added to
23411         or removed from a window.
23412         (-[WebBaseNetscapePluginView dealloc]):
23413         Don't remove observers here -- they should have been removed when the view was removed from its
23414         window.
23415         (-[WebBaseNetscapePluginView finalize]):
23416         ditto
23417         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
23418         Stop observing preferences when the view is removed from its window.
23419         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
23420         Start observing preferences when the view is added to a window.
23421
23422 2006-03-27  Tim Omernick  <timo@apple.com>
23423
23424         Reviewed by Eric.
23425
23426         <rdar://problem/3694090> -[WebBaseNetscapePluginView finalize] is incorrect; design change needed
23427
23428         * ChangeLog:
23429         * Plugins/WebBaseNetscapePluginView.m:
23430         (-[WebBaseNetscapePluginView dealloc]):
23431         Instead of calling -stop, assert that the plugin is not running.  A plugin view cannot be deallocated
23432         until it is removed from its window.  When a plugin view is removed from its window, it calls -stop
23433         on itself.  Therefore I believe that this call to -stop is unnecessary; if I'm wrong, then the
23434         assertion will help catch any edge cases.
23435         (-[WebBaseNetscapePluginView finalize]):
23436         ditto
23437
23438 2006-03-27  Tim Omernick  <timo@apple.com>
23439
23440         Reviewed by Eric.
23441
23442         <rdar://problem/3694086> -[WebBaseNetscapePluginStream finalize] is incorrect; design change needed
23443
23444         * Plugins/WebBaseNetscapePluginStream.m:
23445         (-[WebBaseNetscapePluginStream dealloc]):
23446         Assert that the stream file path either never existed, or was deleted and NULL-ed out.  The stream file
23447         is now deleted immediately after calling NPP_StreamAsFile().
23448         (-[WebBaseNetscapePluginStream finalize]):
23449         ditto
23450         (-[WebBaseNetscapePluginStream _destroyStream]):
23451         Delete the file after calling NPP_StreamAsFile(), instead of in -dealloc/-finalize.  It should be OK
23452         to delete the file here -- NPP_StreamAsFile() is always called immediately before NPP_DestroyStream()
23453         (the stream destruction function), so there can be no expectation that a plugin will read the stream file
23454         asynchronously after NPP_StreamAsFile() is called.
23455
23456 2006-03-27  Tim Omernick  <timo@apple.com>
23457
23458         Reviewed by Eric.
23459
23460         <rdar://problem/3694093> -[WebBasePluginPackage finalize] is incorrect; design change needed
23461
23462         Call -unload on plug-in packages instead of relying on -dealloc/-finalize to do it.  Currently
23463         the only place plug-in packages are deallocated is when refreshing the set of plugins, as when
23464         handling JavaScript's navigator.plugins.refresh().
23465
23466         * Plugins/WebBasePluginPackage.m:
23467         (-[WebBasePluginPackage dealloc]):
23468         Assert that the plug-in has been unloaded by the time -dealloc is called.
23469         (-[WebBasePluginPackage finalize]):
23470         ditto
23471
23472         * Plugins/WebPluginDatabase.m:
23473         (-[WebPluginDatabase refresh]):
23474         Call -unload on the plug-in packages before releasing them.
23475
23476 2006-03-27  Tim Omernick  <timo@apple.com>
23477
23478         Reviewed by Tim Hatcher.
23479
23480         Part of <rdar://problem/4448350> Deprecated ObjC language API used in JavaScriptCore, WebCore,
23481         WebKit and WebBrowser
23482
23483         * Carbon/HIViewAdapter.h:
23484         HIViewAdapter is no longer an NSView subclass, since we no longer pose it as NSView.
23485         * Carbon/HIViewAdapter.m:
23486         (+[NSView bindHIViewToNSView:nsView:]):
23487         Replace individual NSView methods instead of posing as NSView.
23488         (_webkit_NSView_setNeedsDisplay):
23489         Replacement implementation of -[NSView setNeedsDisplay:].
23490         (_webkit_NSView_setNeedsDisplayInRect):
23491         Replacement implementation of -[NSView setNeedsDisplayInRect:]
23492         (_webkit_NSView_nextValidKeyView):
23493         Replacement implementation of -[NSView nextValidKeyView]
23494
23495 2006-03-27  John Sullivan  <sullivan@apple.com>
23496
23497         Reviewed by Darin Adler.
23498         
23499         Removed two overzealous assertions that the steps to reproduce 4451831 were running into.
23500         Improved comments to match.
23501
23502         * WebCoreSupport/WebFrameBridge.m:
23503         (-[WebFrameBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
23504         Remove assertion that _inNextKeyViewOutsideWebFrameViews should always be false here.
23505         
23506         * WebView/WebHTMLView.m:
23507         (-[WebHTMLView nextValidKeyView]):
23508         Removed assertion that the frame should never be the main frame here.
23509
23510 2006-03-27  Tim Omernick  <timo@apple.com>
23511
23512         Reviewed by Tim Hatcher.
23513
23514         Removed tabs & reformatted code.
23515         
23516         * Carbon/HIViewAdapter.m:
23517         (+[NSView bindHIViewToNSView:nsView:]):
23518         (+[NSView getHIViewForNSView:]):
23519         (+[NSView unbindNSView:]):
23520         (-[NSView setNeedsDisplay:]):
23521         (-[NSView setNeedsDisplayInRect:]):
23522         (-[NSView nextValidKeyView]):
23523         (SetViewNeedsDisplay):
23524
23525 2006-03-26  Justin Garcia  <justin.garcia@apple.com>
23526
23527         Reviewed by darin
23528         
23529         <http://bugs.webkit.org/show_bug.cgi?id=7974>
23530         Add EditActions and WebUndoActions for CreateLink and Unlink
23531
23532         * English.lproj/Localizable.strings:
23533         * WebCoreSupport/WebFrameBridge.m:
23534         (-[WebFrameBridge nameForUndoAction:]):
23535
23536 2006-03-23  Tim Omernick  <timo@apple.com>
23537
23538         Reviewed by John Sullivan.
23539
23540         At John's suggestion, renamed a private WebFrame method and tightened up some of the redirect logic I recently touched.
23541
23542         * WebView/WebFramePrivate.h:
23543         Renamed -_clientRedirectCancelled: to -_clientRedirectCancelledOrFinished:, since we call this both when a redirect is
23544         cancelled and when a redirect is successfully committed.
23545         * WebCoreSupport/WebFrameBridge.m:
23546         (-[WebFrameBridge reportClientRedirectCancelled:]):
23547         Call renamed WebFrame method.
23548         * WebView/WebFrame.m:
23549         Added sentRedirectNotification flag to WebFramePrivate.  This flag is set when we notify the frame load delegate that a
23550         redirect will occur.  We check this flag when committing a provisional load to ensure that the frame load delegate is
23551         notified that the redirect finished.
23552         (-[WebFrame _commitProvisionalLoad:]):
23553         After committing a provisional load, make sure that the frame load delegate is notified that there is no longer a pending
23554         redirect.
23555         (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
23556         Set the new sentRedirectNotification flag.
23557         (-[WebFrame _clientRedirectCancelledOrFinished:]):
23558         Renamed method.
23559         Clear the sentRedirectNotification flag.
23560         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
23561         Call renamed method.
23562
23563 2006-03-23  Tim Omernick  <timo@apple.com>
23564
23565         Reviewed by John Sullivan.
23566
23567         <rdar://problem/4439752> TinyMCE: "Search in Google" context menu is active but fails to work when selection is active
23568         in textarea field.
23569
23570         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
23571         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
23572         Added a representedObject parameter, which is set on the newly created menu item.
23573         (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
23574         Instead of setting the representedObject on each menu item after creating them all, pass the element to
23575         -menuItemWithTag:target:representedObject:.
23576         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
23577         ditto.  This fixes 4439752 because this method failed to set the representedObject on the menu items as
23578         -contextMenuItemsForElement:defaultMenuItems: did.
23579
23580 2006-03-23  Darin Adler  <darin@apple.com>
23581
23582         Reviewed by Eric.
23583
23584         - fix <rdar://problem/4380465> repro crash when unsuccessfully attempting to import image from Services menu
23585
23586         * WebView/WebDataSource.m:
23587         (-[WebDataSource _imageElementWithImageResource:]): Quietly do nothing if passed nil.
23588         (-[WebDataSource _documentFragmentWithImageResource:]): Ditto.
23589
23590 2006-03-22  Tim Omernick  <timo@apple.com>
23591
23592         Reviewed by Kevin Decker.
23593
23594         Even better fix for <rdar://problem/4432562>.  We need to notify the frame delegate of a finished redirect for both
23595         "fast" and "slow" redirects, after committing the load.  My previous change only notified for "fast", history-locking
23596         redirects.  Now we notify the frame delegate after committing any kind of provisional load, not just in the case of
23597         a fast redirect.
23598
23599         * WebView/WebFrame.m:
23600         (-[WebFrame _transitionToCommitted:]):
23601         (-[WebFrame _commitProvisionalLoad:]):
23602
23603 2006-03-22  Tim Omernick  <timo@apple.com>
23604
23605         Reviewed by Kevin Decker.
23606
23607         Better fix for <rdar://problem/4432562> REGRESSION (TOT): Safari's "stop loading" active, "view source" inactive after page load [7058]
23608
23609         * WebView/WebFrame.m:
23610         (-[WebFrame _transitionToCommitted:]):
23611         Cancel the client redirect when we commit the provisional load, if we were waiting for a redirect.
23612         This is a better fix for 7058 (<rdar://problem/4432562>).  The original fix for 7058 changed the timing of the redirect cancel
23613         in such a way that WebKit was precluded from ever reusing back/forward list entries for redirects.  Clearing the redirect state
23614         here actually makes logical sense, as the redirect's target page is being committed at this point.
23615
23616 2006-03-21  Darin Adler  <darin@apple.com>
23617
23618         - fix http://bugs.webkit.org/show_bug.cgi?id=3784
23619           <rdar://problem/4483827> JavaScript save dialog disappears right away (sheet triggers blur event) (3784)
23620
23621         * WebView/WebHTMLView.m:
23622         (-[WebHTMLView _updateFocusState]): Treat window as having focus if its sheet is key.
23623         (-[WebHTMLView addWindowObservers]): Observe all focus notifications, not just the ones involving this window.
23624         (-[WebHTMLView removeWindowObservers]): Ditto.
23625         (-[WebHTMLView windowDidBecomeKey:]): Add checks so that we call the methods only when appropriate,
23626         since this will now be called for all windows.
23627         (-[WebHTMLView windowDidResignKey:]): Ditto.
23628
23629 2006-03-21  Adele Peterson  <adele@apple.com>
23630
23631         Reviewed by Darin.
23632
23633         - Fix for http://bugs.webkit.org/show_bug.cgi?id=6813
23634         elementAtPoint needs to return input element when clicking on new text field
23635
23636         * WebView/WebDocumentInternal.h: Added elementAtPoint:allowShadowContent:
23637         * WebView/WebHTMLView.m:
23638         (-[WebHTMLView elementAtPoint:]): Does not allow shadow content.  This way, by default, callers would get the input element instead of the inner div.
23639         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Allows callers to specify whether or not the element can be a shadow node.
23640         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): Allows shadow content when getting element.
23641         (-[WebHTMLView _mayStartDragAtEventLocation:]): ditto.
23642         (-[WebHTMLView _isSelectionEvent:]): ditto.
23643         (-[WebHTMLView _canProcessDragWithDraggingInfo:]): ditto.
23644         * WebView/WebFrame.m: (-[WebFrame _actionInformationForNavigationType:event:originalURL:]): Does not allow shadow content when getting element.
23645         * WebView/WebImageView.m: (-[WebImageView elementAtPoint:allowShadowContent:]): Added to conform to the WebDocumentElement protocol.
23646         * WebView/WebPDFView.m: (-[WebPDFView elementAtPoint:allowShadowContent:]): ditto.
23647         * WebView/WebTextView.m: (-[WebTextView elementAtPoint:allowShadowContent:]): ditto.
23648
23649 2006-03-21  Tim Omernick  <timo@apple.com>
23650
23651         Reviewed by Tim Hatcher and Darin.
23652
23653         <rdar://problem/4427068> LMGetCurApRefNum, CloseConnection and GetDiskFragment deprecated, used in Netscape
23654         plugin code
23655
23656         * Plugins/WebNetscapeDeprecatedFunctions.h: Added.
23657         * Plugins/WebNetscapeDeprecatedFunctions.c: Added.
23658         Added wrappers for deprecated CFM and LowMem functions.  These exist in a separate file so that we can set
23659         -Wno-deprecated-declarations on this one file without ignoring other deprecated function usage elsewhere.
23660         (WebGetDiskFragment):
23661         (WebCloseConnection):
23662         (WebLMGetCurApRefNum):
23663         (WebLMSetCurApRefNum):
23664
23665         * Plugins/WebNetscapePluginPackage.h:
23666         Don't include connID ivar in 64-bit, since CFM is not supported in 64-bit.
23667         * Plugins/WebNetscapePluginPackage.m:
23668         (+[WebNetscapePluginPackage initialize]):
23669         Don't bother setting the resource refNum in 64-bit, because the API to get and set it does not exist.
23670         A theoretical 64-bit plugin couldn't possibly rely this, since there is no API.
23671         (-[WebNetscapePluginPackage unloadWithoutShutdown]):
23672         No need to close the connID in 64-bit.
23673         (-[WebNetscapePluginPackage load]):
23674         Don't load CFM bundles in 64-bit, because CFM is not supported.
23675
23676         * WebKit.xcodeproj/project.pbxproj:
23677         Added WebNetscapeDeprecatedFunctions.[hm].
23678
23679 2006-03-21  John Sullivan  <sullivan@apple.com>
23680
23681         Reviewed by Kevin Decker.
23682         
23683         - fixed <rdar://problem/4485637> Implementors of searchFor:direction:caseSensitive:wrap: should bail 
23684         out early if search string is empty
23685         
23686         This doesn't change any existing behavior, but avoids unnecessary work.
23687
23688         * Misc/WebSearchableTextView.m:
23689         (-[WebSearchableTextView searchFor:direction:caseSensitive:wrap:]):
23690         bail out immediately (returning NO) if search string is empty
23691         
23692         * WebView/WebHTMLView.m:
23693         (-[WebView searchFor:direction:caseSensitive:wrap:]):
23694         ditto
23695         
23696         * WebView/WebPDFView.m:
23697         (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
23698         ditto
23699         
23700         * WebView/WebView.m:
23701         (-[WebView searchFor:direction:caseSensitive:wrap:]):
23702         ditto
23703
23704 2006-03-20  Tim Omernick  <timo@apple.com>
23705
23706         Reviewed by John Sullivan.
23707
23708         Moved -_contentView from WebFrameViewInternal to WebFrameViewPrivate.  Safari
23709         needs this.
23710
23711         * WebView/WebFrameView.m:
23712         (-[WebFrameView _contentView]):
23713         * WebView/WebFrameViewInternal.h:
23714         * WebView/WebFrameViewPrivate.h:
23715
23716 2006-03-17  Mitz Pettel  <opendarwin.org@mitzpettel.com>
23717
23718         Reviewed by Darin, landed by Beth.
23719
23720         - fix http://bugs.webkit.org/show_bug.cgi?id=7693
23721           WebKit relies on unpredictable timing for onload events
23722
23723         * WebView/WebDataSource.m:
23724         (-[WebDataSource _receivedMainResourceError:complete:]): Check for 
23725         completion on the WebCore side before checking on the WebKit side, 
23726         to ensure that the onload event is emitted before the WebFrame load 
23727         delegate is sent the webView:didFinishLoadForFrame: message. For 
23728         DumpRenderTree, this ensures that the render tree is dumped after 
23729         the onload handler is run.
23730         * WebView/WebLoader.m:
23731         (-[NSURLProtocol didFailWithError:]): If load has already been 
23732         cancelled (which could happen if the parent's onload handler caused 
23733         the frame to detach), do nothing.
23734
23735 2006-03-17  John Sullivan  <sullivan@apple.com>
23736
23737         Reviewed by Beth Dakin
23738         
23739         - fixed <rdar://problem/4239051> Sometimes "Copy Link" in Safari results in a 
23740         URL on the pasteboard with no usable "title"
23741
23742         * History/WebURLsWithTitles.m:
23743         (+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]):
23744         trim whitespace from titles that are put on pasteboard. This leaves an empty string
23745         for the title in cases where there's no displayed text, like an image in an <a> element
23746         that happens to have whitespace in the source, e.g. <a href="foo"> <img whatever></a>
23747
23748 2006-03-17  Darin Adler  <darin@apple.com>
23749
23750         - missing bit of my check-in yesterday
23751
23752         Maciej moved setWindowFrame for me, but I also had removed
23753         setWindowContentRect.
23754
23755         * WebCoreSupport/WebFrameBridge.m: Removed unused setWindowContextRect and
23756         windowContentRect methods.
23757
23758 2006-03-17  Adele Peterson  <adele@apple.com>
23759
23760         Reviewed by Hyatt.
23761
23762         WebKit part of fix for:
23763         http://bugs.webkit.org/show_bug.cgi?id=7797 
23764         Can't set background color on new text fields
23765
23766         Added function to draw bezeled text field without drawing background.
23767
23768         * WebCoreSupport/WebGraphicsBridge.m:
23769         (-[WebGraphicsBridge drawBezeledTextFieldCell:enabled:]): Added.
23770
23771 2006-03-16  Maciej Stachowiak  <mjs@apple.com>
23772
23773         Reviewed by Eric.
23774         
23775         - move setWindowFrame / windowFrame to WebPageBridge to fix build
23776
23777         * WebCoreSupport/WebFrameBridge.m:
23778         * WebCoreSupport/WebPageBridge.m:
23779         (-[WebPageBridge setWindowFrame:]):
23780         (-[WebPageBridge windowFrame]):
23781
23782 2006-03-15  Darin Adler  <darin@apple.com>
23783
23784         Fix by Patrick Beard, reviewed by me.
23785
23786         - fix <rdar://problem/4478181> WebPluginController leaks NSArray and NSMutableSet objects
23787
23788         * Plugins/WebPluginController.m:
23789         (-[WebPluginController initWithDocumentView:]): Call CFMakeCollectable on the CFSet
23790         so we can act like it's an NSSet.
23791         (-[WebPluginController dealloc]): Release _views and _checksInProgress.
23792
23793 2006-03-13  Tim Omernick  <timo@apple.com>
23794
23795         Reviewed by Maciej.
23796
23797         <rdar://problem/4476873> Support printing for plugin documents (not embedded plugins)
23798
23799         * WebView/WebFrameViewPrivate.h:
23800         * WebView/WebFrameView.m:
23801         (-[WebFrameView documentViewShouldHandlePrint]):
23802         Called by the host application before it initializes and runs a print operation.  If NO
23803         is returned, the host application will abort its print operation and call
23804         -printDocumentView on the WebFrameView.  The document view is then expected to run its
23805         own print operation.  If YES is returned, the host application's print operation will
23806         continue as normal.
23807         (-[WebFrameView printDocumentView]):
23808         Called by the host application when the WebFrameView returns YES from -documentViewShouldHandlePrint.
23809
23810         * Plugins/WebNetscapePluginDocumentView.m:
23811         (-[WebNetscapePluginDocumentView documentViewShouldHandlePrint]):
23812         Allow the plugin to take over printing if it defines an NPP_Print function
23813         (-[WebNetscapePluginDocumentView printDocumentView]):
23814         Print the plugin document.
23815
23816 2006-03-13  Geoffrey Garen  <ggaren@apple.com>
23817
23818         Reviewed by timo.
23819
23820         - Fixed the load progress indicator to give more incremental feedback, 
23821         and to stop spending so much time near 100%.
23822
23823         I did two things:
23824         (1) Fixed some bugs and a misspelling in the previous heuristic's 
23825         implementation
23826         (2) Added two new rules to the heuristic:
23827             (a) Treat the first layout as the half-way point.
23828             (b) Just like we jump the first 10% to indicate that a load has
23829             started, jump the last 10% to indicate that a load has finished.
23830
23831         Rule 2a is good for two reasons. First, it seems unnatural for loading
23832         to be "more than half done" when you can't even see anything. Second,
23833         in the early stages of laading our estimate of how much we'll need to
23834         load is often off by as much as 6000% (e.g., cnn.com). So anything that
23835         makes the progress indicator more conservative in the early stages of 
23836         loading is helpful.
23837
23838         Rule 2b is good because it's confusing for loading to be "100% done"
23839         but still ongoing.
23840
23841         FIXME: The indicator still isn't perfect. For example, the old behavior
23842         shows up @ moviefone.com. Two areas for future work:
23843         (1) Estimate number of linked resources. Our code estimates the size
23844         of a single resource, but does nothing to estimate the number of
23845         resources that resource might link to. This is the key to why we're
23846         so wrong at the beginning.
23847         (2) Improve "when to do first layout" heuristic. A JavaScript query
23848         for a style property forces layout, creating a phantom first layout 
23849         with no content, essentially nullifying 2a for certain pages.
23850         
23851         Filed <rdar://problem/4475834> to track estimating the number of 
23852         linked resources. Phantom layouts are already on Hyatt's radar.
23853
23854         * WebView/WebFrame.m:
23855         (-[WebFrame _setState:]): Update firstLayoutDone
23856         (-[WebFrame _numPendingOrLoadingRequests:]): Bug fix: In the recurisve 
23857         case, query 'frame' instead of 'self', so that we actually recurse.
23858         (-[WebFrame _firstLayoutDone]): New method
23859         (-[WebFrame _didFirstLayout]): Update firstLayoutDone
23860         * WebView/WebFramePrivate.h: Added firstLayoutDone ivar
23861         * WebView/WebView.m:
23862         (-[WebView _incrementProgressForConnectionDelegate:data:]):
23863         (1) Implemented 2a and 2b
23864         (2) Bug fix: only update the 'last time I sent a notification' time if 
23865         we actually send a notification.
23866         (3) Don't test for progress < 0 because ensuring progress < max
23867         also ensures max - progress > 0. (Do still test for progress > max 
23868         because rounding errors make that a possibility -- although a very 
23869         minor one.)
23870         (4) Query only the loading frame and its subframes for pending
23871         requests instead of defaulting to the main frame. This is a slight
23872         optimization in cases where the main frame did not begin the load,
23873         and it makes the code more consistent.
23874
23875 2006-03-13  John Sullivan  <sullivan@apple.com>
23876
23877         Reviewed by Tim Omernick.
23878         
23879         - fixed <rdar://problem/4475857> API: Setting a history item limit programmatically doesn't work
23880
23881         * History/WebHistory.m:
23882         (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
23883         use [self historyItemLimit], which prefers the explicitly-set value and falls back to the
23884         NSUserDefaults value, instead of using the NSUserDefaults value explicitly.
23885
23886 2006-03-10  Darin Adler  <darin@apple.com>
23887
23888         Reviewed by Adele.
23889
23890         * WebCoreSupport/WebFrameBridge.m: Remove unused requestedURLString method.
23891
23892 2006-03-10  Darin Adler  <darin@apple.com>
23893
23894         Reviewed by Geoff.
23895
23896         - change how frame namespacing works to be more completely on the WebCore side
23897
23898         * WebView/WebFrameInternal.h: Remove _setFrameNamespace: and _frameNamespace.
23899         * WebView/WebFrame.m: Ditto.
23900
23901         * WebView/WebView.m:
23902         (-[WebView setGroupName:]): Call -[WebCorePageBridge setGroupName:].
23903         (-[WebView groupName]): Call -[WebCorePageBridge groupName].
23904
23905 2006-03-09  Alexey Proskuryakov  <ap@nypop.com>
23906
23907         Reviewed by Darin.
23908
23909         - http://bugs.webkit.org/show_bug.cgi?id=7656
23910          Query string always appended to Flash URLs, instead of being replaced.
23911
23912         * Misc/WebNSURLExtras.h: Added _webkit_URLByRemovingResourceSpecifier.
23913         * Misc/WebNSURLExtras.m:
23914         (+[NSURL _web_URLWithData:relativeToURL:]): Call _webkit_URLByRemovingResourceSpecifier to
23915         work around CFURL not removing non-path components from base URLs in some cases.
23916         (-[NSURL _webkit_URLByRemovingComponent:]): New generic function for removing URL components.
23917         (-[NSURL _webkit_URLByRemovingFragment]): Moved implementation to the above method.
23918         (-[NSURL _webkit_URLByRemovingResourceSpecifier]): Added.
23919
23920 2006-03-07  Darin Adler  <darin@apple.com>
23921
23922         Reviewed by Anders.
23923
23924         - fix http://bugs.webkit.org/show_bug.cgi?id=7655
23925           unwanted output while running layout tests
23926
23927         * WebView/WebDataSourcePrivate.h:
23928         * WebView/WebDataSource.m:
23929         (-[WebDataSource _setRepresentation:]): Clear the flag that records whether we've sent
23930         all the data to the representation or not; need this to prevent telling the same representation
23931         both that we've succeeded and then later that we've failed.
23932         (-[WebDataSource _setMainDocumentError:]): Don't send an error if representationFinishedLoading
23933         is already YES. Set representationFinishedLoading.
23934         (-[WebDataSource _finishedLoading]): Set representationFinishedLoading.
23935         (-[WebDataSource _setupForReplaceByMIMEType:]): Ditto.
23936
23937 2006-03-06  Tim Omernick  <timo@apple.com>
23938
23939         Reviewed by Kevin Decker.
23940
23941         <rdar://problem/4457574> assertion failure watching trailers at netflix.com -[WebNetscapePluginRepresentation
23942         receivedData:withDataSource:] + 684
23943
23944         * Plugins/WebNetscapePluginRepresentation.m:
23945         (-[WebNetscapePluginRepresentation receivedData:withDataSource:]):
23946         Moved the ASSERT(instance) to the block that actually requires an assertion -- the plugin view should never
23947         have a NULL instance by the time we start the NPStream (by calling -startStreamWithResponse:).
23948         Some stream teardown logic changed with my fix to 4153419: when a WebBaseNetscapePluginStream is destroyed,
23949         it now clears its NPP instance backpointer.  The WebBaseNetscapePluginStream may be destroyed from within
23950         -startStreamWithResponse: if NPP_NewStream() returns an error.  We can handle this gracefully by changing
23951         the assertion before -receivedData: to a simple NULL check.
23952         This is unrelated to the Radar, but prior to this fix, we would attempt an NPP_Write() with the initial
23953         stream data even if NPP_NewStream() returned an error.  Seems like that alone could cause issues, though
23954         I'm guessing that plugins handle this in practice.
23955
23956 2006-03-03  Timothy Hatcher  <timothy@apple.com>
23957
23958         Reviewed by Darin.
23959         
23960         <rdar://problem/4411822> wrong element shown in Inspector inspecting main image at apple.com
23961         <rdar://problem/4411908> in the Web Inspector, state of disclosure triangles should be preserved after search
23962         http://bugs.webkit.org/show_bug.cgi?id=6616
23963         Bug 6616: Double-clicking on a search result seems broken
23964         http://bugs.webkit.org/show_bug.cgi?id=6709
23965         Bug 6709: TypeError: Value undefined (result of expression treeScrollbar.refresh) is not object.
23966
23967         Code clean up and move more code into JavaScript.
23968         Removes a few unused ObjC methods.
23969         Many search fixes. Reveals the focused node when exiting the search.
23970         Shows a "No Selection" screen when there are no search results.
23971         Shows a node count for the number of results.
23972         Fixes a couple of TypeErrors that show on the console.
23973         Uses the system selection color in the Style pane tables.
23974
23975         * English.lproj/Localizable.strings: removed localized strings
23976         * WebInspector.subproj/WebInspector.m:
23977         (-[WebInspector init]):
23978         (-[WebInspector dealloc]):
23979         (-[WebInspector window]):
23980         (-[WebInspector setSearchQuery:]):
23981         (-[WebInspector resizeTopArea]):
23982         (-[WebInspector searchPerformed:]): called from JavaScript when a search happens
23983         (-[WebInspector _toggleIgnoreWhitespace:]):
23984         (-[WebInspector _exitSearch:]): exit search results on double click
23985         (-[WebInspector _focusRootNode:]):
23986         (-[WebInspector _revealAndSelectNodeInTree:]):
23987         (-[WebInspector _refreshSearch]):
23988         (-[WebInspector _update]):
23989         (-[WebInspector _updateTraversalButtons]):
23990         (-[WebInspector _updateRoot]):
23991         (-[WebInspector _updateTreeScrollbar]):
23992         (-[WebInspector _updateSystemColors]): update CSS with system colors
23993         (-[WebInspector webView:didFinishLoadForFrame:]):
23994         (-[WebInspector webView:plugInViewWithArguments:]):
23995         (-[WebInspector outlineViewSelectionDidChange:]): test for webViewLoaded
23996         (-[WebInspectorPrivate init]): alloc rightArrowImage and downArrowImage
23997         (-[WebInspectorPrivate dealloc]): no more matchedRules
23998         (-[DOMNode _displayName]): removed localization UI_STRING calls.
23999         * WebInspector.subproj/WebInspectorInternal.h:
24000         * WebInspector.subproj/webInspector/inspector.css:
24001         * WebInspector.subproj/webInspector/inspector.html:
24002         * WebInspector.subproj/webInspector/inspector.js:
24003
24004 2006-03-02  Alexey Proskuryakov  <ap@nypop.com>
24005
24006         Fixed a typo in the comments added in the previous checkin.
24007
24008         * WebCoreSupport/WebFrameBridge.m:
24009         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
24010         * WebCoreSupport/WebSubresourceLoader.m:
24011         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
24012         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):
24013
24014 2006-03-02  Alexey Proskuryakov  <ap@nypop.com>
24015
24016         Reviewed by Darin.
24017
24018         - http://bugs.webkit.org/show_bug.cgi?id=7540
24019           REGRESSION: frequent cache-related crashes
24020
24021         - http://bugs.webkit.org/show_bug.cgi?id=7393
24022           A stale comment about XMLHttpRequest responses being never cached
24023
24024         * WebCoreSupport/WebFrameBridge.m: Don't call setHTTPHeader if the method is GET.
24025         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
24026         * WebCoreSupport/WebSubresourceLoader.m: Ditto. Also removed a stale comment about
24027         XMLHTTPRequests.
24028         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
24029         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):
24030
24031 2006-02-23  David Harrison  <harrison@apple.com>
24032
24033         Reviewed by Justin.
24034
24035         <rdar://problem/4359736> Support outlining ability with lists
24036
24037         Added Mail SPI for list level changes.  It is SPI because it is not complete support
24038         for outlining.  See <rdar://problem/4457070> "API for html lists as note outlines".
24039         
24040         * WebView/WebHTMLView.m:
24041         (-[WebHTMLView _canIncreaseSelectionListLevel]):
24042         (-[WebHTMLView _canDecreaseSelectionListLevel]):
24043         (-[WebHTMLView _increaseSelectionListLevel]):
24044         (-[WebHTMLView _decreaseSelectionListLevel]):
24045         * WebView/WebHTMLViewPrivate.h:
24046
24047 2006-03-01  Alexey Proskuryakov  <ap@nypop.com>
24048
24049         Reviewed by Darin.
24050
24051         - http://bugs.webkit.org/show_bug.cgi?id=3812
24052           XMLHttpRequest: PUT, DELETE, HEAD and all other methods but POST actually do a GET.
24053
24054         All WebKit changes are to use the method parameter passed from WebCore.
24055
24056         * WebCoreSupport/WebFrameBridge.m:
24057         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
24058         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
24059         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
24060         * WebCoreSupport/WebSubresourceLoader.h:
24061         * WebCoreSupport/WebSubresourceLoader.m:
24062         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
24063         (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):
24064
24065 2006-03-01  Timothy Hatcher  <timothy@apple.com>
24066
24067         Reviewed by Darin.
24068
24069         http://bugs.webkit.org/show_bug.cgi?id=7450
24070         elementAtPoint is expensive and should return a smart dictionary
24071         
24072         <rdar://problem/2952761> moving the mouse around eats more CPU than I would expect (7450)
24073         
24074         elementAtPoint for WebHTMLView now returns a WebElementDictionary,
24075         when objectForKey is called it will lookup in the DOM, cache and return the value
24076
24077         * Misc/WebElementDictionary.h: Added.
24078         * Misc/WebElementDictionary.m: Added.
24079         (addLookupKey):
24080         (cacheValueForKey):
24081         (+[WebElementDictionary initializeLookupTable]):
24082         (-[WebElementDictionary initWithInnerNonSharedNode:innerNode:URLElement:andPoint:]):
24083         (-[WebElementDictionary dealloc]):
24084         (-[WebElementDictionary _fillCache]):
24085         (-[WebElementDictionary count]):
24086         (-[WebElementDictionary keyEnumerator]):
24087         (-[WebElementDictionary objectForKey:]):
24088         (-[WebElementDictionary _domNode]):
24089         (-[WebElementDictionary _webFrame]):
24090         (-[WebElementDictionary _targetWebFrame]):
24091         (-[WebElementDictionary _title]):
24092         (-[WebElementDictionary _imageRect]):
24093         (-[WebElementDictionary _isSelected]):
24094         * Misc/WebNSViewExtras.m:
24095         (-[NSView _web_dragImage:element:rect:event:pasteboard:source:offset:]):
24096         * WebKit.xcodeproj/project.pbxproj:
24097         * WebView/WebHTMLView.m:
24098         (-[WebHTMLView _updateMouseoverWithEvent:]):
24099         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
24100         (-[WebHTMLView elementAtPoint:]):
24101         * WebView/WebView.m:
24102         * WebView/WebViewPrivate.h:
24103
24104 2006-02-28  Darin Adler  <darin@apple.com>
24105
24106         Reviewed by Adele.
24107
24108         - remove obsolete WebCoreScrollView class
24109
24110         * WebView/WebDynamicScrollBarsView.h: Change base class to NSScrollView instead of WebCoreScrollView.
24111         * WebView/WebDynamicScrollBarsView.m: (-[WebDynamicScrollBarsView autoforwardsScrollWheelEvents]): Added.
24112
24113 2006-02-28  John Sullivan  <sullivan@apple.com>
24114
24115         Reviewed by Eric Seidel
24116         
24117         Wean WebKit from one more SPI call. We learned about this new-to-Tiger
24118         API from filing Radar 4433222.
24119
24120         * WebView/WebHTMLView.m:
24121         (-[WebHTMLView _autoscroll]):
24122         use public CGEventSourceButtonState() instead of WKMouseIsDown() (which was using SPI internally)
24123
24124 2006-02-27  Tim Omernick  <timo@apple.com>
24125
24126         Reviewed by Adele.
24127
24128         <rdar://problem/4222043> Safari should reduce null events sent to invisible plugins
24129
24130         * Plugins/WebBaseNetscapePluginView.h:
24131         * Plugins/WebBaseNetscapePluginView.m:
24132         (-[WebBaseNetscapePluginView restartNullEvents]):
24133         Check to see if the plugin view is completely obscured (scrolled out of view, for example).  If it is
24134         obscured and it wasn't before, or the other way around, then restart the null event timer so it can
24135         fire at the appropriate rate.
24136         (-[WebBaseNetscapePluginView viewHasMoved:]):
24137         If a plugin is obscured, send it null events as if it were in an inactive window.
24138
24139 2006-02-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
24140
24141         Test: fast/frames/empty-frame-document.html
24142
24143         Reviewed by Darin.
24144
24145         - fix http://bugs.webkit.org/show_bug.cgi?id=7293
24146           REGRESSION: Using Javascript Bookmarklets that reference location.href on a blank tab crashes WebKit
24147
24148         The crash happened because an empty frame did not have a document.
24149
24150         * WebView/WebFrame.m:
24151         (-[WebFrame _commitProvisionalLoad:]): Use "about:blank" instead of an empty URL for empty
24152         frames. This causes a document to be created for the frame.
24153
24154 2006-02-21  Kevin Decker  <kdecker@apple.com>
24155
24156         Reviewed by Darin.
24157
24158         Backed out my previous check in. Since these methods are internal to WebKit (and not private)
24159         it's perfectly OK for them to remain as categories. 
24160         * ChangeLog:
24161         * WebView/WebPreferences.m:
24162         (-[WebPreferences _integerValueForKey:]):
24163         (-[WebPreferences _setIntegerValue:forKey:]):
24164         (-[WebPreferences _floatValueForKey:]):
24165         (-[WebPreferences _setFloatValue:forKey:]):
24166         (-[WebPreferences _boolValueForKey:]):
24167         (-[WebPreferences _setBoolValue:forKey:]):
24168         * WebView/WebPreferencesPrivate.h:
24169
24170 2006-02-20  Darin Adler  <darin@apple.com>
24171
24172         Collaborated with Graham Dennis <Graham.Dennis@gmail.com> on this.
24173
24174         - WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=6831
24175           contentEditable outline darkens as caret moves
24176
24177         * WebCoreSupport/WebGraphicsBridge.m:
24178         (-[WebGraphicsBridge drawFocusRingWithPath:radius:color:]):
24179         Replaced the old bridge function that set up style with this one that renders a path.
24180
24181 2006-02-19  Darin Adler  <darin@apple.com>
24182
24183         Reviewed by Maciej.
24184
24185         - cut out a little unneeded bridge code
24186
24187         * WebCoreSupport/WebFrameBridge.m:
24188         (-[WebFrameBridge webView]): Added. Helper, since the WebCore side of the bridge no longer
24189         has this method.
24190         (-[WebFrameBridge createWindowWithURL:]): Removed the frameName parameter -- this is now
24191         handled on the WebCore side. Also return a page bridge instead of a frame bridge.
24192         (-[WebFrameBridge createModalDialogWithURL:]): Changed to return a page bridge instead of
24193         a frame bridge.
24194
24195         * WebView/WebFrame.m: (-[WebFrame webView]): Change to get the webView from the page bridge
24196         instead of the frame bridge, since it's a per-page thing.
24197
24198         * WebView/WebView.m: Removed init method since it just does what the default does (calls
24199         initWithFrame: with a zero rect).
24200         (-[WebView initWithCoder:]): Added checking so that if the obejcts have the wrong type
24201         we will fail gracefully instead of hitting "method not found" and the like.
24202         (-[WebView setPreferencesIdentifier:]): Fix storage leak. The WebPreferences object was
24203         not released.
24204         (-[WebView mainFrame]): Removed excess "return nil".
24205         (-[WebView _pageBridge]): Added. Helper to let you go from the WebView to the bridge
24206         from outside the WebView class.
24207         * WebView/WebViewInternal.h: Put _pageBridge into an internal header.
24208
24209         * WebCoreSupport/WebPageBridge.m: (-[WebPageBridge outerView]): Added. Replaces "webView"
24210         as public method to tell the WebCore side about the view everything's embedded in.
24211
24212         - other cleanup
24213
24214         * WebCoreSupport/WebPageBridge.h: Removed some unneeded declarations.
24215
24216         * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView loadPluginRequest:]):
24217         Rearrange code so it doesn't have to get the main frame twice.
24218
24219 2006-02-18  Maciej Stachowiak  <mjs@apple.com>
24220
24221         Not reviewed.
24222         
24223         - fix build broken by my last checkin, the remaining code was not doing anything.
24224
24225         * WebView/WebDataSource.m:
24226         * WebView/WebDataSourcePrivate.h:
24227         * WebView/WebFrame.m:
24228         (-[WebFrame _createPageCacheForItem:]):
24229
24230 2006-02-16  Maciej Stachowiak  <mjs@apple.com>
24231
24232         Reviewed by Darin.
24233         
24234         - removed a few unused fields and methods of WebDataSource
24235
24236         * WebView/WebDataSource.m:
24237         * WebView/WebDataSourcePrivate.h:
24238         * WebView/WebView.m:
24239         (+[WebView _MIMETypeForFile:]):
24240         (-[WebView _updateWebCoreSettingsFromPreferences:]):
24241
24242 2006-02-15  Justin Garcia  <justin.garcia@apple.com>
24243
24244         Reviewed by darin
24245         
24246         <http://bugs.webkit.org/show_bug.cgi?id=7148>
24247         Add drag and drop support to DumpRenderTree
24248         
24249         Added a UI delegate method so that DumpRenderTree can perform dragging on its own.
24250         Made _updateFocusState SPI, to allow us to test the behavior and appearance of
24251         windows that have or don't have focus.
24252
24253         * WebView/WebHTMLView.m:
24254         (-[WebHTMLView _updateFocusState]):
24255         (-[WebHTMLView viewDidMoveToWindow]):
24256         (-[WebHTMLView windowDidBecomeKey:]):
24257         (-[WebHTMLView windowDidResignKey:]):
24258         (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
24259         (-[WebHTMLView becomeFirstResponder]):
24260         (-[WebHTMLView resignFirstResponder]):
24261         (-[WebHTMLView _formControlIsResigningFirstResponder:]):
24262         * WebView/WebHTMLViewInternal.h:
24263         * WebView/WebHTMLViewPrivate.h:
24264         * WebView/WebUIDelegatePrivate.h:
24265         * WebView/WebView.m:
24266
24267 2006-02-15  Darin Adler  <darin@apple.com>
24268
24269         * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
24270
24271 2006-02-15  Maciej Stachowiak  <mjs@apple.com>
24272
24273         Rubber stamped by Anders.
24274
24275         * WebView/WebControllerPolicyHandlerDelegate.h: Removed.
24276
24277 2006-02-15  Maciej Stachowiak  <mjs@apple.com>
24278
24279         Reviewed by Anders.
24280         
24281         - remove some voodoo code
24282
24283         * WebView/WebDataSource.m:
24284         (-[WebDataSource _setLoading:]): Removed useless ref/deref of self and WebView.
24285         A WebDataSource cannot be loading unless it is still connected to the WebView that
24286         owns it and retained by it, because getting disconnected stops loading.
24287
24288 2006-02-13  Maciej Stachowiak  <mjs@apple.com>
24289
24290         Reviewed by Anders.
24291         
24292         Improvements to frame loading:
24293         
24294         - remove LayoutAcceptable state entirely
24295         - fix WebImageView to work right without LayoutAcceptable state
24296         - move guts of commitIfReady: to WebFrame
24297         - try to separate page cache loading from normal loading a bit more
24298
24299         * English.lproj/StringsNotToBeLocalized.txt:
24300         * WebView/WebDataSource.m:
24301         (-[WebDataSource _prepareForLoadStart]):
24302         (-[WebDataSource _loadFromPageCache:]):
24303         (-[WebDataSource _startLoading]):
24304         (-[WebDataSource _commitIfReady]):
24305         (-[WebDataSource _setupForReplaceByMIMEType:]):
24306         * WebView/WebDataSourcePrivate.h:
24307         * WebView/WebFrame.m:
24308         (-[WebFrame _transitionToCommitted:]):
24309         (-[WebFrame _commitProvisionalLoad:]):
24310         (-[WebFrame _checkLoadCompleteForThisFrame]):
24311         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
24312         * WebView/WebFramePrivate.h:
24313         * WebView/WebImageRepresentation.h:
24314         * WebView/WebImageRepresentation.m:
24315         * WebView/WebImageView.m:
24316         (-[WebImageView dataSourceUpdated:]):
24317         (-[WebImageView setNeedsLayout:]):
24318         (-[WebImageView writeImageToPasteboard:types:]):
24319         (-[WebImageView copy:]):
24320         (-[WebImageView mouseDragged:]):
24321         * WebView/WebView.m:
24322         (-[WebView _finishedLoadingResourceFromDataSource:]):
24323         (-[WebView _mainReceivedBytesSoFar:fromDataSource:complete:]):
24324
24325 2006-02-13  John Sullivan  <sullivan@apple.com>
24326
24327         Reviewed by Tim Omernick.
24328
24329         Support for highlighting multiple text matches.
24330
24331         * WebView/WebHTMLViewPrivate.h:
24332         * WebView/WebHTMLView.m:
24333         (-[WebHTMLView highlightAllMatchesForString:caseSensitive:]):
24334         new method, calls through to bridge
24335         (-[WebHTMLView clearHighlightedMatches]):
24336         ditto
24337
24338         * WebView/WebViewPrivate.h:
24339         * WebView/WebView.m:
24340         (-[WebView highlightAllMatchesForString:caseSensitive:]):
24341         new method, calls through to documentView. For now this is hardwired to only work
24342         with WebHTMLViews.
24343         (-[WebView clearHighlightedMatches]):
24344         ditto
24345
24346 2006-02-13  Darin Adler  <darin@apple.com>
24347
24348         Reviewed by Maciej.
24349
24350         - move pointer from frame to page over to WebCore
24351
24352         * WebCoreSupport/WebPageBridge.m: (-[WebPageBridge initWithMainFrameName:webView:frameView:]):
24353         Call super init to create the page before creating the main frame and calling setMainFrame: with it.
24354
24355         * WebCoreSupport/WebFrameBridge.h: Remove page pointer, and change init function parameters.
24356         * WebCoreSupport/WebFrameBridge.m:
24357         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]): New function that is used only for
24358         the main frame. Passes the page over to the other side of the bridge.
24359         (-[WebFrameBridge initSubframeWithRenderer:frameName:view:]): New function that is used only for
24360         subframes. Passes the renderer over to the other side of the bridge.
24361         (-[WebFrameBridge mainFrame]):
24362         (-[WebFrameBridge webView]):
24363         (-[WebFrameBridge createWindowWithURL:frameName:]):
24364         (-[WebFrameBridge showWindow]):
24365         (-[WebFrameBridge areToolbarsVisible]):
24366         (-[WebFrameBridge setToolbarsVisible:]):
24367         (-[WebFrameBridge isStatusbarVisible]):
24368         (-[WebFrameBridge setStatusbarVisible:]):
24369         (-[WebFrameBridge setWindowFrame:]):
24370         (-[WebFrameBridge windowFrame]):
24371         (-[WebFrameBridge setWindowContentRect:]):
24372         (-[WebFrameBridge windowContentRect]):
24373         (-[WebFrameBridge setWindowIsResizable:]):
24374         (-[WebFrameBridge windowIsResizable]):
24375         (-[WebFrameBridge firstResponder]):
24376         (-[WebFrameBridge makeFirstResponder:]):
24377         (-[WebFrameBridge closeWindowSoon]):
24378         (-[WebFrameBridge runJavaScriptAlertPanelWithMessage:]):
24379         (-[WebFrameBridge runJavaScriptConfirmPanelWithMessage:]):
24380         (-[WebFrameBridge canRunBeforeUnloadConfirmPanel]):
24381         (-[WebFrameBridge runBeforeUnloadConfirmPanelWithMessage:]):
24382         (-[WebFrameBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
24383         (-[WebFrameBridge addMessageToConsole:]):
24384         (-[WebFrameBridge runOpenPanelForFileButtonWithResultListener:]):
24385         (-[WebFrameBridge setStatusText:]):
24386         (-[WebFrameBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
24387         (-[WebFrameBridge focusWindow]):
24388         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
24389         (-[WebFrameBridge userAgentForURL:]):
24390         (-[WebFrameBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
24391         (-[WebFrameBridge previousKeyViewOutsideWebFrameViews]):
24392         (-[WebFrameBridge defersLoading]):
24393         (-[WebFrameBridge setDefersLoading:]):
24394         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
24395         (-[WebFrameBridge _preferences]):
24396         (-[WebFrameBridge selectWordBeforeMenuEvent]):
24397         (-[WebFrameBridge historyLength]):
24398         (-[WebFrameBridge canGoBackOrForward:]):
24399         (-[WebFrameBridge goBackOrForward:]):
24400         (-[WebFrameBridge print]):
24401         (-[WebFrameBridge pollForAppletInView:]):
24402         (-[WebFrameBridge respondToChangedContents]):
24403         (-[WebFrameBridge respondToChangedSelection]):
24404         (-[WebFrameBridge undoManager]):
24405         (-[WebFrameBridge issueCutCommand]):
24406         (-[WebFrameBridge issueCopyCommand]):
24407         (-[WebFrameBridge issuePasteCommand]):
24408         (-[WebFrameBridge issuePasteAndMatchStyleCommand]):
24409         (-[WebFrameBridge canPaste]):
24410         (-[WebFrameBridge overrideMediaType]):
24411         (-[WebFrameBridge isEditable]):
24412         (-[WebFrameBridge shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
24413         (-[WebFrameBridge shouldBeginEditing:]):
24414         (-[WebFrameBridge shouldEndEditing:]):
24415         (-[WebFrameBridge windowObjectCleared]):
24416         (-[WebFrameBridge spellCheckerDocumentTag]):
24417         (-[WebFrameBridge isContinuousSpellCheckingEnabled]):
24418         (-[WebFrameBridge didFirstLayout]):
24419         (-[WebFrameBridge dashboardRegionsChanged:]):
24420         (-[WebFrameBridge createModalDialogWithURL:]):
24421         (-[WebFrameBridge canRunModal]):
24422         (-[WebFrameBridge runModal]):
24423         Change all calls to [_page webView] to use [self webView] instead.
24424
24425 === WebKit-521.7
24426
24427 2006-02-11  Maciej Stachowiak  <mjs@apple.com>
24428
24429         Reviewed by Hyatt.
24430         
24431         - factor WebArchive creation code out of other classes into new WebArchiver
24432         http://bugs.webkit.org/show_bug.cgi?id=7208
24433
24434         * DOM/WebDOMOperations.m:
24435         (-[DOMNode webArchive]):
24436         (-[DOMRange webArchive]):
24437         * WebKit.xcodeproj/project.pbxproj:
24438         * WebView/WebArchiver.h: Added.
24439         * WebView/WebArchiver.m: Added.
24440         (+[WebArchiver _subframeArchivesForFrame:]):
24441         (+[WebArchiver archiveFrame:]):
24442         (+[WebArchiver _archiveCurrentStateForFrame:]):
24443         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
24444         (+[WebArchiver archiveRange:]):
24445         (+[WebArchiver archiveNode:]):
24446         (+[WebArchiver archiveSelectionInFrame:]):
24447         * WebView/WebDataSource.m:
24448         (-[WebDataSource webArchive]):
24449         * WebView/WebDataSourcePrivate.h:
24450         * WebView/WebHTMLView.m:
24451         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
24452         (-[WebHTMLView _writeSelectionToPasteboard:]):
24453         * WebView/WebHTMLViewPrivate.h:
24454
24455 2006-02-11  Darin Adler  <darin@apple.com>
24456
24457         * English.lproj/StringsNotToBeLocalized.txt: Updated paths for recent changes in directory structure.
24458
24459 2006-02-11  David Kilzer  <ddkilzer@kilzer.net>
24460
24461         Reviewed by John Sullivan.
24462
24463         - Fix http://bugs.webkit.org/show_bug.cgi?id=7171
24464         No description in WebKitErrors.m for WebKitErrorPlugInWillHandleLoad
24465
24466         * English.lproj/Localizable.strings: Added new UI_STRING().
24467         * Misc/WebKitErrors.m: Added #define for description.
24468         (registerErrors): Added dictionary entry.
24469
24470 2006-02-09  Tim Omernick  <timo@apple.com>
24471
24472         Reviewed by Tim Hatcher.
24473
24474         <rdar://problem/4153419> CrashTracer: 576 crashes in Safari at com.apple.WebKit: NPN_DestroyStream + 56
24475
24476         I never could reproduce this crasher, which seems to be caused by the Speed Download plugin.  However,
24477         I did find a way to make the affected code more bulletproof for those who are experiencing the crash.
24478         
24479         * Plugins/WebBaseNetscapePluginStream.h:
24480         Keep a WebBaseNetscapePluginView instead of the WebNetscapePluginPackage, since the plugin view could
24481         potentially be deallocated before the stream finishes loading.
24482         * Plugins/WebBaseNetscapePluginStream.m:
24483         (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
24484         Use pluginView instead of plugin.
24485         (-[WebBaseNetscapePluginStream dealloc]):
24486         Assert that the plugin instance has been nulled out, since that's now part of the stream's teardown
24487         phase.
24488         Release pluginView instead of plugin.
24489         (-[WebBaseNetscapePluginStream setPluginPointer:]):
24490         Retain the plugin view instead of the plugin package, since the plugin view could be deallocated while
24491         the stream is running.
24492         This method now accepts a NULL argument so that we can easily clear out the pluginView backpointer
24493         (and other ivars derived from it).
24494         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
24495         Use pluginView instead of plugin.
24496         (-[WebBaseNetscapePluginStream _destroyStream]):
24497         ditto
24498         (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
24499         ditto
24500         (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError]):
24501         Set the plugin instance to NULL, so that the pluginView backpointer is released.  This method is called
24502         for every plugin view's stream when the plugin view is stopped/destroyed.
24503         (-[WebBaseNetscapePluginStream _deliverData]):
24504         Use pluginView instead of plugin.
24505
24506 == Rolled over to ChangeLog-2006-02-09 ==