2008-07-09 Anders Carlsson <andersca@apple.com>
[WebKit-https.git] / WebKit / mac / ChangeLog
1 2008-07-09  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Darin.
4
5         Make some WebPlugin and WebPluginFactory SPI public.
6         
7         * Plugins/WebPlugin.h:
8         * Plugins/WebPluginPrivate.h:
9         * Plugins/WebPluginViewFactory.h:
10         * Plugins/WebPluginViewFactoryPrivate.h:
11
12 2008-07-08  Jon Honeycutt  <jhoneycutt@apple.com>
13
14         Reviewed by Anders.
15
16         Port r34988 to Mac: don't call NPP_DestroyStream if NPP_NewStream was
17         unsuccessful.
18
19         * Plugins/WebBaseNetscapePluginStream.h: Added new member,
20         newStreamSuccessful.
21         * Plugins/WebBaseNetscapePluginStream.mm:
22         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): Initialize new member.
23         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): If NPP_NewStream is successful, set
24         newStreamSuccessful to YES.
25         (-[WebBaseNetscapePluginStream _destroyStream]): Only call
26         NPP_DestroyStream if newStreamSuccessful is true.
27
28 2008-07-08  Dan Bernstein  <mitz@apple.com>
29
30         Reviewed by John Sullivan.
31
32         - WebKit part of <rdar://problem/6008409> Need a way to disable updates in offscreen views
33
34         * WebView/WebHTMLView.mm:
35         (-[WebHTMLView addWindowObservers]): Added code to observe when the
36         window goes onscreen.
37         (-[WebHTMLView removeWindowObservers]): Added.
38         (-[WebHTMLView windowWillOrderOnScreen:]): Added. If the view is set to
39         not update when offscreen, calls -setNeedsDisplay: just before it comes
40         onscreen.
41         * WebView/WebPreferenceKeysPrivate.h: Added preference key.
42         * WebView/WebPreferences.m:
43         (+[WebPreferences initialize]): Made updates when offscreen on by
44         default.
45         (-[WebPreferences updatesWhenOffscreen]): Added.
46         (-[WebPreferences setUpdatesWhenOffscreen:]): Added.
47         * WebView/WebPreferencesPrivate.h:
48         * WebView/WebView.mm:
49         (-[WebView _preferencesChangedNotification:]): Added code to update the
50         updatesWhenOffscreen setting in WebCore.
51
52 2008-07-07  Anders Carlsson  <andersca@apple.com>
53
54         Reviewed by Darin.
55
56         Speculative fix for     
57         <rdar://problem/5839800>
58         CrashTracer: [USER] 5802 crashes in Safari at com.apple.WebKit: -[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent] + 389
59         
60         Set _private->closed to YES before calling -[WebPluginController destroyAllPlugins].
61         
62         My theory is that the plug-in destruction callbacks could end up rescheduling timers or re-adding notifications.
63         This is usually protected by _private->closed, but in this case it might still be false.
64
65         * WebView/WebHTMLView.mm:
66         (-[WebHTMLView close]):
67
68 2008-07-05  Mark Rowe  <mrowe@apple.com>
69
70         Reviewed by John Sullivan.
71
72         Remove WebSearchableTextView as it has been unused for some time now.
73
74         * Misc/WebSearchableTextView.h: Removed.
75         * Misc/WebSearchableTextView.m: Removed.
76
77 2008-07-05  Mark Rowe  <mrowe@apple.com>
78
79         Reviewed by John Sullivan.
80
81         Don't leak the result of WKCopyCFLocalizationPreferredName when running under GC.
82
83         * Misc/WebNSUserDefaultsExtras.m:
84         (-[NSString _webkit_HTTPStyleLanguageCode]):
85
86 2008-07-02  Alexey Proskuryakov  <ap@webkit.org>
87
88         Inspired and reviewed by Mark Rowe.
89
90         Change non-API includes from JavaScriptCore/ to kjs/ and wtf/ to match prevalent style.
91
92         * Carbon/HIViewAdapter.m:
93         * DOM/WebDOMOperations.mm:
94         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
95         * DefaultDelegates/WebDefaultPolicyDelegate.m:
96         * History/WebBackForwardList.mm:
97         * History/WebHistory.mm:
98         * History/WebHistoryItem.mm:
99         * History/WebHistoryItemInternal.h:
100         * Misc/WebCoreStatistics.mm:
101         * Misc/WebDownload.m:
102         * Misc/WebGraphicsExtras.c:
103         * Misc/WebKitLogging.h:
104         * Misc/WebKitSystemBits.m:
105         * Misc/WebLocalizableStrings.m:
106         * Misc/WebNSArrayExtras.m:
107         * Misc/WebNSDataExtras.m:
108         * Misc/WebNSDictionaryExtras.m:
109         * Misc/WebNSFileManagerExtras.m:
110         * Misc/WebNSPasteboardExtras.mm:
111         * Misc/WebNSURLExtras.mm:
112         * Misc/WebNSUserDefaultsExtras.m:
113         * Panels/WebAuthenticationPanel.m:
114         * Panels/WebPanelAuthenticationHandler.m:
115         * Plugins/WebBaseNetscapePluginView.mm:
116         * Plugins/WebBasePluginPackage.m:
117         * Plugins/WebNetscapePluginEmbeddedView.mm:
118         * Plugins/WebPluginContainerCheck.mm:
119         * Plugins/WebPluginController.mm:
120         * Plugins/WebPluginDatabase.mm:
121         * WebCoreSupport/WebJavaScriptTextInputPanel.m:
122         * WebCoreSupport/WebKeyGenerator.m:
123         * WebCoreSupport/WebViewFactory.mm:
124         * WebKitPrefix.h:
125         * WebView/WebHTMLRepresentation.mm:
126         * WebView/WebPDFRepresentation.m:
127         * WebView/WebPDFView.mm:
128         * WebView/WebScriptDebugger.mm:
129
130 2008-07-01  Alexey Proskuryakov  <ap@webkit.org>
131
132         Reviewed by Darin.
133
134         Disable JSLock for per-thread contexts.
135
136         * Misc/WebCoreStatistics.mm:
137         (+[WebCoreStatistics javaScriptObjectsCount]):
138         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
139         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
140         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
141         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
142         (+[WebCoreStatistics shouldPrintExceptions]):
143         (+[WebCoreStatistics setShouldPrintExceptions:]):
144         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
145         * Plugins/WebBaseNetscapePluginView.mm:
146         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
147         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
148         (-[WebBaseNetscapePluginView start]):
149         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
150         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
151         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
152         (-[WebBaseNetscapePluginView loadPluginRequest:]):
153         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
154         * Plugins/WebPluginController.mm:
155         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
156         (-[WebPluginController startAllPlugins]):
157         (-[WebPluginController stopAllPlugins]):
158         (-[WebPluginController addPlugin:]):
159         (-[WebPluginController destroyPlugin:]):
160         (-[WebPluginController destroyAllPlugins]):
161         * WebView/WebFrame.mm:
162         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
163         * WebView/WebScriptDebugDelegate.mm:
164         (-[WebScriptCallFrame evaluateWebScript:]):
165         * WebView/WebView.mm:
166         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
167         Pass a parameter (always false) to JSLock and JSLock::DropAllLocks to indicate that WebKit
168         doesn't need locking. In the future, it may be possible to remove some of these if we
169         establish that this won't make JSC assertions fail (and that we don't want to add such
170         assertions either).
171         Added includes that are now needed.
172
173 2008-07-01  Kevin McCullough  <kmccullough@apple.com>
174
175         Build fix.
176
177         * WebView/WebView.mm:
178
179 2008-07-01  Anders Carlsson  <andersca@apple.com>
180
181         Reviewed by Darin.
182
183         Use the PluginMainThreadScheduler, and implement NPN_PluginThreadAsyncCall.
184         
185         * Plugins/WebBaseNetscapePluginView.mm:
186         (-[WebBaseNetscapePluginView _createPlugin]):
187         Register the plug-in instance.
188         
189         (-[WebBaseNetscapePluginView _destroyPlugin]):
190         Unegister the plug-in instance.
191         
192         * Plugins/WebNetscapePluginPackage.m:
193         (-[WebNetscapePluginPackage load]):
194         Set NPN_PluginThreadAsyncCall.
195         
196         * Plugins/npapi.mm:
197         (NPN_PluginThreadAsyncCall):
198         Implement this.
199
200 2008-07-01  Dan Bernstein  <mitz@apple.com>
201
202         Reviewed by Darin Adler.
203
204         - WebKit part of moving the method to set the base writing direction from Frame to Editor
205
206         * WebView/WebHTMLView.mm:
207         (-[WebHTMLView toggleBaseWritingDirection:]): Changed back to call the
208         Editor method.
209         (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
210         (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
211
212 2008-07-01  Geoffrey Garen  <ggaren@apple.com>
213
214         Build fix: forgot to check in this file.
215
216         * WebView/WebScriptDebugger.mm:
217         (WebScriptDebugger::WebScriptDebugger):
218
219 2008-06-30  Dan Bernstein  <mitz@apple.com>
220
221         Reviewed by Adele Peterson.
222
223         - WebKit/mac part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari
224
225         * WebView/WebHTMLView.mm:
226         (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call
227         WebCore::Frame::setSelectionBaseWritingDirection() instead of
228         WebCore::Editor::setBaseWritingDirection().
229         (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
230         (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
231
232 2008-06-28  Darin Adler  <darin@apple.com>
233
234         - fix build
235
236         * WebView/WebView.mm:
237         (aeDescFromJSValue): Use get instead of getItem, which no longer exists.
238
239 2008-06-26  Anders Carlsson  <andersca@apple.com>
240
241         Reviewed by Darin.
242
243         Add a new MainThreadObjectDeallocator which can schedule dealloc calls on the main thread
244         if necessary. Use this for the WebView class. 
245                 
246         * WebView/MainThreadObjectDeallocator.h: Added.
247         * WebView/MainThreadObjectDeallocator.mm: Added.
248         (deallocCallback):
249         (scheduleDeallocateOnMainThread):
250         * WebView/WebView.mm:
251         (-[WebViewPrivate dealloc]):
252         (+[WebView initialize]):
253
254 2008-06-25  Anders Carlsson  <andersca@apple.com>
255
256         Reviewed by Mark.
257
258         <rdar://problem/5984270> 
259         REGRESSION (Tiger only) : Mail crashes because message load is being processed on a secondary thread
260         
261         * WebView/WebView.mm:
262         (tigerMailReleaseIMP):
263         New method that makes sure that the final release happens on the main thread.
264         
265         (-[WebView release]):
266         New method that just calls [super release];
267         
268         (+[WebView initialize]):
269         When running under Tiger mail, replace the release method with tigerMailReleaseIMP.
270
271 2008-06-19  Alexey Proskuryakov  <ap@webkit.org>
272
273         Reviewed by Geoff.
274
275         Make Machine per-JSGlobalData.
276
277         * WebView/WebScriptDebugger.mm:
278         (WebScriptDebugger::WebScriptDebugger):
279
280 2008-06-17  Alexey Proskuryakov  <ap@webkit.org>
281
282         Reviewed by Darin.
283
284         Prepare JavaScript heap for being per-thread.
285
286         * Misc/WebCoreStatistics.mm:
287         (+[WebCoreStatistics javaScriptObjectsCount]):
288         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
289         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
290         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
291         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
292         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
293         Use JSGlobalData::threadInstance()->heap instead of static Collector calls.
294
295 2008-06-17  Darin Adler  <darin@apple.com>
296
297         Reviewed by Sam.
298
299         * WebView/WebHTMLView.mm:
300         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Use create instead of new
301         to create a CSSMutableStyleDeclaration.
302
303 2008-06-16  Mark Rowe  <mrowe@apple.com>
304
305         Reviewed by Darin Adler.
306
307         <rdar://problem/5951874> WebHTMLHighlighter mistakenly gained two new methods, causing compile warnings
308
309         _pauseNullEventsForAllNetscapePlugins and _resumeNullEventsForAllNetscapePlugins ended up being declared both in
310         WebHTMLViewInternal.h and as members of the WebHTMLHighlighter protocol in WebHTMLViewPrivate.h.  They don't belong
311         in the protocol, but they do need to be available outside of WebKit so they're being moved to the correct location
312         in WebHTMLViewPrivate.h and removed from WebHTMLViewInternal.h.
313
314         * WebView/WebHTMLView.mm:
315         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
316         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
317         * WebView/WebHTMLViewInternal.h:
318         * WebView/WebHTMLViewPrivate.h:
319
320 2008-06-15  Darin Adler  <darin@apple.com>
321
322         - give Frame object functions shorter names: scriptProxy() -> script(),
323           selectionController() -> selection(), animationController() -> animation()
324
325         * Plugins/WebPluginController.mm:
326         (-[WebPluginController webPlugInContainerSelectionColor]):
327         * WebView/WebFrame.mm:
328         (-[WebFrame _attachScriptDebugger]):
329         (-[WebFrame _hasSelection]):
330         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
331         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
332         (-[WebFrame _convertToNSRange:]):
333         (-[WebFrame _convertToDOMRange:]):
334         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
335         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
336         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
337         (-[WebFrame _selectedNSRange]):
338         (-[WebFrame _selectNSRange:]):
339         (-[WebFrame globalContext]):
340         * WebView/WebHTMLView.mm:
341         (-[WebHTMLView _selectedRange]):
342         (-[WebHTMLView _hasSelection]):
343         (-[WebHTMLView _hasSelectionOrInsertionPoint]):
344         (-[WebHTMLView _hasInsertionPoint]):
345         (-[WebHTMLView _isEditable]):
346         (-[WebHTMLView _updateFocusedAndActiveState]):
347         (-[WebHTMLView readSelectionFromPasteboard:]):
348         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
349         (-[WebHTMLView maintainsInactiveSelection]):
350         (-[WebHTMLView paste:]):
351         (isTextInput):
352         (-[WebHTMLView inputContext]):
353         (-[WebTextCompleteController doCompletion]):
354         (-[WebHTMLView selectAll]):
355         (-[WebHTMLView deselectAll]):
356         (-[WebHTMLView selectedAttributedString]):
357         * WebView/WebView.mm:
358         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
359         (-[WebView setSelectedDOMRange:affinity:]):
360         (-[WebView selectedDOMRange]):
361         (-[WebView selectionAffinity]):
362
363 2008-06-15  Darin Adler  <darin@apple.com>
364
365         - rename KJS::List to KJS::ArgList
366
367         * WebView/WebScriptDebugger.h:
368
369 2008-06-15  Darin Adler  <darin@apple.com>
370
371         - new names for more JavaScriptCore files
372
373         * WebView/WebView.mm:
374
375 2008-06-15  Darin Adler  <darin@apple.com>
376
377         - new names for a few key JavaScriptCore files
378
379         * ForwardingHeaders/kjs/JSFunction.h: Copied from WebKit/mac/ForwardingHeaders/kjs/function.h.
380         * ForwardingHeaders/kjs/JSObject.h: Copied from WebKit/mac/ForwardingHeaders/kjs/object.h.
381         * ForwardingHeaders/kjs/JSString.h: Copied from WebKit/mac/ForwardingHeaders/kjs/internal.h.
382         * ForwardingHeaders/kjs/JSValue.h: Copied from WebKit/mac/ForwardingHeaders/kjs/value.h.
383         * ForwardingHeaders/kjs/function.h: Removed.
384         * ForwardingHeaders/kjs/internal.h: Removed.
385         * ForwardingHeaders/kjs/object.h: Removed.
386         * ForwardingHeaders/kjs/value.h: Removed.
387         * WebView/WebScriptDebugDelegate.mm:
388
389 2008-06-15  Darin Adler  <darin@apple.com>
390
391         Rubber stamped by Sam.
392
393         - use JS prefix and simpler names for basic JavaScriptCore types,
394           to complement JSValue and JSObject
395
396         * WebView/WebView.mm:
397         (aeDescFromJSValue):
398
399 2008-06-14  Darin Adler  <darin@apple.com>
400
401         Rubber stamped by Sam.
402
403         - new names for kjs_binding.h and kjs_proxy.h
404
405         * WebView/WebFrame.mm:
406         * WebView/WebScriptDebugDelegate.mm:
407         * WebView/WebView.mm:
408
409 2008-06-14  Darin Adler  <darin@apple.com>
410
411         Rubber stamped by Sam.
412
413         - renamed HTMLGenericFormElement to HTMLFormControlElement
414
415         * WebView/WebHTMLRepresentation.mm:
416         (-[WebHTMLRepresentation elementWithName:inForm:]):
417         (-[WebHTMLRepresentation controlsInForm:]):
418
419 2008-06-14  Darin Adler  <darin@apple.com>
420
421         Reviewed by Sam.
422
423         - more of https://bugs.webkit.org/show_bug.cgi?id=17257
424           start ref counts at 1 instead of 0 for speed
425
426         * WebCoreSupport/WebFrameLoaderClient.mm:
427         (WebFrameLoaderClient::createDocumentLoader): Use create instead of new.
428         (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
429         a ref call inside the Frame constructor. The lifetime rules for Frame are now the
430         conventional ones without a special case.
431
432         * WebView/WebDataSource.mm:
433         (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since
434         this function takes ownership of the DocumentLoader.
435         (-[WebDataSource initWithRequest:]): Use create instead of new.
436         * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a
437         PassRefPtr and also cleaned up the header a bit.
438
439         * WebView/WebDocumentLoaderMac.h:
440         (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual
441         functions private.
442
443         * WebView/WebFrame.mm:
444         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead
445         of new.
446
447 2008-06-14  Darin Adler  <darin@apple.com>
448
449         Reviewed by Sam.
450
451         - more work on https://bugs.webkit.org/show_bug.cgi?id=17257
452           start ref counts at 1 instead of 0 for speed
453
454         * WebView/WebFrame.mm:
455         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
456         * WebView/WebPDFView.mm:
457         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
458
459 2008-06-13  Darin Adler  <darin@apple.com>
460
461         Reviewed by John Sullivan.
462
463         - updated for addition of FormState argument to action policy functions
464         - added WebActionFormKey
465
466         * WebCoreSupport/WebFrameLoaderClient.h:
467         * WebCoreSupport/WebFrameLoaderClient.mm:
468         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
469         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
470         (WebFrameLoaderClient::actionDictionary):
471         * WebKit.exp:
472         * WebView/WebPolicyDelegate.mm:
473         * WebView/WebPolicyDelegatePrivate.h:
474
475 2008-06-12  John Sullivan  <sullivan@apple.com>
476
477         Reviewed by Dan and Darin
478
479         Clear up the confusion about _close (older private method) vs -close (newer public method).
480
481         * WebView/WebView.mm:
482         (-[WebView _isClosed]):
483         simplified style
484         (-[WebView _close]):
485         added a comment about how clients and subclasses should use -close instead
486         (-[WebView dealloc]):
487         call -close instead of _close, so subclasses that override the public method will have the intended behavior
488         (-[WebView close]):
489         added a comment
490         (-[WebView _windowWillClose:]):
491         call -close instead of _close, so subclasses that override the public method will have the intended behavior
492
493         * WebView/WebViewPrivate.h:
494         added a comment about how clients and subclasses should use -close instead
495
496 2008-06-07  Darin Adler  <darin@apple.com>
497
498         Reviewed by Mitz.
499
500         - work on https://bugs.webkit.org/show_bug.cgi?id=17257
501           start ref counts at 1 instead of 0 for speed
502
503         * History/WebHistoryItem.mm:
504         (-[WebHistoryItem init]):
505         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
506         (-[WebHistoryItem initWithURL:target:parent:title:]):
507         (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
508         * WebView/WebView.mm:
509         (+[WebView _decodeData:]):
510
511 2008-06-03  Oliver Hunt  <oliver@apple.com>
512
513         Reviewed by Tim.
514
515         Bug 12983: Web Inspector break on the debugger keyword
516         <https://bugs.webkit.org/show_bug.cgi?id=12983>
517
518         Add stubs to allow old webkit debugger interface to build.
519
520         * WebView/WebScriptDebugger.h:
521         * WebView/WebScriptDebugger.mm:
522
523 2008-06-03  Anders Carlsson  <andersca@apple.com>
524
525         Reviewed by Darin.
526
527         <rdar://problem/5980961>
528         
529         In 64-bit Web Kit, converting between float and double, can cause rounding errors which in turn causes
530         newBottom to be larger than oldBottom which is illegal.
531         
532         * WebView/WebHTMLView.mm:
533         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
534
535 2008-06-02  Anders Carlsson  <andersca@apple.com>
536
537         Reviewed by Mitz.
538
539         Speculative fix for <rdar://problem/5661112> 
540         CrashTracer: [USER] 49 crashes in DashboardClient at com.apple.WebCore: WebCore::RenderPart::setWidget + 62
541         
542         Defer loads while calling NPP_New. Some plug-ins start a run-loop inside NPP_New and finished loads could cause
543         layouts to be triggered.
544         
545         * Plugins/WebBaseNetscapePluginView.mm:
546         (-[WebBaseNetscapePluginView _createPlugin]):
547
548 2008-05-29  Justin Garcia  <justin.garcia@apple.com>
549
550         Reviewed by Darin.
551         
552         <rdar://problem/5949462> REGRESSION: Can't paste screen captures into Mail
553         
554         AppKit started putting PNG instead of PICT onto the pasteboard for screen 
555         captures.  Added support for PNG with kUTTypePNG.  Tiger doesn't support
556         setting and retrieving pasteboard types with UTIs, but we don't know of any
557         applications on Tiger that put only PNG on the pasteboard.
558
559         * WebView/WebHTMLView.mm:
560         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
561         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
562
563 2008-05-29  Anders Carlsson  <andersca@apple.com>
564
565         Reviewed by Brady.
566
567         <rdar://problem/5970312> 
568         icon file specified for stand alone web app causes crash if the icon can't be found
569         
570         Handle the case where iconData is null.
571         
572         * Misc/WebIconFetcher.mm:
573         (WebIconFetcherClient::finishedFetchingIcon):
574
575 2008-05-29  Anders Carlsson  <andersca@apple.com>
576
577         Reviewed by Mitz.
578
579         <rdar://problem/5971845>
580         https://bugs.webkit.org/show_bug.cgi?id=19313
581         Add version member to NPCocoaEvent
582
583         Initialize the version member to 0 for all events.
584         
585         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
586         (initializeEvent):
587         (WebNetscapePluginEventHandlerCocoa::drawRect):
588         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
589         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
590         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
591         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
592         (WebNetscapePluginEventHandlerCocoa::focusChanged):
593
594 2008-05-29  Dan Bernstein  <mitz@apple.com>
595
596         Reviewed by Jessica Kahn.
597
598         - fix <rdar://problem/5965013> Page 2 does not print correctly
599
600         When printing, _recursiveDisplayRectIfNeededIgnoringOpacity:... and
601         _recursiveDisplayAllDirtyWithLockFocus:... can be invoked without
602         -viewWillDraw being sent first, which could lead to painting without
603         valid layout. The fix is to ensure up-to-date layout in those methods
604         when printing.
605
606         * WebView/WebHTMLView.mm:
607         (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
608         (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
609
610 2008-05-28  Anders Carlsson  <andersca@apple.com>
611
612         Reviewed by Jon.
613
614         Remove workaround, this is no longer a problem.
615         
616         * WebView/WebView.mm:
617         (-[WebView _removeObjectForIdentifier:]):
618
619 2008-05-27  Geoffrey Garen  <ggaren@apple.com>
620
621         Reviewed by Tim Hatcher.
622         
623         Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
624         REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
625         clicking button in returnEvent-crash.html
626         
627         Added implementations for willExecuteProgram and didExecuteProgram, which
628         take care of making sure we're not hanging on to stale data.
629
630 2008-05-27  Timothy Hatcher  <timothy@apple.com>
631
632         Fixes a bug where unplugging the monitor from a video card and
633         moving it to another video card would no longer show OpenGL plugins
634         until you relaunched Safari.
635
636         <rdar://problem/5790983> Add AllowOfflineDisplays pixel format
637         attribute to OpenGL contexts
638
639         Reviewed by Kevin Decker.
640
641         * Plugins/WebBaseNetscapePluginView.mm:
642         (-[WebBaseNetscapePluginView _createWindowedAGLContext]): Added
643         AGL_ALLOW_OFFLINE_RENDERERS for non-Tiger builds.
644         (-[WebBaseNetscapePluginView _createWindowlessAGLContext]): Ditto.
645
646 2008-05-25  Mark Rowe  <mrowe@apple.com>
647
648         Reviewed by Darin Adler.
649
650         <rdar://problem/5840884> _recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
651
652         Follow-up for r33052.  _recursive_resumeNullEventsForAllNetscapePlugins and _recursive_pauseNullEventsForAllNetscapePlugins
653         need to be declared in WebFramePrivate.h rather than WebFrameInternal.h so they can be used from outside of WebKit.
654
655         * WebView/WebFrame.mm:
656         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
657         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
658         * WebView/WebFrameInternal.h:
659         * WebView/WebFramePrivate.h:
660
661 2008-05-23  Timothy Hatcher  <timothy@apple.com>
662
663         Fix attaching and detaching the Web Inspector. This change removes
664         the clunky animation that never looked right and was causing issues
665         where the inspected WebView would get into a no useable state.
666
667         <rdar://problem/5958812> Attaching and Detaching the Web Inspector
668         can cause the inspected WebVIew to be unusable
669
670         Reviewed by Adam Roben.
671
672         * WebCoreSupport/WebInspectorClient.mm:
673         (-[WebInspectorWindowController close]): Removes animation code.
674         Sets the frame directly and does a displayIfNeeded to prevent
675         showing the Inspector in the page and in the Inspector window.
676         (-[WebInspectorWindowController showWindow:]): Removes animation code.
677         Sets the frame directly.
678         (-[WebInspectorWindowController attach]): Simplified.
679         (-[WebInspectorWindowController detach]): Ditto.
680
681 2008-05-22  Dan Bernstein  <mitz@apple.com>
682
683         Reviewed by Darin Adler.
684
685         - fix broken documentation of
686           webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
687
688         * WebView/WebUIDelegate.h: Fixed method name in HeaderDoc for
689         -webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
690
691 2008-05-22  Timothy Hatcher  <timothy@apple.com>
692
693         <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
694
695         Reviewed by Adam Roben.
696
697         * WebCoreSupport/WebInspectorClient.mm:
698         (-[WebInspectorWindowController showWebInspector:]):
699         (-[WebInspectorWindowController showErrorConsole:]):
700         (-[WebInspectorWindowController toggleDebuggingJavaScript:]):
701         (-[WebInspectorWindowController toggleProfilingJavaScript:]):
702         (-[WebInspectorWindowController validateUserInterfaceItem:]):
703         * WebInspector/WebInspector.h:
704         * WebInspector/WebInspector.mm:
705         (-[WebInspector showConsole:]):
706         (-[WebInspector showTimeline:]):
707         (-[WebInspector isDebuggingJavaScript]):
708         (-[WebInspector toggleDebuggingJavaScript:]):
709         (-[WebInspector startDebuggingJavaScript:]):
710         (-[WebInspector stopDebuggingJavaScript:]):
711         (-[WebInspector isProfilingJavaScript]):
712         (-[WebInspector toggleProfilingJavaScript:]):
713         (-[WebInspector startProfilingJavaScript:]):
714         (-[WebInspector stopProfilingJavaScript:]):
715
716 2008-05-22  Josh Aas  <joshmoz@gmail.com>
717
718         Reviewed by Anders.
719
720         <rdar://problem/5956429> 
721         https://bugs.webkit.org/show_bug.cgi?id=19192
722         remove NPNVpluginEventModel, fix example plugin
723         
724         * Plugins/WebBaseNetscapePluginView.mm:
725         (-[WebBaseNetscapePluginView getVariable:value:]):
726
727 2008-05-21  Anders Carlsson  <andersca@apple.com>
728
729         Reviewed by Maciej.
730
731         Add WebIconFetcher.
732         
733         * Misc/WebIconFetcher.h: Added.
734         * Misc/WebIconFetcher.mm: Added.
735         (WebIconFetcherClient::WebIconFetcherClient):
736         (WebIconFetcherClient::finishedFetchingIcon):
737         (WebIconFetcherClient::setFetcher):
738         (-[WebIconFetcher init]):
739         (-[WebIconFetcher dealloc]):
740         (-[WebIconFetcher finalize]):
741         (-[WebIconFetcher cancel]):
742         (-[WebIconFetcher _initWithIconFetcher:client:]):
743         (+[WebIconFetcher _fetchApplicationIconForFrame:target:selector:]):
744         * Misc/WebIconFetcherInternal.h: Added.
745         * WebView/WebFrame.mm:
746         (-[WebFrame fetchApplicationIcon:selector:]):
747         * WebView/WebFramePrivate.h:
748
749 === End merge of squirrelfish ===
750
751 2008-05-21  Geoffrey Garen  <ggaren@apple.com>
752
753         Reviewed by Tim Hatcher.
754         
755         Updated for API changes from merging with trunk WebCore's new debugger.
756
757         * WebView/WebScriptDebugDelegate.mm:
758         (-[WebScriptCallFrame evaluateWebScript:]): Explicitly check for an
759         exception return, since the DebuggerCallFrame no longer automatically
760         substitutes the exception for the return value.
761
762         * WebView/WebScriptDebugger.mm: Use the dynamic global object, not the
763         lexical global object, since the debugger attaches based on dynamic
764         global object.
765
766 2008-05-17  Geoffrey Garen  <ggaren@apple.com>
767
768         Reviewed by Oliver Hunt.
769         
770         Re-enabled previously disabled debugging functionality.
771         
772         There are two major changes from how the WebKit debugger used to work:
773         
774         (1) All the interesting bits are implemented down in JavaScriptCore. The
775         debugger just calls through to KJS::DebuggerCallFrame for everything.
776         
777         (2) Instead of copyihng a pointer to an ExecState once, the debugger
778         copies the DebuggerCallFrame passed to it in each callback. This is
779         because the VM no longer maintains a fully transparent execution state
780         to which you can hold a pointer, and the DebuggerCallFrames it vends
781         are temporaries.
782         
783         Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
784         from its function. This is safer than the old method, which was to
785         hold a stale ExecState* and hope for the best.
786
787 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
788
789         Reviewed by Oliver Hunt.
790
791         Updated for API changes in KJS::Debugger.
792
793         * WebView/WebFrame.mm:
794         (-[WebFrame _attachScriptDebugger]): Changed the order of operations to
795         fix an ASSERT that can happen when re-entering _attachScriptDebugger.
796
797 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
798
799         Reviewed by Oliver Hunt.
800         
801         Updated WebScriptDebugger API to accept a SourceProvider instead
802         of a WebCore::String, to avoid copying.
803
804         (WebScriptDebugger::sourceParsed): Updated this function not to return
805         a value.
806
807 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
808
809         Build fix: #ifdef'd out some code that doesn't work anymore.
810
811 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
812
813         Reviewed by Oliver Hunt.
814         
815         #ifdef'd out some debugger code that doesn't work anymore.
816
817         * WebView/WebScriptDebugDelegate.mm:
818         (-[WebScriptCallFrame scopeChain]):
819
820 2008-04-21  Geoffrey Garen  <ggaren@apple.com>
821
822         Build fix.
823
824         * ChangeLog:
825         * WebView/WebScriptDebugDelegate.mm:
826         (-[WebScriptCallFrame scopeChain]):
827
828 2008-03-30  Geoffrey Garen  <ggaren@apple.com>
829
830         Reviewed by Oliver Hunt.
831         
832         Build fix.
833
834 === Start merge of squirrelfish ===
835
836 2008-05-21  Darin Adler  <darin@apple.com>
837
838         - fix build
839
840         * WebView/WebViewPrivate.h: Remove declaration of closeWithFastTeardown. We can add it back later
841         if we want, but if we do, we should probably make some refinements like checking _private->closed
842         and applicationIsTerminating.
843
844 2008-05-21  Darin Adler  <darin@apple.com>
845
846         Reviewed by Anders and Kevin Decker.
847
848         - fix <rdar://problem/5951130> REGRESSION: crash on quit after reopening windows from previous session
849
850         * WebView/WebView.mm:
851         (-[WebViewPrivate dealloc]): Fix assertions to not complain when fast teardown is used.
852         (-[WebView _closePluginDatabases]): Factored out some common code from both versions of close.
853         (-[WebView _closeWithFastTeardown]): Added an underscore to this method's name, since it's internal.
854         Streamlined the code a bit. Added a line of code to set _private->closed (this is the bug fix).
855         (-[WebView _close]): Changed for new method name and to use _closePluginDatabases.
856
857 2008-05-19  Stephanie Lewis  <slewis@apple.com>
858
859         Reviewed by Darin.
860     
861         more fast teardown performance work
862
863         * Misc/WebDownload.m:
864         (-[WebDownloadInternal downloadDidBegin:]):
865         (-[WebDownloadInternal downloadDidFinish:]):
866         (-[WebDownloadInternal download:didFailWithError:]):
867         * WebCoreSupport/WebChromeClient.h:
868         * WebCoreSupport/WebChromeClient.mm:
869         (WebChromeClient::disableSuddenTermination):
870         (WebChromeClient::enableSuddenTermination):
871
872 2008-05-18  Dan Bernstein  <mitz@apple.com>
873
874         Reviewed by Sam Weinig.
875
876         - fix <rdar://problem/5944596> IDNs are displayed as punycode in the authentication panel
877
878         * Panels/WebAuthenticationPanel.m:
879         (-[WebAuthenticationPanel setUpForChallenge:]):
880
881 2008-05-16  Timothy Hatcher  <timothy@apple.com>
882
883         Removes WebScriptDebugServer files and related calls. This removes
884         the hooks that Drosera uses for debugging. Now that the Web Inspector
885         has a better debugger, we don't need these anymore.
886
887         Reviewed by Sam Weinig.
888
889         * DefaultDelegates/WebScriptDebugServer.h: Removed.
890         * DefaultDelegates/WebScriptDebugServer.m: Removed.
891         * DefaultDelegates/WebScriptDebugServerPrivate.h: Removed.
892         * WebCoreSupport/WebFrameLoaderClient.mm:
893         * WebKit.exp:
894         * WebView/WebScriptDebugDelegate.mm:
895         * WebView/WebScriptDebugger.mm:
896         (WebScriptDebugger::sourceParsed):
897         (WebScriptDebugger::callEvent):
898         (WebScriptDebugger::atStatement):
899         (WebScriptDebugger::returnEvent):
900         (WebScriptDebugger::exception):
901         * WebView/WebView.mm:
902         (-[WebView _commonInitializationWithFrameName:groupName:]):
903         * WebView/WebViewPrivate.h:
904
905 2008-05-16  Brady Eidson  <beidson@apple.com>
906
907         Reviewed by Anders
908
909         <rdar://problem/5942616> - Need to standardize LocalStorage persistence path
910
911         Took the opportunity to touch up another pref that needs the same standardization.
912         That pref is currently not in use on Mac.
913
914         * WebView/WebPreferences.m:
915         (-[WebPreferences _setFTPDirectoryTemplatePath:]):
916         (-[WebPreferences _localStorageDatabasePath]):
917         (-[WebPreferences _setLocalStorageDatabasePath:]):
918         (-[WebPreferences _ftpDirectoryTemplatePath]):
919
920 2008-05-16  Chris Fleizach  <cfleizach@apple.com>
921
922         Reviewed by Alice Liu
923
924         <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)
925
926         * WebView/WebFrame.mm:
927         (-[WebFrame _accessibilityTree]):
928
929 2008-05-15  Stephanie Lewis  <slewis@apple.com>
930         
931         fix mac build
932
933         * WebView/WebView.mm:
934         (-[WebView closeWithFastTeardown]):
935
936 2008-05-15  Stephanie Lewis  <slewis@apple.com>
937
938         Reviewed by Anders.
939
940         Turn on fast teardown.  I added a preference for using full teardown because 
941         the LEAKS output will be useless without a full teardown.  
942
943         preference for fullteardown
944         * WebView/WebPreferenceKeysPrivate.h:
945         * WebView/WebPreferences.m:
946         (-[WebPreferences setFullDocumentTeardownEnabled:]):
947         (-[WebPreferences fullDocumentTeardownEnabled]):
948         * WebView/WebPreferencesPrivate.h:
949         
950         on application quit dispatch unload events and destroy plugins then exit
951         * WebView/WebView.mm:
952         (-[WebView closeWithFastTeardown]):
953         (-[WebView _close]):
954         * WebView/WebViewPrivate.h:
955
956 2008-05-15  Stephanie Lewis  <slewis@apple.com>
957
958         Reviewed by Anders.
959
960         get the pending frame unload count from WebCore
961
962         * WebView/WebFrame.mm:
963         (-[WebFrame _pendingFrameUnloadEventCount]):
964         * WebView/WebFramePrivate.h:
965
966 2008-05-15  John Sullivan  <sullivan@apple.com>
967
968         Reviewed by Kevin Decker
969         
970         - fixed <rdar://problem/5940275> Inspector highlighting moves to bottom-left corner of 
971           screen when new tab appears
972           
973         The highlight should go away entirely, but this simple patch just makes it not jump away.
974         The issue with it not going away entirely is harder to fix and covered by <rdar://problem/5322306>
975
976         * WebInspector/WebNodeHighlight.m:
977         (-[WebNodeHighlight _repositionHighlightWindow]):
978         Bail out if target view isn't in a window
979
980 2008-05-15  Stephanie Lewis  <slewis@apple.com>
981
982         Reviewed by Anders.
983
984         Track views that contain plugin instances so that they can be destroyed at application
985         quit without walking the entire document tree.
986
987         Add/Remove Netscape plugin views from instance list.  Start/stop are when netscape
988         plugins are created and destroyed
989         * Plugins/WebBaseNetscapePluginView.mm:
990         (-[WebBaseNetscapePluginView start]):
991         (-[WebBaseNetscapePluginView stop]):
992  
993         Add/remove WebKit plugin views from instance list
994         * Plugins/WebPluginController.mm:
995         (-[WebPluginController addPlugin:]):
996         (-[WebPluginController destroyPlugin:]):
997         (-[WebPluginController destroyAllPlugins]):
998
999         Add a set of views with plugin instances to the WebPluginDatabase
1000         * Plugins/WebPluginDatabase.h:
1001         * Plugins/WebPluginDatabase.mm:
1002         (-[WebPluginDatabase init]):
1003         (-[WebPluginDatabase dealloc]):
1004         (-[WebPluginDatabase addPluginInstanceView:]):
1005         (-[WebPluginDatabase removePluginInstanceView:]):
1006         (-[WebPluginDatabase removePluginInstanceViewsFor:]):
1007         (-[WebPluginDatabase destroyAllPluginInstanceViews]):
1008         
1009         Handle cases where plugin views are detached before the plugin is destroyed.
1010         * WebCoreSupport/WebFrameLoaderClient.mm:
1011         (WebFrameLoaderClient::detachedFromParent2):
1012         (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
1013         (WebFrameLoaderClient::transitionToCommittedForNewPage):
1014
1015         Add plugin instances to the set in the WebPluginDatabase by way of the WebView
1016         * WebView/WebHTMLView.mm:
1017         (-[WebHTMLView _destroyAllWebPlugins]):
1018         * WebView/WebHTMLViewInternal.h:
1019         * WebView/WebView.mm:
1020         (-[WebView addPluginInstanceView:]):
1021         (-[WebView removePluginInstanceView:]):
1022         (-[WebView removePluginInstanceViewsFor:]):
1023         * WebView/WebViewInternal.h:
1024
1025 2008-05-15  Brady Eidson  <beidson@apple.com>
1026
1027         Reviewed by Tim Hatcher
1028
1029         Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
1030         before setting the page group of the new page.
1031         
1032         * WebView/WebView.mm:
1033         (-[WebView _commonInitializationWithFrameName:groupName:]): Set the LocalStorage path 
1034           immediately after creating the page so it is in place for initializing the LocalStorageThread
1035
1036 2008-05-15  Timothy Hatcher  <timothy@apple.com>
1037
1038         Fixes the bug where the Web Inspector would flash white while resizing.
1039         This was cause by deferring the window creation.
1040
1041         <rdar://problem/5873549> REGRESSION: Inspector flickers horribly while resizing (17979)
1042
1043         Reviewed by Darin Adler.
1044
1045         * WebCoreSupport/WebInspectorClient.mm:
1046         (-[WebInspectorWindowController window]): Don't defer the window creation.
1047
1048 2008-05-15  Alexey Proskuryakov  <ap@webkit.org>
1049
1050         Tiger build fix.
1051
1052         * Misc/WebNSAttributedStringExtras.mm: Import WebTypesInternal.h for NSUInteger.
1053
1054 2008-05-15  Adele Peterson  <adele@apple.com>
1055
1056         Reviewed and landed by Alexey.
1057
1058         Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].
1059
1060         * Misc/WebNSAttributedStringExtras.mm:
1061         (+[NSAttributedString _web_attributedStringFromRange:]):
1062
1063 2008-05-14  Eric Seidel  <eric@webkit.org>
1064
1065         Reviewed by Oliver.
1066
1067         Add missing NULL check to match rest of file, this was found by the editing fuzzer.
1068
1069         * WebView/WebResource.mm:
1070         (-[WebResource data]):
1071
1072 2008-05-14  Alexey Proskuryakov  <ap@webkit.org>
1073
1074         Reviewed by Dan Bernstein.
1075
1076         NPP_ValidAttributesForMarkedText should return NSArray*, not NSArray.
1077
1078         * Plugins/nptextinput.h:
1079
1080 2008-05-13  Anders Carlsson  <andersca@apple.com>
1081
1082         Reviewed by Sam.
1083
1084         Don't empty the application cache in _setCacheModel, since it will be called during initialization.
1085         Instead, do it in [WebCache empty].
1086         
1087         * Misc/WebCache.mm:
1088         (+[WebCache empty]):
1089         * WebView/WebView.mm:
1090         (+[WebView _setCacheModel:]):
1091
1092 2008-05-13  chris fleizach  <cfleizach@apple.com>
1093
1094         Reviewed by Beth Dakin
1095
1096         <rdar://problem/4780592> WebKit application has its window announced as HTML content
1097
1098         * WebCoreSupport/WebViewFactory.mm:
1099         (-[WebViewFactory AXWebAreaText]):
1100
1101 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1102
1103         Fixes a crash seen in Xcode where CallUIDelegateReturningBoolean
1104         was referencing a nil WebView under validateUserInterfaceItem.
1105         The validateUserInterfaceItem methods was being called at a time
1106         when the WebHTMLView is being torndown.
1107
1108         <rdar://problem/5806229> A crash occurs at CallUIDelegateReturningBoolean()
1109         while mousing down on menu bar after Xcode News window is opened
1110
1111         Reviewed by Ada Chan.
1112
1113         * WebView/WebHTMLView.mm:
1114         (-[WebHTMLView validateUserInterfaceItem:]): NULL check the WebView and
1115         return NO when it is nil. Adds a comment.
1116         * WebView/WebPDFView.mm:
1117         (-[WebPDFView validateUserInterfaceItem:]): Ditto.
1118
1119 2008-05-13  Mark Rowe  <mrowe@apple.com>
1120
1121         Reviewed by John Sullivan.
1122
1123         <rdar://problem/5926425> HIWebViewCreateWithClass declared as API in HIWebView.h but never exported from WebKit.framework
1124
1125         * Carbon/HIWebView.h: Remove HIWebViewCreateWithClass.
1126         * Carbon/HIWebView.m: Ditto.
1127         (HIWebViewCreate):
1128         (HIWebViewConstructor):
1129
1130 2008-05-12  Dan Bernstein  <mitz@apple.com>
1131
1132         Reviewed by Ada Chan.
1133
1134         - WebKit/mac changes for https://bugs.webkit.org/show_bug.cgi?id=17097
1135           <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
1136
1137         Added font cache statistics and a function to purge inactive font data.
1138
1139         * Misc/WebCoreStatistics.h:
1140         * Misc/WebCoreStatistics.mm:
1141         (+[WebCoreStatistics cachedFontDataCount]):
1142         (+[WebCoreStatistics cachedFontDataInactiveCount]):
1143         (+[WebCoreStatistics purgeInactiveFontData]):
1144         (+[WebCoreStatistics glyphPageCount]):
1145
1146 2008-05-12  Mark Rowe  <mrowe@apple.com>
1147
1148         Reviewed by Tim Hatcher.
1149
1150         Decorate some deprecated delegate methods with the availability macros.
1151
1152         The compiler doesn't appear to warn if a delegate implements these methods, but using the availability
1153         macros is good for consistency and documentation.
1154
1155         * WebView/WebFrameLoadDelegate.h:
1156         * WebView/WebUIDelegate.h:
1157
1158 2008-05-12  Mark Rowe  <mrowe@apple.com>
1159
1160         Reviewed by Tim Hatcher.
1161
1162         <rdar://problem/5835604> Deprecate HIWebView
1163
1164         Use of HIWebView is deprecated in favor of embedding a WebView in a HICocoaView.
1165
1166         * Carbon/CarbonUtils.h: Include the availability macro header and decorate the functions appropriately.
1167         * Carbon/HIWebView.h: Ditto.
1168
1169 2008-05-12  Kevin Decker  <kdecker@apple.com>
1170
1171         Reviewed by Anders.
1172
1173         Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
1174         
1175         Re-added these SPI methods because they are needed by some clients. They were accidentally removed
1176         in changeset <http://trac.webkit.org/changeset/31028>
1177         
1178         * Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header.
1179         * WebView/WebFrame.mm:
1180         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd.
1181         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto.
1182         * WebView/WebFrameInternal.h: Ditto.
1183         * WebView/WebHTMLView.mm: Ditto.
1184         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto.
1185         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
1186         * WebView/WebHTMLViewInternal.h: Ditto.
1187         * WebView/WebHTMLViewPrivate.h: Ditto.
1188
1189 2008-05-12  Anders Carlsson  <andersca@apple.com>
1190
1191         Reviewed by Alexey.
1192
1193         Empty the application cache when changing the cache model.
1194         
1195         * WebView/WebView.mm:
1196         (+[WebView _setCacheModel:]):
1197
1198 2008-05-12  Anders Carlsson  <andersca@apple.com>
1199
1200         Reviewed by Oliver.
1201
1202         <rdar://problem/5774495> Make Unicode text input possible in Netscape-style plug-ins
1203         
1204         * Plugins/WebBaseNetscapePluginView.h:
1205         * Plugins/WebBaseNetscapePluginView.mm:
1206         (-[WebBaseNetscapePluginView start]):
1207         Get the plug-in text input vtable pointer.
1208         
1209         (-[WebBaseNetscapePluginView stop]):
1210         Set the plug-in text input vtable pointer to 0.
1211         
1212         (-[WebBaseNetscapePluginView inputContext]):
1213         Return 0 for Carbon plug-ins since we don't want Cocoa to handle text input for them.
1214         
1215         (-[WebBaseNetscapePluginView hasMarkedText]):        
1216         (-[WebBaseNetscapePluginView insertText:]):
1217         (-[WebBaseNetscapePluginView markedRange]):
1218         (-[WebBaseNetscapePluginView selectedRange]):
1219         (-[WebBaseNetscapePluginView setMarkedText:selectedRange:]):
1220         (-[WebBaseNetscapePluginView unmarkText]):
1221         (-[WebBaseNetscapePluginView validAttributesForMarkedText]):
1222         (-[WebBaseNetscapePluginView attributedSubstringFromRange:]):
1223         (-[WebBaseNetscapePluginView characterIndexForPoint:]):
1224         (-[WebBaseNetscapePluginView doCommandBySelector:]):
1225         (-[WebBaseNetscapePluginView firstRectForCharacterRange:]):
1226         (-[WebBaseNetscapePluginView conversationIdentifier]):
1227         Implement NSTextInput and call into the plug-in text input vtable.
1228         
1229         (browserTextInputFuncs):
1230         New method which returns the browser input vtable.
1231         
1232         (-[WebBaseNetscapePluginView getVariable:value:]):
1233         Support getting the browser input vtable pointer.
1234         
1235         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1236         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1237         (WebNetscapePluginEventHandlerCocoa::keyDown):
1238         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1239         If the plug-in returns 0 when a NPCocoaEventKeyDown is passed to NPP_HandleEvent,
1240         it means that the event should be passed on to the input manager.
1241          
1242         * Plugins/npapi.mm:
1243         (NPN_MarkedTextAbandoned):
1244         (NPN_MarkedTextSelectionChanged):
1245         Add implementations of browser input method methods.
1246         
1247         * Plugins/nptextinput.h: Added.
1248         Add file with new text input API.
1249
1250 2008-05-12  Alexey Proskuryakov  <ap@webkit.org>
1251
1252         Roll out recent  threading changes (r32807, r32810, r32819, r32822) to simplify
1253         SquirrelFish merging.
1254
1255         * Misc/WebCoreStatistics.mm:
1256         (+[WebCoreStatistics javaScriptObjectsCount]):
1257         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
1258         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
1259         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
1260         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
1261         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
1262         * WebView/WebScriptDebugDelegate.mm:
1263         (-[WebScriptCallFrame evaluateWebScript:]):
1264
1265 2008-05-07  Anders Carlsson  <andersca@apple.com>
1266
1267         Reviewed by Mitz.
1268
1269         REGRESSION (3.1.1-TOT): Arrow keys are sticky in Google Maps street view
1270         https://bugs.webkit.org/show_bug.cgi?id=18880
1271         <rdar://problem/5909513>
1272
1273         Stop suspending key up events before calling handleEvent.
1274         
1275         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1276         (WebNetscapePluginEventHandlerCarbon::sendEvent):
1277
1278 2008-05-06  Stephanie Lewis  <slewis@apple.com>
1279
1280         Reviewed by Andersca.
1281
1282         prepare for plugin fast teardown work - make WebPluginDatabase a objective C++ file.
1283
1284         * Plugins/WebPluginDatabase.m: Removed.
1285         * Plugins/WebPluginDatabase.mm: Copied from WebKit/mac/Plugins/WebPluginDatabase.m.
1286         * Plugins/npapi.m: Removed.
1287         * Plugins/npapi.mm: Copied from WebKit/mac/Plugins/npapi.m.
1288
1289 2008-05-06  Anders Carlsson  <andersca@apple.com>
1290
1291         Reviewed by Darin.
1292
1293         Initialize numArchs to 0.
1294         
1295         * Plugins/WebBasePluginPackage.m:
1296         (-[WebBasePluginPackage isNativeLibraryData:]):
1297
1298 2008-05-06  Anders Carlsson  <andersca@apple.com>
1299
1300         Reviewed by Darin.
1301
1302         Add implementation of NPN_PopUpContextMenu.
1303         
1304         * Plugins/WebBaseNetscapePluginView.mm:
1305         (-[WebBaseNetscapePluginView popUpContextMenu:]):
1306         * Plugins/WebBaseNetscapePluginViewPrivate.h:
1307         * Plugins/WebNetscapePluginPackage.m:
1308         (-[WebNetscapePluginPackage load]):
1309         * Plugins/npapi.m:
1310         (NPN_PopUpContextMenu):
1311
1312 2008-05-06  Anders Carlsson  <andersca@apple.com>
1313
1314         Fix typo (don't read random memory).
1315         
1316         * Plugins/WebBasePluginPackage.m:
1317         (-[WebBasePluginPackage isNativeLibraryData:]):
1318
1319 2008-05-05  Anders Carlsson  <andersca@apple.com>
1320
1321         Reviewed by Darin.
1322
1323         Change the isNativeLibraryData: method to handle universal binaries.
1324         
1325         * Plugins/WebBasePluginPackage.m:
1326         (swapIntsInHeader):
1327         (-[WebBasePluginPackage isNativeLibraryData:]):
1328
1329 2008-05-06  Brady Eidson  <beidson@apple.com>
1330
1331         Reviewed by Darin Adler
1332
1333         Preparation for upcoming work making LocalStorage persistent.
1334
1335         When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
1336
1337         * WebView/WebView.mm:
1338         (+[WebView _applicationWillTerminate]):  Close all LocalStorage areas before quitting.
1339
1340 2008-05-05  Sam Weinig  <sam@webkit.org>
1341
1342         Reviewed by Darin Adler.
1343
1344         Fix for <rdar://problem/5884383>
1345         Escape look-a-like characters from the the entire url.
1346
1347         * Misc/WebNSURLExtras.mm:
1348         (escapeUnsafeCharacters):
1349         (-[NSURL _web_userVisibleString]):
1350
1351 2008-05-05  Justin Garcia  <justin.garcia@apple.com>
1352
1353         Reviewed by Darin.
1354         
1355         <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end
1356
1357         * WebView/WebView.mm:
1358         (-[WebView _updateSettingsFromPreferences:]): Disable Range mutation on changes to
1359         the document for Tiger and Leopard Mail.  There is code in Mail that does it, and
1360         the two interfere.
1361
1362 2008-05-05  Sam Weinig  <sam@webkit.org>
1363
1364         Reviewed by Tim Hatcher.
1365
1366         Make the Inspector's localizable strings file match the format used by Dashboard widgets.
1367
1368         * WebCoreSupport/WebInspectorClient.mm:
1369         (WebInspectorClient::localizedStringsURL):
1370
1371 2008-05-05  Anders Carlsson  <andersca@apple.com>
1372
1373         Reviewed by Jess.
1374
1375         Apparently preflighting can cause hangs for some reason. Revert this for now.
1376         
1377         * Plugins/WebNetscapePluginPackage.m:
1378         (-[WebNetscapePluginPackage _initWithPath:]):
1379         * Plugins/WebPluginPackage.m:
1380         (-[WebPluginPackage initWithPath:]):
1381
1382 2008-05-05  Darin Adler  <darin@apple.com>
1383
1384         Reviewed by Mitz.
1385
1386         - https://bugs.webkit.org/show_bug.cgi?id=18789
1387           fix some shouldCloseWithWindow edge cases
1388
1389         * WebView/WebView.mm:
1390         (-[WebView viewWillMoveToWindow:]): Fix bug where we would stop observing the
1391         NSWindowWillCloseNotification if the view was moved out of the window but still
1392         had that window set as the host window. Also make sure this function doesn't do
1393         anything if the WebView is already closed.
1394         (-[WebView setHostWindow:]): Ditto.
1395
1396 2008-05-04  David Kilzer  <ddkilzer@apple.com>
1397
1398         Make parameters match for WebChromeClient::addMessageToConsole()
1399
1400         Reviewed by John.
1401
1402         * WebCoreSupport/WebChromeClient.h:
1403         (WebChromeClient::addMessageToConsole): Renamed sourceID parameter
1404         to sourceURL to match implementation in WebChromeClient.mm.
1405
1406 2008-05-02  Anders Carlsson  <andersca@apple.com>
1407
1408         Reviewed by Mark.
1409
1410         Various Cocoa event model and 64-bit plug-in fixes.
1411         
1412         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1413         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
1414         Set click count.
1415         
1416         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1417         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1418         Don't try to get the mouse location for keyboard events.
1419         
1420         * Plugins/WebPluginPackage.m:
1421         (-[WebPluginPackage initWithPath:]):
1422         Preflight the bundle so we won't show 32-bit WebKit plug-ins when running as 64-bit.
1423
1424 2008-05-02  Anders Carlsson  <andersca@apple.com>
1425
1426         Reviewed by Sam.
1427
1428         The event union is now named.
1429         
1430         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1431         (WebNetscapePluginEventHandlerCocoa::drawRect):
1432         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
1433         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1434         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1435         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
1436         (WebNetscapePluginEventHandlerCocoa::focusChanged):
1437
1438 2008-05-02  Anders Carlsson  <andersca@apple.com>
1439
1440         Reviewed by Mark.
1441
1442         Make sure that 32-bit only plug-ins aren't shown when running as 64-bit.
1443         
1444         Call preflightAndReturnError on the bundle, which will check if any of the architectures
1445         in the bundle match the current architecture.
1446         
1447         * Plugins/WebNetscapePluginPackage.m:
1448         (-[WebNetscapePluginPackage _initWithPath:]):
1449
1450 2008-05-02  Alexey Proskuryakov  <ap@webkit.org>
1451
1452         Reviewed by Geoffrey Garen.
1453
1454         https://bugs.webkit.org/show_bug.cgi?id=18826
1455         Make JavaScript heap per-thread
1456
1457         * Misc/WebCoreStatistics.mm:
1458         (+[WebCoreStatistics javaScriptObjectsCount]):
1459         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
1460         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
1461         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
1462         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
1463         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
1464         Replaced static Collector calls with calls to a current thread's instance.
1465
1466         * WebView/WebScriptDebugDelegate.mm:
1467         (-[WebScriptCallFrame evaluateWebScript:]):
1468         Pass ExecState to jsString().
1469
1470 2008-05-01  Anders Carlsson  <andersca@apple.com>
1471
1472         Reviewed by Mark.
1473
1474         64-bit NPAPI plugin build fixes.
1475         
1476         * Plugins/WebBaseNetscapePluginView.mm:
1477         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1478         (-[WebBaseNetscapePluginView updateAndSetWindow]):
1479         (-[WebBaseNetscapePluginView start]):
1480         (-[WebBaseNetscapePluginView windowBecameKey:]):
1481         * Plugins/WebNetscapeDeprecatedFunctions.c:
1482         * Plugins/WebNetscapeDeprecatedFunctions.h:
1483         * Plugins/WebNetscapePluginEventHandler.mm:
1484         (WebNetscapePluginEventHandler::create):
1485         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1486         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1487         * Plugins/WebPluginDatabase.m:
1488         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
1489
1490 2008-05-01  Anders Carlsson  <andersca@apple.com>
1491
1492         Reviewed by Tim.
1493
1494         Remove duplicate npfunctions.h header from WebKit.
1495
1496         * MigrateHeaders.make:
1497         Migrate npfunctions.h
1498         
1499         * Plugins/npfunctions.h: Removed.
1500
1501 2008-05-01  Anders Carlsson  <andersca@apple.com>
1502
1503         Reviewed by John.
1504         
1505         Add null checks for the event handler.
1506         
1507         * Plugins/WebBaseNetscapePluginView.mm:
1508         (-[WebBaseNetscapePluginView stopTimers]):
1509         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
1510
1511 2008-05-01  Anders Carlsson  <andersca@apple.com>
1512
1513         Fix 64-bit build.
1514         
1515         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1516         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1517         * WebCoreSupport/WebFrameLoaderClient.mm:
1518
1519 2008-05-01  Anders Carlsson  <andersca@apple.com>
1520
1521         Fix build.
1522         
1523         * Plugins/npfunctions.h:
1524
1525 2008-05-01  Anders Carlsson  <andersca@apple.com>
1526
1527         Reviewed by Adam.
1528
1529         Forward mouse move events to the Netscape plug-in view.
1530         
1531         * Plugins/WebBaseNetscapePluginView.h:
1532         * Plugins/WebBaseNetscapePluginView.mm:
1533         (-[WebBaseNetscapePluginView handleMouseMoved:]):
1534         New method that just calls the current event handler.
1535         
1536         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1537         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1538         NSFlagsChanged is not a regular keyboard event and some of the NSEvent accessors
1539         don't work on it so don't call them.
1540         
1541         * WebCoreSupport/WebFrameLoaderClient.mm:
1542         (NetscapePluginWidget::NetscapePluginWidget):
1543         New Widget subclass to be used for Netscape plug-ins.
1544         
1545         (NetscapePluginWidget::handleEvent):
1546         Forward NSMouseMoved events to the plug-in.
1547         
1548         (WebFrameLoaderClient::createPlugin):
1549         Wrap the plug-in view in a NetscapePluginWidget.
1550
1551 2008-05-01  Alp Toker  <alp@nuanti.com>
1552
1553         Rubber-stamped by Anders.
1554
1555         GTK+ build fix for changes in r32752. Use int32, not int32_t types in
1556         npapi.h.
1557
1558         Additional fix to use same signedness in npapi.h and Mac for the
1559         interval parameter.
1560
1561         * Plugins/WebBaseNetscapePluginView.h:
1562         * Plugins/WebBaseNetscapePluginView.mm:
1563         (PluginTimer::PluginTimer):
1564         (-[WebBaseNetscapePluginView stopTimers]):
1565         (-[WebBaseNetscapePluginView restartTimers]):
1566         (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
1567         (-[WebBaseNetscapePluginView unscheduleTimer:]):
1568         * Plugins/WebBaseNetscapePluginViewPrivate.h:
1569         * Plugins/npapi.m:
1570         (NPN_ScheduleTimer):
1571         (NPN_UnscheduleTimer):
1572         * Plugins/npfunctions.h:
1573
1574 2008-04-30  Anders Carlsson  <andersca@apple.com>
1575
1576         Reviewed by Adam.
1577
1578         Add new Cocoa event model and the NPN_ScheduleTimer/NPN_UnscheduleTimer methods.
1579         
1580         * Plugins/WebBaseNetscapePluginView.h:
1581         * Plugins/WebBaseNetscapePluginView.mm:
1582         (PluginTimer::PluginTimer):
1583         (PluginTimer::start):
1584         (PluginTimer::fired):
1585         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1586         (-[WebBaseNetscapePluginView stopTimers]):
1587         (-[WebBaseNetscapePluginView restartTimers]):
1588         (-[WebBaseNetscapePluginView scrollWheel:]):
1589         (-[WebBaseNetscapePluginView flagsChanged:]):
1590         (-[WebBaseNetscapePluginView start]):
1591         (-[WebBaseNetscapePluginView eventModel]):
1592         (-[WebBaseNetscapePluginView fini]):
1593         (-[WebBaseNetscapePluginView getVariable:value:]):
1594         (-[WebBaseNetscapePluginView setVariable:value:]):
1595         (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
1596         (-[WebBaseNetscapePluginView unscheduleTimer:]):
1597         * Plugins/WebBaseNetscapePluginViewInternal.h:
1598         * Plugins/WebBaseNetscapePluginViewPrivate.h:
1599         * Plugins/WebNetscapePluginEventHandler.h:
1600         * Plugins/WebNetscapePluginEventHandler.mm:
1601         (WebNetscapePluginEventHandler::create):
1602         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1603         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1604         (WebNetscapePluginEventHandlerCarbon::scrollWheel):
1605         (WebNetscapePluginEventHandlerCarbon::flagsChanged):
1606         (WebNetscapePluginEventHandlerCarbon::platformWindow):
1607         * Plugins/WebNetscapePluginEventHandlerCocoa.h: Added.
1608         (WebNetscapePluginEventHandlerCocoa::startTimers):
1609         (WebNetscapePluginEventHandlerCocoa::stopTimers):
1610         * Plugins/WebNetscapePluginEventHandlerCocoa.mm: Added.
1611         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
1612         (WebNetscapePluginEventHandlerCocoa::drawRect):
1613         (WebNetscapePluginEventHandlerCocoa::mouseDown):
1614         (WebNetscapePluginEventHandlerCocoa::mouseDragged):
1615         (WebNetscapePluginEventHandlerCocoa::mouseEntered):
1616         (WebNetscapePluginEventHandlerCocoa::mouseExited):
1617         (WebNetscapePluginEventHandlerCocoa::mouseMoved):
1618         (WebNetscapePluginEventHandlerCocoa::mouseUp):
1619         (WebNetscapePluginEventHandlerCocoa::scrollWheel):
1620         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
1621         (WebNetscapePluginEventHandlerCocoa::keyDown):
1622         (WebNetscapePluginEventHandlerCocoa::keyUp):
1623         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1624         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1625         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
1626         (WebNetscapePluginEventHandlerCocoa::focusChanged):
1627         (WebNetscapePluginEventHandlerCocoa::platformWindow):
1628         (WebNetscapePluginEventHandlerCocoa::sendEvent):
1629         * Plugins/WebNetscapePluginPackage.m:
1630         (-[WebNetscapePluginPackage load]):
1631         * Plugins/npapi.m:
1632         (NPN_ScheduleTimer):
1633         (NPN_UnscheduleTimer):
1634         * Plugins/npfunctions.h:
1635
1636 2008-04-30  Brady Eidson  <beidson@apple.com>
1637
1638         Fix my WebPreferences revert check-in
1639
1640         * WebView/WebView.mm:
1641         (-[WebView _preferencesChangedNotification:]):
1642
1643 2008-04-30  Brady Eidson  <beidson@apple.com>
1644
1645         Rubberstamped by John Sullivan
1646
1647         Revert the remainder of my original preferences changes from last week.
1648         They caused a massive PLT regression (too many notifications being sent out
1649         or listened to that weren't previously) and it's not in my schedule to refine
1650         the preferences code instead of working on my feature!
1651
1652         * WebView/WebView.mm:
1653         (-[WebView _updateSettingsFromPreferences:]):
1654         (-[WebView _commonInitializationWithFrameName:groupName:]):
1655
1656 2008-04-30  Anders Carlsson  <andersca@apple.com>
1657
1658         Fix the 64-bit build.
1659         
1660         * Plugins/WebNetscapePluginEventHandler.h:
1661         * Plugins/WebNetscapePluginEventHandler.mm:
1662         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1663         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1664
1665 2008-04-29  David D. Kilzer  <ddkilzer@apple.com>
1666
1667         BUILD FIX for Release build.
1668
1669         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1670         (WebNetscapePluginEventHandlerCarbon::drawRect): Declare acceptedEvent
1671         separately so the compiler doesn't complain about an unused variable.
1672         (WebNetscapePluginEventHandlerCarbon::TSMEventHandler): Ditto.
1673
1674 2008-04-29  Anders Carlsson  <andersca@apple.com>
1675
1676         Reviewed by Adam.
1677
1678         Refactor the Carbon event handling code out into a separate class in preparation for adding
1679         the Cocoa event handling code.
1680         
1681         * Plugins/WebBaseNetscapePluginView.h:
1682         * Plugins/WebBaseNetscapePluginView.mm:
1683         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
1684         (-[WebBaseNetscapePluginView sendActivateEvent:]):
1685         (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
1686         (-[WebBaseNetscapePluginView stopTimers]):
1687         (-[WebBaseNetscapePluginView restartTimers]):
1688         (-[WebBaseNetscapePluginView setHasFocus:]):
1689         (-[WebBaseNetscapePluginView mouseDown:]):
1690         (-[WebBaseNetscapePluginView mouseUp:]):
1691         (-[WebBaseNetscapePluginView mouseEntered:]):
1692         (-[WebBaseNetscapePluginView mouseExited:]):
1693         (-[WebBaseNetscapePluginView mouseDragged:]):
1694         (-[WebBaseNetscapePluginView keyUp:]):
1695         (-[WebBaseNetscapePluginView keyDown:]):
1696         (-[WebBaseNetscapePluginView cut:]):
1697         (-[WebBaseNetscapePluginView copy:]):
1698         (-[WebBaseNetscapePluginView paste:]):
1699         (-[WebBaseNetscapePluginView selectAll:]):
1700         (-[WebBaseNetscapePluginView start]):
1701         (-[WebBaseNetscapePluginView stop]):
1702         (-[WebBaseNetscapePluginView fini]):
1703         (-[WebBaseNetscapePluginView drawRect:]):
1704         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
1705         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
1706         (-[WebBaseNetscapePluginView windowBecameKey:]):
1707         (-[WebBaseNetscapePluginView windowResignedKey:]):
1708         (-[WebBaseNetscapePluginView windowDidMiniaturize:]):
1709         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]):
1710         (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]):
1711         (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]):
1712         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
1713         (-[WebBaseNetscapePluginView _viewHasMoved]):
1714         * Plugins/WebBaseNetscapePluginViewInternal.h:
1715         * Plugins/WebNetscapePluginEmbeddedView.h:
1716         * Plugins/WebNetscapePluginEventHandler.h: Added.
1717         (WebNetscapePluginEventHandler::~WebNetscapePluginEventHandler):
1718         (WebNetscapePluginEventHandler::currentEventIsUserGesture):
1719         (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler):
1720         * Plugins/WebNetscapePluginEventHandler.mm: Added.
1721         (WebNetscapePluginEventHandler::create):
1722         * Plugins/WebNetscapePluginEventHandlerCarbon.h: Added.
1723         * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Added.
1724         (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon):
1725         (getCarbonEvent):
1726         (modifiersForEvent):
1727         (WebNetscapePluginEventHandlerCarbon::sendNullEvent):
1728         (WebNetscapePluginEventHandlerCarbon::drawRect):
1729         (WebNetscapePluginEventHandlerCarbon::mouseDown):
1730         (WebNetscapePluginEventHandlerCarbon::mouseUp):
1731         (WebNetscapePluginEventHandlerCarbon::mouseEntered):
1732         (WebNetscapePluginEventHandlerCarbon::mouseExited):
1733         (WebNetscapePluginEventHandlerCarbon::mouseDragged):
1734         (WebNetscapePluginEventHandlerCarbon::mouseMoved):
1735         (WebNetscapePluginEventHandlerCarbon::keyDown):
1736         (keyMessageForEvent):
1737         (WebNetscapePluginEventHandlerCarbon::keyUp):
1738         (WebNetscapePluginEventHandlerCarbon::focusChanged):
1739         (WebNetscapePluginEventHandlerCarbon::windowFocusChanged):
1740         (WebNetscapePluginEventHandlerCarbon::TSMEventHandler):
1741         (WebNetscapePluginEventHandlerCarbon::installKeyEventHandler):
1742         (WebNetscapePluginEventHandlerCarbon::removeKeyEventHandler):
1743         (WebNetscapePluginEventHandlerCarbon::nullEventTimerFired):
1744         (WebNetscapePluginEventHandlerCarbon::startTimers):
1745         (WebNetscapePluginEventHandlerCarbon::stopTimers):
1746         (WebNetscapePluginEventHandlerCarbon::sendEvent):
1747
1748 2008-04-29  Mark Rowe  <mrowe@apple.com>
1749
1750         Reviewed by David Harrison.
1751
1752         Ensure that WebDynamicScrollBarsView defines WebCoreScrollbarAlwaysOn to keep Mail building.
1753
1754         * WebKit.exp:
1755         * WebView/WebDynamicScrollBarsView.h:
1756         * WebView/WebDynamicScrollBarsView.m:
1757
1758 2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
1759
1760         Reviewed by Darin.
1761
1762         Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
1763
1764         * WebCoreSupport/WebChromeClient.h:
1765         * WebCoreSupport/WebChromeClient.mm:
1766         * WebView/WebClipView.m:
1767         (-[WebClipView scrollWheel:]):
1768         * WebView/WebHTMLView.mm:
1769         (-[WebHTMLView addMouseMovedObserver]):
1770         (-[WebHTMLView removeMouseMovedObserver]):
1771         (-[WebHTMLView acceptsFirstMouse:]):
1772         * WebView/WebUIDelegatePrivate.h:
1773         * WebView/WebView.mm:
1774         (-[WebViewPrivate init]):
1775         * WebView/WebViewPrivate.h:
1776
1777 2008-04-28  Rob Buis  <buis@kde.org>
1778
1779         Reviewed by Maciej.
1780
1781         Build fix for Tiger.
1782
1783         * WebView/WebView.mm:
1784         (WebKitInitializeApplicationCachePathIfNecessary):
1785
1786 2008-04-28  Adele Peterson  <adele@apple.com>
1787
1788         Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler.
1789
1790         WebKit part of fix for <rdar://problem/3709505>
1791         Safari should have a way to upload bundles from the file upload control (as zip)
1792
1793         Added UIDelegate methods to let the application handle generating replacement files for uploads.
1794         In this case, Safari will create archived files for bundles so they can be uploaded properly.
1795
1796         * DefaultDelegates/WebDefaultUIDelegate.m:
1797         (-[WebDefaultUIDelegate webView:shouldReplaceUploadFile:usingGeneratedFilename:]):
1798         (-[WebDefaultUIDelegate webView:generateReplacementFile:]):
1799         * WebCoreSupport/WebChromeClient.h:
1800         * WebCoreSupport/WebChromeClient.mm:
1801         (WebChromeClient::shouldReplaceWithGeneratedFileForUpload):
1802         (WebChromeClient::generateReplacementFile):
1803         * WebView/WebUIDelegatePrivate.h:
1804
1805 2008-04-28  Anders Carlsson  <andersca@apple.com>
1806
1807         Reviewed by Sam, Mark, Adele and Darin.
1808
1809         Initialize the application cache path.
1810         
1811         * WebView/WebView.mm:
1812         (WebKitInitializeApplicationCachePathIfNecessary):
1813         (-[WebView _commonInitializationWithFrameName:groupName:]):
1814
1815 2008-04-28  Alice Liu  <alice.liu@apple.com>
1816
1817         Reviewed by Darin.
1818
1819         Fix <rdar://problem/4911289> Add tabindex property to all children 
1820         of HTMLElement (7138)
1821         http://bugs.webkit.org/show_bug.cgi?id=7138
1822
1823         * MigrateHeaders.make:
1824         Removing DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h
1825         because now that focus() has been moved to DOMHTMLElement.h, these
1826         files are no longer needed.
1827
1828 2008-04-25  Alexey Proskuryakov  <ap@webkit.org>
1829
1830         Reviewed by Darin.
1831
1832         Fix run-webkit-tests --threading
1833         and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
1834         Proxy server issue in Sunday's Nightly
1835
1836         * WebView/WebView.mm: (-[WebViewPrivate init]): Initialize threading. Previously, this was
1837         only done from icon database code, which is not robust enough.
1838
1839 2008-04-20 Adam Barth <hk9565@gmail.com>
1840
1841         Reviewed by Adam Roben and Sam Weinig.
1842
1843         Updated WebSecurityOrigin to match new SecurityOrigin API.
1844
1845         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
1846
1847         * Storage/WebSecurityOrigin.mm:
1848         (-[WebSecurityOrigin host]):
1849         (-[WebSecurityOrigin domain]):
1850         * Storage/WebSecurityOriginPrivate.h:
1851
1852 2008-04-25  Mark Rowe  <mrowe@apple.com>
1853
1854         Rubber-stamped by Sam Weinig.
1855
1856         Add some content to an empty ICU header file to prevent verification errors.
1857
1858         * icu/unicode/utf_old.h:
1859
1860 2008-04-25  Anders Carlsson  <andersca@apple.com>
1861
1862         Reviewed by Sam.
1863
1864         Add offlineWebApplicationCacheEnabled preference.
1865         
1866         * WebView/WebPreferenceKeysPrivate.h:
1867         * WebView/WebPreferences.m:
1868         (+[WebPreferences initialize]):
1869         (-[WebPreferences offlineWebApplicationCacheEnabled]):
1870         (-[WebPreferences setOfflineWebApplicationCacheEnabled:]):
1871         * WebView/WebPreferencesPrivate.h:
1872         * WebView/WebView.mm:
1873         (-[WebView _updateSettingsFromPreferences:]):
1874
1875 2008-04-24  Mark Rowe  <mrowe@apple.com>
1876
1877         Reviewed by Sam Weinig.
1878
1879         Remove code for calculating the glyph cache size.
1880
1881         * WebCoreSupport/WebSystemInterface.m:
1882         (InitWebCoreSystemInterface): Remove unused symbol.
1883
1884 2008-04-24  Mark Rowe  <mrowe@apple.com>
1885
1886         Reviewed by Sam Weinig.
1887
1888         Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
1889
1890         * WebKitPrefix.h:
1891
1892 2008-04-24  Brady Eidson  <beidson@apple.com>
1893
1894         Reviewed by Darin
1895
1896         Fix layout test regressions from my earlier preferences/settings tweak.
1897
1898         * WebView/WebView.mm:
1899         (-[WebView _commonInitializationWithFrameName:groupName:]): Even if we're not posting
1900           the notification to update the settings, each WebView still needs to register for the
1901           notification - restore that behavior.
1902
1903 2008-04-24  Dan Bernstein  <mitz@apple.com>
1904
1905         Reviewed by Darin Adler.
1906
1907         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
1908           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
1909
1910         * WebView/WebFrame.mm:
1911         (-[WebFrame _caretRectAtNode:offset:affinity:]): Changed to use
1912         VisiblePosition::caretRect() instead of the RenderObject method which
1913         was removed.
1914
1915 2008-04-24  Brady Eidson  <beidson@apple.com>
1916
1917         Reviewed by Darin
1918
1919         Rework the Settings population again.
1920
1921         * WebView/WebView.mm:
1922         (-[WebView _updateSettingsFromPreferences:]): This method is called both from _preferencesChangedNotification
1923           and directly from WebView's common init function.
1924         (-[WebView _preferencesChangedNotification:]):
1925         (-[WebView _commonInitializationWithFrameName:groupName:]): Call _updateSettingsFromPreferences immediately
1926           after creating the new Page
1927
1928 2008-04-24  Darin Adler  <darin@apple.com>
1929
1930         Reviewed by Geoff.
1931
1932         - fix crash in regression test where we'd ask a frame for a user agent string
1933           after the WebView was already closed
1934
1935         * WebCoreSupport/WebFrameLoaderClient.mm:
1936         (WebFrameLoaderClient::userAgent): Assert that the WebView is not nil. Also
1937         added some code to prevent the crash in release builds if this problem happens
1938         again.
1939
1940 2008-04-24  Anders Carlsson  <andersca@apple.com>
1941
1942         Reviewed by Sam.
1943
1944         Change some String arguments to be const references instead.
1945
1946         * WebCoreSupport/WebEditorClient.h:
1947         * WebCoreSupport/WebEditorClient.mm:
1948         (WebEditorClient::shouldInsertText):
1949
1950 2008-04-24  John Sullivan  <sullivan@apple.com>
1951
1952         Mac build fix
1953         
1954         * WebCoreSupport/WebViewFactory.mm:
1955         (-[WebViewFactory AXButtonActionVerb]):
1956         implement this method using the text in WebCoreLocalizedStrings.cpp
1957         (-[WebViewFactory AXRadioButtonActionVerb]):
1958         ditto
1959         (-[WebViewFactory AXTextFieldActionVerb]):
1960         ditto
1961         (-[WebViewFactory AXCheckedCheckBoxActionVerb]):
1962         ditto
1963         (-[WebViewFactory AXUncheckedCheckBoxActionVerb]):
1964         ditto
1965         (-[WebViewFactory AXLinkActionVerb]):
1966         ditto
1967
1968 2008-04-23  Brady Eidson  <beidson@apple.com>
1969
1970         Reviewed by Sam Weinig
1971
1972         In some current work I noticed that when a new Page is created, it is possible that it requires info from its Settings
1973         object before the Settings object is initialized.  It seems quite prudent to post the preferences changed notification,
1974         thereby populating the Settings object, immediately after the Page is created.
1975
1976         * WebView/WebView.mm:
1977         (-[WebView _commonInitializationWithFrameName:groupName:]): Post the notification right after the Page is created
1978
1979 2008-04-24  John Sullivan  <sullivan@apple.com>
1980
1981         Reviewed by Jess
1982         
1983         - fixed <rdar://problem/5886655> JavaScript input panel automatic resizing doesn't work right with HiDPI
1984
1985         * Misc/WebNSControlExtras.m:
1986         (-[NSControl sizeToFitAndAdjustWindowHeight]):
1987         deploy userSpaceScaleFactor when using view distances on the window
1988
1989 2008-04-22  Anders Carlsson  <andersca@apple.com>
1990
1991         Reviewed by Darin.
1992
1993         Add NPN_Construct and NPN_PluginThreadAsyncCall declarations.
1994         
1995         * Plugins/npfunctions.h:
1996
1997 2008-04-20  Matt Lilek  <webkit@mattlilek.com>
1998
1999         Mysteriously reviewed by mitz|away.
2000
2001         Bug 18111: Closing a tab while dragging crashes Safari
2002         https://bugs.webkit.org/show_bug.cgi?id=18111
2003
2004         Null check the page before handling drag events.
2005
2006         * WebView/WebView.mm:
2007         (-[WebView draggingUpdated:]):
2008         (-[WebView draggingExited:]):
2009
2010 2008-04-19  Brady Eidson  <beidson@apple.com>
2011
2012         Reviewed by Tim Hatcher
2013
2014         Add a WebPreference for the path of the local storage persistent store.
2015
2016         * WebView/WebPreferenceKeysPrivate.h:
2017
2018         * WebView/WebPreferences.m:
2019         (-[WebPreferences _localStorageDatabasePath]):
2020         (-[WebPreferences _setLocalStorageDatabasePath:]):
2021         * WebView/WebPreferencesPrivate.h:
2022
2023         * WebView/WebView.mm:
2024         (-[WebView _preferencesChangedNotification:]):
2025
2026 2008-04-18  Brady Eidson  <beidson@apple.com>
2027
2028         Reviewed by Sam Weinig
2029
2030         Don't clear the PageGroup on _close, as the WebCore::Page destructor already does this.
2031         No reason to do the work twice...
2032
2033         * WebView/WebView.mm:
2034         (-[WebView _close]):
2035
2036 2008-04-17  Eric Seidel  <eric@webkit.org>
2037
2038         Reviewed by beth.
2039
2040         Rename Frame::renderer() to contentRenderer() and fix uses.
2041
2042         * Misc/WebCoreStatistics.mm:
2043         * WebView/WebRenderNode.mm:
2044         (-[WebRenderNode initWithWebFrameView:]):
2045
2046 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
2047
2048         Reviewed by mrowe.
2049
2050         * WebView/WebFrame.mm: Remove temporary build fix.
2051
2052 2008-04-17  Mark Rowe  <mrowe@apple.com>
2053
2054         Reviewed by Dan Bernstein.
2055
2056         Fix <rdar://problem/5863552> REGRESSION (r30741): Attachments don't appear in the iChat message window after sending
2057
2058         The order of arguments to -[NSDictionary initWithObjects:andKeys:] had been transposed accidentally during refactoring.
2059
2060         * WebCoreSupport/WebFrameLoaderClient.mm:
2061         (WebFrameLoaderClient::createPlugin): Pass the arguments in the correct order.
2062
2063 2008-04-17  Mark Rowe  <mrowe@apple.com>
2064
2065         Rubber-stamped by Dan Bernstein.
2066
2067         Fix the Mac build.
2068
2069         * WebView/WebFrame.mm: Define HAVE_ACCESSIBILITY before including AccessibilityObject.h and AXObjectCache.h to get things building
2070         for now.  This comes from config.h in WebCore but we don't have an equivalent in WebKit so we'll need to work out the correct place
2071         for this to live going forward.
2072
2073 2008-04-15  Kevin Decker  <kdecker@apple.com>
2074
2075         Reviewed by Anders.
2076
2077         <rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403
2078         
2079         In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a
2080         preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading
2081         a bundle out from underneath itself.
2082
2083         * Plugins/WebBasePluginPackage.h: Added unload method.
2084         * Plugins/WebBasePluginPackage.m:
2085         (-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload.
2086         (-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload.
2087         * Plugins/WebNetscapePluginPackage.m:
2088         (-[WebNetscapePluginPackage unload]): Added.
2089
2090 2008-04-15  Anders Carlsson  <andersca@apple.com>
2091
2092         Reviewed by Adam.
2093
2094         Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
2095
2096         * Configurations/WebKit.xcconfig:
2097
2098 2008-04-15  Brady Eidson  <beidson@apple.com>
2099
2100         Reviewed by John Sullivan
2101
2102         Do a more complete job adding the "WebArchiveDebugMode" pref
2103
2104         * WebView/WebPreferences.m: Add both getter *and* setter
2105         (-[WebPreferences webArchiveDebugModeEnabled]):
2106         (-[WebPreferences setWebArchiveDebugModeEnabled:]):
2107         * WebView/WebPreferencesPrivate.h:
2108
2109         * WebView/WebView.mm:
2110         (-[WebView _preferencesChangedNotification:]): Call the renamed getter
2111
2112 2008-04-14  Brady Eidson  <beidson@apple.com>
2113
2114         Reviewed by Anders
2115
2116         Add a hidden pref to debug WebArchive loading.  With this pref on, when loading a WebArchive,
2117         if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the 
2118         network and will instead fail the load as "cancelled."
2119
2120         * WebView/WebPreferenceKeysPrivate.h:
2121
2122         * WebView/WebPreferences.m:
2123         (+[WebPreferences initialize]):
2124         (-[WebPreferences _webArchiveDebugModeEnabled]):
2125         * WebView/WebPreferencesPrivate.h:
2126
2127         * WebView/WebView.mm:
2128         (-[WebView _preferencesChangedNotification:]):
2129
2130 2008-04-11  David Hyatt  <hyatt@apple.com>
2131
2132         Rename CachedResource ref/deref methods to addClient/removeClient.
2133
2134         Reviewed by olliej
2135
2136         * WebView/WebHTMLView.mm:
2137         (-[WebHTMLViewPrivate dealloc]):
2138         (-[WebHTMLViewPrivate finalize]):
2139         (-[WebHTMLViewPrivate clear]):
2140         (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
2141
2142 2008-04-07  Brady Eidson  <beidson@apple.com>
2143
2144         Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project
2145
2146         * Configurations/WebKit.xcconfig:
2147
2148 2008-04-04  Adam Roben  <aroben@apple.com>
2149
2150         Use WebCore's ICU headers instead of our own copy
2151
2152         Rubberstamped by Tim Hatcher.
2153
2154         * Configurations/WebKit.xcconfig: Pick up ICU headers from WebCore's
2155         PrivateHeaders.
2156
2157 2008-04-04  Adam Roben  <aroben@apple.com>
2158
2159         Fix <rdar://problem/5804776> Would like to use WebCore's
2160         ForwardingHeaders in WebKit without manually creating copies
2161
2162         Patch by Tim Hatcher, typed by me.
2163
2164         * Configurations/WebKit.xcconfig: Use the copy of ForwardingHeaders in
2165         WebCore's PrivateHeaders instead of our own copy.
2166
2167 2008-04-04  Ada Chan  <adachan@apple.com>
2168
2169         Now we pass width and height directly as integers to format
2170         the window title for a standalone image.
2171
2172         Reviewed by Dan.
2173
2174         * WebCoreSupport/WebViewFactory.mm:
2175         (-[WebViewFactory imageTitleForFilename:width:height:]):
2176
2177 2008-04-03  Nicholas Shanks  <webkit@nickshanks.com>
2178
2179         Updated by Dan Bernstein. Reviewed by Dave Hyatt.
2180
2181         - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484
2182           font-weight does not properly support graded weights
2183
2184         * WebView/WebHTMLView.mm:
2185         (-[WebHTMLView _styleFromFontAttributes:]):
2186         (-[WebHTMLView _originalFontB]):
2187         (-[WebHTMLView _addToStyle:fontA:fontB:]):
2188
2189 2008-04-02  Mark Rowe  <mrowe@apple.com>
2190
2191         Reviewed by Oliver Hunt.
2192
2193         Ensure that debug symbols are generated for x86_64 and ppc64 builds.
2194
2195         * Configurations/Base.xcconfig:
2196
2197 2008-03-31  Alice Liu  <alice.liu@apple.com>
2198
2199         Reviewed by Darin.
2200
2201         * WebView/WebFrame.mm:
2202         (-[WebFrame _accessibilityTree]):
2203         The syntax for fetching an object from the AXObjectCache changed slightly
2204
2205 2008-03-31  Brady Eidson  <beidson@apple.com>
2206
2207         Reviewed by Jon Honeycutt
2208         
2209         Move a WebArchive loading check into WebCore
2210
2211         * WebView/WebHTMLRepresentation.mm:
2212         (-[WebHTMLRepresentation receivedData:withDataSource:]): Don't check "isDisplayingWebArchive" as WebCore is now
2213           responsible for checking that state
2214
2215 2008-03-31  Brady Eidson  <beidson@apple.com>
2216
2217         Reviewed by Darin and Mitz's rubber stamp
2218
2219         Remove dataForArchivedSelection(WebCore::Frame*) from the EditorClient - only usage is now directly in WebCore
2220
2221         * WebCoreSupport/WebEditorClient.mm:
2222         * WebCoreSupport/WebEditorClient.h:
2223
2224 2008-03-28  Brady Eidson  <beidson@apple.com>
2225
2226         Rubberstamped by Darin Adler
2227
2228         Remove WebArchiver.h/mm
2229
2230         * WebView/WebArchiver.h: Removed.
2231         * WebView/WebArchiver.mm: Removed.
2232
2233         * DOM/WebDOMOperations.mm:
2234         * WebCoreSupport/WebDragClient.mm:
2235         * WebCoreSupport/WebEditorClient.mm:
2236         * WebView/WebDataSource.mm:
2237         * WebView/WebHTMLView.mm:
2238
2239 2008-03-28  Brady Eidson  <beidson@apple.com>
2240
2241         Reviewed by Darin Adler
2242
2243         Now that WebCore can create archives from a frame selection directly, we don't need it in WebArchiver anymore
2244
2245         * WebCoreSupport/WebEditorClient.mm:
2246         (WebEditorClient::dataForArchivedSelection):
2247
2248         * WebView/WebArchiver.h: Nuke archiveSelectionInFrame, as there are no remaining users
2249         * WebView/WebArchiver.mm: Ditto
2250
2251         * WebView/WebHTMLView.mm:
2252         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
2253
2254 2008-03-28  Brady Eidson  <beidson@apple.com>
2255
2256         Reviewed by Darin Adler
2257
2258         More Kit->Core WebArchive changes.
2259
2260         Create an archive from the current selection in a frame
2261
2262         * WebView/WebArchiver.mm: Remove one more *undeclared* method, the last method will drop off
2263           easily in a followup
2264
2265 2008-03-28  Brady Eidson  <beidson@apple.com>
2266
2267         Reviewed by Sam Weinig
2268
2269         WebArchive saga continues - Can now make archives from ranges in WebCore
2270
2271         * DOM/WebDOMOperations.mm:
2272         (-[DOMRange webArchive]):
2273         (-[DOMRange markupString]):
2274
2275         * WebView/WebArchiver.h: Remove newly obsolete [WebArchiver archiveRange:]
2276         * WebView/WebArchiver.mm:
2277
2278 2008-03-28  Brady Eidson  <beidson@apple.com>
2279
2280         Reviewed by Sam Weinig
2281
2282         More Kit->Core webarchive code movement
2283
2284         * DOM/WebDOMOperations.mm:
2285         (-[DOMNode markupString]): Call createFullMarkup() instead
2286
2287         * WebView/WebFrame.mm: Remove obsolete _markupStringFromNode
2288         * WebView/WebFrameInternal.h: Ditto
2289
2290 2008-03-28  Brady Eidson  <beidson@apple.com>
2291
2292         Reviewed by Sam Weinig
2293
2294         Fold [WebArchiver archiveFrame:] into WebDataSource - the last remaining caller
2295
2296         * WebView/WebArchiver.h:
2297         * WebView/WebArchiver.mm:
2298         * WebView/WebDataSource.mm:
2299         (-[WebDataSource webArchive]):
2300
2301 2008-03-28  Brady Eidson  <beidson@apple.com>
2302
2303         Reviewed by Sam Weinig
2304
2305         Remove unused [WebArchiver archiveNode:], made obsolete in r31400
2306
2307         * WebView/WebArchiver.h:
2308         * WebView/WebArchiver.mm:
2309
2310 2008-03-28  Brady Eidson  <beidson@apple.com>
2311
2312         Reviewed by Darin
2313
2314         "Yet another transitional step" to empty out WebKit-based code for archiving.
2315
2316         With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place
2317         entirely within WebCore, and opens the door to saving WebArchives on Windows.
2318
2319         * DOM/WebDOMOperations.mm:
2320         * WebView/WebArchiver.mm:
2321         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
2322
2323 2008-03-27  Brady Eidson  <beidson@apple.com>
2324
2325         Reviewed by Adam Roben
2326
2327         Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore
2328         as the push to core-ify WebArchives continues.
2329
2330         This patch also introduces a behavior change.  WebCore allows ArchiveResources with null or empty data.  
2331         WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null.  
2332         Since WebResource is API, I decided to leave it be to avoid a behavior change.  But internally created resources 
2333         (as in "while archiving a page") are accepting of null or empty data.
2334
2335         This actually fixes a bug where not all subframes are archived, and resulted in a layout test change. 
2336
2337         * WebView/WebDataSource.mm:
2338         (-[WebDataSource mainResource]): Call DocumentLoader implementation
2339         (-[WebDataSource subresources]): Ditto
2340         * WebView/WebFrame.mm: Remove [WebFrame _getAllResourceDatas:andResponses:] as its only caller is obsolete
2341         * WebView/WebFrameInternal.h:
2342
2343 2008-03-27  Brady Eidson  <beidson@apple.com>
2344
2345         Reviewed by Adam
2346
2347         Change the "init from WebCore resource" version of WebResource to take PassRefPtr
2348         (more efficient)
2349
2350         * WebView/WebResource.mm:
2351         (-[WebResource _initWithCoreResource:]):
2352         * WebView/WebResourceInternal.h:
2353
2354 2008-03-26  Brady Eidson  <beidson@apple.com>
2355
2356         Build fix - accidentally checked in this change which was work in progress
2357
2358         * DOM/WebDOMOperations.mm:
2359
2360 2008-03-26  Brady Eidson  <beidson@apple.com>
2361
2362         Reviewed by Darin
2363
2364         When we create a WebArchive, we walk every node from some starting point, asking each node
2365         along the way "What are your subresource URLs?"
2366
2367         That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into
2368         WebCore::Node
2369
2370         * DOM/WebDOMOperations.mm:
2371         (-[DOMNode _subresourceURLs]): One generic DOMNode method can now handle all DOMNodes by
2372           calling into individual WebCore::Node implementations
2373         * DOM/WebDOMOperationsPrivate.h:
2374
2375 2008-03-26  Brady Eidson  <beidson@apple.com>
2376
2377         Reviewed by Mark Rowe
2378
2379         Part of the continued push to move WebArchive-related code down to WebCore, this
2380         moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource()
2381
2382         * WebView/WebDataSource.mm:
2383         (-[WebDataSource subresourceForURL:]): Call through to the DocumentLoader 
2384
2385         * WebView/WebFrame.mm: Remove [WebFrame _getData:andResponse:forURL:], as its only use
2386           has now been ported down to WebCore
2387         * WebView/WebFrameInternal.h:
2388
2389 2008-03-26  Mark Rowe  <mrowe@apple.com>
2390
2391         Rubber-stamped by Brady Eidson.
2392
2393         Update FEATURE_DEFINES to be consistent with the other locations in which it is defined.
2394
2395         * Configurations/WebKit.xcconfig:
2396
2397 2008-03-26  Mark Rowe  <mrowe@apple.com>
2398
2399         Reviewed by David Hyatt.
2400
2401         Make the Ahem font antialias correctly on Acid3 on Tiger.
2402
2403         * WebCoreSupport/WebSystemInterface.m:
2404         (InitWebCoreSystemInterface):
2405
2406 2008-03-26  Mark Rowe  <mrowe@apple.com>
2407
2408         Fix the Mac build.
2409
2410         * MigrateHeaders.make: Copy the newly generated header into the right place.
2411
2412 2008-03-25  Brady Eidson  <beidson@apple.com>
2413
2414         Reviewed by Beth Dakin
2415
2416         Remove entirely unused internal method
2417
2418         * WebView/WebArchiver.h:
2419         * WebView/WebArchiver.mm:
2420
2421 2008-03-25  Brady Eidson  <beidson@apple.com>
2422
2423         Reviewed by Adam Roben
2424
2425         <rdar://problem/5819308> - View Source is empty when view webarchives
2426
2427         * WebCore.base.exp:
2428         * loader/DocumentLoader.cpp:
2429         (WebCore::DocumentLoader::setParsedArchiveData):
2430         (WebCore::DocumentLoader::parsedArchiveData):
2431         * loader/DocumentLoader.h:
2432
2433         * loader/FrameLoader.cpp:
2434         (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData
2435           in the DocumentLoader
2436
2437 2008-03-25  Dan Bernstein  <mitz@apple.com>
2438
2439         Reviewed by Darin Adler.
2440
2441         - fix http://bugs.webkit.org/show_bug.cgi?id=17933
2442           Reopen All Windows From Last Session causes crash
2443
2444         * WebView/WebHTMLView.mm:
2445         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Added null
2446         check.
2447
2448 2008-03-25  Brady Eidson  <beidson@apple.com>
2449
2450         Reviewed by Jon Honeycutt's rubberstamp
2451
2452         Fix a leak with the new WebArchive setup
2453
2454         * WebView/WebArchive.mm:
2455         (-[WebArchivePrivate setCoreArchive:]): Deref() the old WebArchive
2456
2457 2008-03-25  Brady Eidson  <beidson@apple.com>
2458
2459         Reviewed by Darin
2460
2461         Removed the concept of "pending archive resources" and the "archive resources delivery timer"
2462         from WebFrameLoaderClient, as those concepts have been pushed into WebCore
2463
2464         * WebCoreSupport/WebFrameLoaderClient.h:
2465         * WebCoreSupport/WebFrameLoaderClient.mm:
2466         (WebFrameLoaderClient::WebFrameLoaderClient):
2467
2468 2008-03-25  Brady Eidson  <beidson@apple.com>
2469
2470         Reviewed by Darin
2471
2472         Remove newly obsolete FrameLoaderClient methods
2473
2474         * WebCoreSupport/WebFrameLoaderClient.h:
2475         * WebCoreSupport/WebFrameLoaderClient.mm:
2476
2477 2008-03-25  Brady Eidson  <beidson@apple.com>
2478
2479         Release build fix
2480
2481         * WebView/WebArchive.mm:
2482         (-[WebArchive subresources]):
2483         (-[WebArchive subframeArchives]):
2484
2485 2008-03-25  Brady Eidson  <beidson@apple.com>
2486
2487         Reviewed by Darin
2488
2489         <rdar://problem/4516169> - Support WebArchives on Windows
2490         And paves the way for many future WebArchive bug fixes and enhancements
2491
2492         This change moves most of the real workhorse code about WebArchives into WebCore.  It maintains 
2493         1-to-1 relationships between a few objects in WebCore and WebKit.  Such as:
2494          * WebArchive <-> LegacyWebArchive
2495          * WebResource <-> ArchiveResource
2496          * WebUnarchivingState <-> ArchiveResourceCollection
2497  
2498         The other biggest changes involve many FrameLoaderClient methods that existed soley for WebArchives 
2499         and now exist in WebCore
2500
2501         * WebCoreSupport/WebFrameLoaderClient.mm:
2502         (WebFrameLoaderClient::clearUnarchivingState): Emptied - to be removed in a followup patch
2503         (WebFrameLoaderClient::finalSetupForReplace):
2504         (WebFrameLoaderClient::setDefersLoading):
2505         (WebFrameLoaderClient::willUseArchive):
2506         (WebFrameLoaderClient::isArchiveLoadPending):
2507         (WebFrameLoaderClient::cancelPendingArchiveLoad):
2508         (WebFrameLoaderClient::clearArchivedResources):
2509         (WebFrameLoaderClient::createFrame):
2510
2511         * WebView/WebArchive.mm:
2512         (+[WebArchivePrivate initialize]):
2513         (-[WebArchivePrivate init]):
2514         (-[WebArchivePrivate initWithCoreArchive:]):
2515         (-[WebArchivePrivate coreArchive]):
2516         (-[WebArchivePrivate setCoreArchive:]):
2517         (-[WebArchivePrivate dealloc]):
2518         (-[WebArchivePrivate finalize]):
2519         (-[WebArchive init]):
2520         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
2521         (-[WebArchive initWithData:]):
2522         (-[WebArchive initWithCoder:]):
2523         (-[WebArchive encodeWithCoder:]):
2524         (-[WebArchive mainResource]):
2525         (-[WebArchive subresources]):
2526         (-[WebArchive subframeArchives]):
2527         (-[WebArchive data]):
2528         (-[WebArchive _initWithCoreLegacyWebArchive:WebCore::]):
2529         (-[WebArchive WebCore::]):
2530         * WebView/WebArchiveInternal.h: Added.
2531
2532         * WebView/WebDataSource.mm:
2533         (-[WebDataSourcePrivate dealloc]):
2534         (-[WebDataSource _addSubframeArchives:]):
2535         (-[WebDataSource _documentFragmentWithArchive:]):
2536         (-[WebDataSource subresourceForURL:]):
2537         (-[WebDataSource addSubresource:]):
2538         * WebView/WebDataSourceInternal.h:
2539
2540         * WebView/WebFrame.mm:
2541         (-[WebFrame loadArchive:]):
2542         * WebView/WebFrameInternal.h:
2543
2544         * WebView/WebHTMLRepresentation.mm:
2545         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
2546
2547         * WebView/WebResource.mm:
2548         (+[WebResourcePrivate initialize]):
2549         (-[WebResourcePrivate init]):
2550         (-[WebResourcePrivate initWithCoreResource:]):
2551         (-[WebResourcePrivate dealloc]):
2552         (-[WebResourcePrivate finalize]):
2553         (-[WebResource initWithCoder:]):
2554         (-[WebResource encodeWithCoder:]):
2555         (-[WebResource data]):
2556         (-[WebResource URL]):
2557         (-[WebResource MIMEType]):
2558         (-[WebResource textEncodingName]):
2559         (-[WebResource frameName]):
2560         (-[WebResource _initWithCoreResource:WebCore::]):
2561         (-[WebResource WebCore::]):
2562         (-[WebResource _ignoreWhenUnarchiving]):
2563         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2564         (-[WebResource _fileWrapperRepresentation]):
2565         (-[WebResource _response]):
2566         (-[WebResource _stringValue]):
2567         * WebView/WebResourceInternal.h: Added.
2568         * WebView/WebResourcePrivate.h:
2569
2570         * WebView/WebUnarchivingState.h: Removed.
2571         * WebView/WebUnarchivingState.m: Removed.
2572
2573 2008-03-24  Oliver Hunt  <oliver@apple.com>
2574
2575         Reviewed by Mark Rowe.
2576
2577         Bug 18030: REGRESSION(r31236): Space bar fails to scroll down page
2578         <http://bugs.webkit.org/show_bug.cgi?id=18030>
2579
2580         Rollout keyDown changes from r31236 -- fix for keyDown behaviour is
2581         tracked by Bug 18057: keyDown incorrectly propagates up the frame tree
2582         <http://bugs.webkit.org/show_bug.cgi?id=18057>
2583
2584         * WebView/WebHTMLView.mm:
2585         (-[WebHTMLView keyDown:]):
2586
2587 2008-03-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2588
2589         Reviewed by Maciej, landed by Brady
2590
2591         Bug 3580: iFrames Appear to be Cached
2592         <http://bugs.webkit.org/show_bug.cgi?id=3580>
2593
2594         Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
2595         <http://bugs.webkit.org/show_bug.cgi?id=15486>
2596
2597         Bug 15554: Reload causes <object> to use old data
2598         <http://bugs.webkit.org/show_bug.cgi?id=15554>
2599
2600         If a page is reloaded, a child frame's URL can not be taken from a history item.
2601
2602         * WebView/WebFrame.mm:
2603         (-[WebFrame _loadURL:referrer:intoChild:]):
2604
2605 2008-03-24  Darin Adler  <darin@apple.com>
2606
2607         Reviewed by Beth.
2608
2609         - fix <rdar://problem/5817067> -[WebDataSource unreachableURL] invokes KURL's copy constructor
2610
2611         * History/WebHistoryItem.mm:
2612         (-[WebHistoryItem URL]): Use a reference to avoid making a copy.
2613         * WebView/WebDataSource.mm:
2614         (-[WebDataSource _URL]): Ditto.
2615         (-[WebDataSource unreachableURL]): Ditto.
2616         * WebView/WebHTMLView.mm:
2617         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
2618
2619         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
2620         * History/WebHistory.mm:
2621         * Misc/WebElementDictionary.mm:
2622         * Misc/WebNSAttributedStringExtras.mm:
2623         Remove unneeded imports of KURL.h.
2624
2625 2008-03-24  Brady Eidson  <beidson@apple.com>
2626
2627         Reviewed by Darin's rubberstamp
2628
2629         Rename this file for upcoming work.
2630
2631         * WebView/WebArchive.m: Removed.
2632         * WebView/WebArchive.mm: Copied from WebKit/mac/WebView/WebArchive.m.
2633
2634 2008-03-24  Alexey Proskuryakov  <ap@webkit.org>
2635
2636         Build fix.
2637
2638         * MigrateHeaders.make: Added DOMSVGAltGlyphElement.h and DOMSVGAltGlyphElementInternal.h.
2639
2640 2008-03-23  Oliver Hunt  <oliver@apple.com>
2641
2642         Reviewed by Maciej.
2643
2644         Bug 17670: Key events may improperly propagate from iframe to parent frame
2645         <http://bugs.webkit.org/show_bug.cgi?id=17670>
2646         Bug 16381: REGRESSION: Shift, command, option, ctrl keys in Gmail Rich Text changes focus
2647         <http://bugs.webkit.org/show_bug.cgi?id=16381>
2648
2649         Prevent the Cocoa event system from propagating key events to the parent WebHTMLView,
2650         as that results in us dispatching the key events for each frame going up the frame
2651         tree.
2652
2653         * WebView/WebHTMLView.mm:
2654         (-[WebHTMLView keyDown:]):
2655         (-[WebHTMLView keyUp:]):
2656         (-[WebHTMLView flagsChanged:]):
2657
2658 2008-03-21  Timothy Hatcher  <timothy@apple.com>
2659
2660         Bug 17980: Regression: Inspector highlighting of webpage not cleared when going to new URL
2661         http://bugs.webkit.org/show_bug.cgi?id=17980
2662
2663         Reviewed by Adam.
2664
2665         The new highlight drawing was not honoring the fade value, so it was
2666         always drawing at full opacity. The animation code didn't match Windows
2667         and the new highlight anyway, so it has been removed. The highlight
2668         how just detaches when it is hidden.
2669
2670         * WebCoreSupport/WebInspectorClient.mm:
2671         (-[WebInspectorWindowController windowShouldClose:]): Call hideHighlight.
2672         (-[WebInspectorWindowController close]): Ditto.
2673         (-[WebInspectorWindowController highlightNode:]): Call attach.
2674         (-[WebInspectorWindowController hideHighlight]): Call detach and release _currentHighlight.
2675         * WebInspector/WebNodeHighlight.h:
2676         * WebInspector/WebNodeHighlight.m:
2677         (-[WebNodeHighlight initWithTargetView:inspectorController:]):
2678         (-[WebNodeHighlight dealloc]): Assert we have no _highlightView.
2679         (-[WebNodeHighlight attach]): Renamed from attachHighlight.
2680         (-[WebNodeHighlight detach]): Renamed from detachHighlight.
2681         (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Renamed from setHolesNeedUpdateInTargetViewRect:.
2682         * WebInspector/WebNodeHighlightView.h:
2683         * WebInspector/WebNodeHighlightView.m:
2684         (-[WebNodeHighlightView setNeedsDisplayInRect:]): Renamed from setHolesNeedUpdateInRect:.
2685
2686 2008-03-20  Mark Rowe  <mrowe@apple.com>
2687
2688         Reviewed by Sam Weinig.
2689
2690         Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
2691         This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
2692         command-line.
2693
2694         * Configurations/WebKit.xcconfig:
2695
2696 2008-03-20  Adam Roben  <aroben@apple.com>
2697
2698         Make WebNodeHighlightView use InspectorController to do its painting
2699
2700         Reviewed by Tim Hatcher.
2701
2702         * WebCoreSupport/WebInspectorClient.mm:
2703         (-[WebInspectorWindowController highlightNode:]): Pass the
2704         InspectorController to the WebNodeHighlight, and don't call
2705         setHighlightedNode: (which has been removed).
2706         (-[WebInspectorWindowController hideHighlight]): Removed call to
2707         setHighlightedNode:.
2708         * WebInspector/WebNodeHighlight.h:
2709           - Replaced _highlightNode with _inspectorController
2710           - Removed _highlightedNode accessors
2711           - Added -inspectorController method
2712         * WebInspector/WebNodeHighlight.m:
2713         (-[WebNodeHighlight initWithTargetView:inspectorController:]): Now
2714         takes an InspectorController* and stores it in _inspectorController.
2715         (-[WebNodeHighlight dealloc]): Removed code dealing with
2716         _highlightedNode.
2717         (-[WebNodeHighlight inspectorController]): Added.
2718         * WebInspector/WebNodeHighlightView.m: Removed FileInternal category.
2719         (-[WebNodeHighlightView isFlipped]): Added. WebCore expects all
2720         GraphicsContexts to be based on a flipped CGContext, so we have to
2721         specify that this view is flipped.
2722         (-[WebNodeHighlightView drawRect:]): Changed to create a
2723         GraphicsContext and pass it to InspectorController::drawNodeHighlight.
2724
2725 2008-03-18  David Hyatt  <hyatt@apple.com>
2726
2727         Add support for a preference in WebKit that can be used in nightly builds to test full page
2728         zoom.
2729
2730         Reviewed by Antti
2731
2732         * WebView/WebPreferenceKeysPrivate.h:
2733         * WebView/WebView.mm:
2734         (-[WebView setTextSizeMultiplier:]):
2735         (-[WebView canMakeTextSmaller]):
2736         (-[WebView makeTextSmaller:]):
2737         (-[WebView canMakeTextLarger]):
2738         (-[WebView makeTextLarger:]):
2739         (-[WebView canMakeTextStandardSize]):
2740         (-[WebView makeTextStandardSize:]):
2741
2742 2008-03-17  Eric Seidel  <eric@webkit.org>
2743
2744         Reviewed by darin.
2745
2746         Export _NPN_IntFromIdentifier as part of our NPAPI interface
2747
2748         * Plugins/WebNetscapePluginPackage.m:
2749         (-[WebNetscapePluginPackage load]):
2750
2751 2008-03-14  Brady Eidson  <beidson@apple.com>
2752
2753         Reviewed by Brian Dash's rubberstamp
2754
2755         Remove a class declaration for a class that has never existed
2756
2757         * WebView/WebResource.h:
2758
2759 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
2760
2761         Unify concept of enabling the Mac Java bridge.
2762
2763         Reviewed by Darin and Anders.
2764
2765         * Plugins/WebPluginJava.h: Removed unused file.
2766         * WebCoreSupport/WebFrameLoaderClient.h:
2767         (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
2768         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method.
2769         (WebFrameLoaderClient::javaApplet): Ditto.
2770
2771 2008-03-13  Antti Koivisto  <antti@apple.com>
2772
2773         Reviewed by Darin.
2774
2775         * ForwardingHeaders/wtf/Deque.h: Added.
2776
2777 2008-03-13  Anders Carlsson  <andersca@apple.com>
2778
2779         Reviewed by Adam.
2780
2781         Call originalRequest, not initialRequest.
2782         
2783         * WebView/WebDataSource.mm:
2784         (-[WebDataSource initialRequest]):
2785
2786 2008-03-12  Darin Adler  <darin@apple.com>
2787
2788         Reviewed by John Sullivan.
2789
2790         - cleanup after removing the bridge
2791
2792         * DOM/WebDOMOperations.mm:
2793         (-[DOMDocument URLWithAttributeString:]): Call computeURL directly.
2794
2795         * Misc/WebCoreStatistics.mm:
2796         (-[WebFrame renderTreeAsExternalRepresentation]): Call externalRepresentation directly.
2797
2798         * Plugins/WebBaseNetscapePluginView.mm:
2799         (-[WebBaseNetscapePluginView loadPluginRequest:]): Use core function instead of
2800         _frameLoader method.
2801         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
2802         Ditto.
2803         * Plugins/WebPluginController.mm:
2804         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Ditto.
2805
2806         * WebCoreSupport/WebFrameLoaderClient.mm:
2807         (WebFrameLoaderClient::frameLoaderDestroyed): Added a call to the new _clearCoreFrame
2808         method. Without this we could leave a stale frame pointer around.
2809         (WebFrameLoaderClient::dispatchDidReceiveIcon): Rewrote assertion so it's not the single
2810         caller of the _isMainFrame method.
2811         (WebFrameLoaderClient::transitionToCommittedForNewPage): Use core function instead of
2812         _frameLoader method.
2813         (WebFrameLoaderClient::createFrame): Moved code here from _addChild.
2814
2815         * WebView/WebFrame.mm: Removed lots of methods. Some were moved elsewhere, others
2816         turned out to be unused.
2817         (core): Added overload for DocumentFragment.
2818         (kit): Ditto.
2819         (-[WebFrame _loadURL:referrer:intoChild:]): Get to Frame using _private->coreFrame and
2820         to FrameLoader with _private->coreFrame->loader().
2821         (-[WebFrame _attachScriptDebugger]): Ditto.
2822         (-[WebFrame _clearCoreFrame]): Added.
2823         (-[WebFrame _updateBackground]): More of the same.
2824         (-[WebFrame _unmarkAllBadGrammar]): Ditto.
2825         (-[WebFrame _unmarkAllMisspellings]): Ditto.
2826         (-[WebFrame _hasSelection]): Ditto.
2827         (-[WebFrame _atMostOneFrameHasSelection]): Ditto.
2828         (-[WebFrame _findFrameWithSelection]): Ditto.
2829         (-[WebFrame _dataSource]): Ditto.
2830         (-[WebFrame _addData:]): Streamlined code a bit.
2831         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
2832         (-[WebFrame _receivedData:textEncodingName:]): Ditto.
2833         (-[WebFrame _isDescendantOfFrame:]): Ditto.
2834         (-[WebFrame _bodyBackgroundColor]): Ditto.
2835         (-[WebFrame _isFrameSet]): Ditto.
2836         (-[WebFrame _firstLayoutDone]): Ditto.
2837         (-[WebFrame _loadType]): Ditto.
2838         (-[WebFrame _isDisplayingStandaloneImage]): Ditto.
2839         (-[WebFrame name]): Ditto.
2840         (-[WebFrame DOMDocument]): Ditto.
2841         (-[WebFrame frameElement]): Ditto.
2842         (-[WebFrame provisionalDataSource]): Ditto.
2843         (-[WebFrame dataSource]): Ditto.
2844         (-[WebFrame loadRequest:]): Ditto.
2845         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Ditto.
2846         (-[WebFrame loadArchive:]): Ditto.
2847         (-[WebFrame stopLoading]): Ditto.
2848         (-[WebFrame reload]): Ditto.
2849         (-[WebFrame findFrameNamed:]): Ditto.
2850         (-[WebFrame parentFrame]): Ditto.
2851         (-[WebFrame childFrames]): Ditto.
2852         (-[WebFrame windowObject]): Ditto.
2853         (-[WebFrame globalContext]): Ditto.
2854
2855         * WebView/WebFrameInternal.h: Added overloads of core and kit.
2856         Removed method declarations.
2857
2858         * WebView/WebHTMLRepresentation.mm:
2859         (-[WebHTMLRepresentation documentSource]): Moved code here from WebFrame.
2860         (formElementFromDOMElement): Ditto.
2861         (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
2862         (inputElementFromDOMElement): Ditto.
2863         (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
2864         (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
2865         (-[WebHTMLRepresentation formForElement:]): Ditto.
2866         (-[WebHTMLRepresentation currentForm]): Ditto.
2867         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
2868         (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
2869         (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
2870
2871         * WebView/WebHTMLView.mm:
2872         (-[WebHTMLView _frameOrBoundsChanged]): Moved sendScrollEvent code here from WebFrame.
2873         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
2874         Call createFragmentFromText directly instead of via WebFrame.
2875         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
2876         Moved layout calls here from WebFrame.
2877         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
2878         (-[WebHTMLView _updateFontPanel]): Ditto, but with fontForSelection.
2879         (-[WebHTMLView _canSmartCopyOrDelete]): Ditto, but with selectionGranularity.
2880         (-[WebHTMLView markedRange]): Moved code here from _markedTextNSRange.
2881         (-[WebHTMLView attributedSubstringFromRange:]): Tweaked code a bit.
2882         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
2883         Moved code here from WebFrame.
2884         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto.
2885         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
2886         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
2887         (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
2888         (-[WebHTMLView unmarkAllTextMatches]): Ditto.
2889         (-[WebHTMLView rectsForTextMatches]): Ditto.
2890
2891         * WebView/WebHTMLViewInternal.h: Removed unused method declarations.
2892
2893         * WebView/WebPDFView.mm:
2894         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Use core function instead of
2895         _frameLoader method.
2896
2897         * WebView/WebRenderNode.mm:
2898         (copyRenderNode): Moved code here from WebFrame.
2899         (-[WebRenderNode initWithWebFrameView:]): Ditto.
2900
2901         * WebView/WebResource.mm:
2902         (-[WebResource _stringValue]): Moved code here from WebFrame.
2903
2904         * WebView/WebView.mm:
2905         (-[WebView _close]): Use core function intsead of _frameLoader method.
2906         (-[WebView setCustomTextEncodingName:]): Ditto.
2907         (-[WebView setHostWindow:]): Moved code here from WebFrame.
2908         (aeDescFromJSValue): Moved this here from WebFrame.
2909         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Moved code here from WebFrame.
2910
2911 2008-03-12  Darin Adler  <darin@apple.com>
2912
2913         Reviewed by Anders.
2914
2915         - http://bugs.webkit.org/show_bug.cgi?id=17640
2916           eliminate WebCoreFrameBridge
2917
2918         Moved all the code from the bridge into WebFrame. This need not be the final
2919         home of these methods -- they can be moved closer to their callers and improved
2920         further -- but it eliminates the bridge without requiring a rewrite of the code.
2921         It's a fairly mechanical process (just adding underscores to method names really).
2922
2923         There's even a chance that some of the methods are unused. Those we can remove
2924         after checking if that's so.
2925
2926         * DOM/WebDOMOperations.mm:
2927         (-[DOMNode markupString]): Use WebFrame rather than bridge.
2928         (-[DOMDocument webFrame]): Changed to use the core and kit functions
2929         instead of using the bridge.
2930         (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge.
2931         (-[DOMRange markupString]): Ditto.
2932         * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods.
2933
2934         * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import.
2935         * History/WebHistoryItem.mm: Ditto.
2936
2937         * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h.
2938         * Misc/WebCoreStatistics.mm:
2939         (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge.
2940
2941         * Misc/WebElementDictionary.mm: Removed unneeded import.
2942
2943         * Misc/WebKitStatistics.m:
2944         (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0.
2945         * Misc/WebKitStatisticsPrivate.h: Ditto.
2946
2947         * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import.
2948         * Misc/WebNSPasteboardExtras.mm: Ditto.
2949
2950         * Plugins/WebBaseNetscapePluginView.mm:
2951         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame
2952         rather than bridge.
2953
2954         * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import.
2955         * Plugins/WebNetscapePluginStream.mm: Ditto.
2956
2957         * Plugins/WebPluginContainerCheck.mm:
2958         (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than
2959         bridge to get to the WebCore::Frame.
2960
2961         * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method.
2962         * Plugins/WebPluginController.mm:
2963         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame
2964         rather than bridge.
2965
2966         * WebCoreSupport/WebEditorClient.mm:
2967         (selectorForKeyEvent): Tweaked comment.
2968
2969         * WebCoreSupport/WebFrameBridge.h: Removed.
2970         * WebCoreSupport/WebFrameBridge.mm: Removed.
2971
2972         * WebCoreSupport/WebFrameLoaderClient.mm:
2973         (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion.
2974         (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code.
2975         I could remove this function entirely, but it looks like the Qt port is using it.
2976
2977         * WebCoreSupport/WebViewFactory.mm: Removed unneeded import.
2978
2979         * WebView/WebArchiver.mm:
2980         (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge.
2981         (+[WebArchiver archiveNode:]): Ditto.
2982         (+[WebArchiver archiveSelectionInFrame:]): Ditto.
2983
2984         * WebView/WebDataSource.mm:
2985         (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto.
2986         (-[WebDataSource _documentFragmentWithArchive:]): Ditto.
2987         (-[WebDataSource subresources]): Ditto.
2988         (-[WebDataSource subresourceForURL:]): Ditto.
2989
2990         * WebView/WebDataSourceInternal.h: Removed _bridge method.
2991
2992         * WebView/WebFrame.mm:
2993         (-[WebFramePrivate dealloc]): Removed code to release the bridge.
2994         (core): Go directly to the core frame, not via the bridge.
2995         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
2996         Remove the code to deal with the bridge.
2997         (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the
2998         shouldCreateRenderers flag, formerly on the bridge.
2999         (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge.
3000         (aeDescFromJSValue): Moved here from bridge.
3001         (-[WebFrame _domain]): Ditto.
3002         (-[WebFrame _addData:]): Ditto.
3003         (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto.
3004         (-[WebFrame _nodesFromList:]): Ditto.
3005         (-[WebFrame _markupStringFromNode:nodes:]): Ditto.
3006         (-[WebFrame _markupStringFromRange:nodes:]): Ditto.
3007         (-[WebFrame _selectedString]): Ditto.
3008         (-[WebFrame _stringForRange:]): Ditto.
3009         (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto.
3010         (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
3011         (-[WebFrame _sendScrollEvent]): Ditto.
3012         (-[WebFrame _drawRect:]): Ditto.
3013         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto.
3014         (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto.
3015         (-[WebFrame _copyRenderNode:copier:]): Ditto.
3016         (-[WebFrame _copyRenderTree:]): Ditto.
3017         (inputElementFromDOMElement): Ditto.
3018         (formElementFromDOMElement): Ditto.
3019         (-[WebFrame _elementWithName:inForm:]): Ditto.
3020         (-[WebFrame _elementDoesAutoComplete:]): Ditto.
3021         (-[WebFrame _elementIsPassword:]): Ditto.
3022         (-[WebFrame _formForElement:]): Ditto.
3023         (-[WebFrame _currentForm]): Ditto.
3024         (-[WebFrame _controlsInForm:]): Ditto.
3025         (-[WebFrame _searchForLabels:beforeElement:]): Ditto.
3026         (-[WebFrame _matchLabels:againstElement:]): Ditto.
3027         (-[WebFrame _URLWithAttributeString:]): Ditto.
3028         (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
3029         (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto.
3030         (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto.
3031         (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto.
3032         (-[WebFrame _unmarkAllTextMatches]): Ditto.
3033         (-[WebFrame _rectsForTextMatches]): Ditto.
3034         (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto.
3035         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto.
3036         (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto.
3037         (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
3038         (-[WebFrame _firstRectForDOMRange:]): Ditto.
3039         (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
3040         (-[WebFrame _baseURL]): Ditto.
3041         (-[WebFrame _stringWithData:]): Ditto.
3042         (+[WebFrame _stringWithData:textEncodingName:]): Ditto.
3043         (-[WebFrame _needsLayout]): Ditto.
3044         (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto.
3045         (-[WebFrame _accessibilityTree]): Ditto.
3046         (-[WebFrame _setBaseBackgroundColor:]): Ditto.
3047         (-[WebFrame _setDrawsBackground:]): Ditto.
3048         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
3049         Ditto.
3050         (-[WebFrame _selectionGranularity]): Ditto.
3051         (-[WebFrame _convertToNSRange:]): Ditto.
3052         (-[WebFrame _convertToDOMRange:]): Ditto.
3053         (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
3054         (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
3055         (-[WebFrame _markDOMRange]): Ditto.
3056         (-[WebFrame _markedTextNSRange]): Ditto.
3057         (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
3058         (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
3059         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
3060         (-[WebFrame _documentFragmentWithText:inContext:]): Ditto.
3061         (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
3062         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
3063         (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
3064         (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto.
3065         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
3066         (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto.
3067         (-[WebFrame _visiblePositionForPoint:]): Ditto.
3068         (-[WebFrame _characterRangeAtPoint:]): Ditto.
3069         (-[WebFrame _typingStyle]): Ditto.
3070         (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
3071         (-[WebFrame _fontForSelection:]): Ditto.
3072         (-[WebFrame _dragSourceMovedTo:]): Ditto.
3073         (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
3074         (-[WebFrame _getData:andResponse:forURL:]): Ditto.
3075         (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto.
3076         (-[WebFrame _canProvideDocumentSource]): Ditto.
3077         (-[WebFrame _canSaveAsWebArchive]): Ditto.
3078         (-[WebFrame _receivedData:textEncodingName:]): Ditto.
3079         (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting
3080         function. Couldn't just keep the bridge method because this was already here with the same name.
3081         (-[WebFrame _selectedNSRange]): Ditto.
3082         (-[WebFrame _selectNSRange:]): Ditto.
3083         (-[WebFrame dealloc]): Remove bridge-related code.
3084         (-[WebFrame finalize]): Ditto.
3085
3086         * WebView/WebFrameInternal.h: Added all the method declarations from the bridge.
3087         Removed the bridge parameter from the init method. Removed the #if blocks that
3088         tried to make this header work in non-C++ ObjC files -- they were broken and unused.
3089         Removed the _bridge method.
3090
3091         * WebView/WebFrameView.mm: Removed the _bridge method.
3092
3093         * WebView/WebHTMLRepresentation.mm:
3094         (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge
3095         field.
3096         (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge.
3097         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto.
3098         (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto.
3099         (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto.
3100         (-[WebHTMLRepresentation documentSource]): Ditto.
3101         (-[WebHTMLRepresentation DOMDocument]): Ditto.
3102         (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
3103         (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
3104         (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
3105         (-[WebHTMLRepresentation formForElement:]): Ditto.
3106         (-[WebHTMLRepresentation currentForm]): Ditto.
3107         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
3108         (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
3109         (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
3110
3111         * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method.
3112
3113         * WebView/WebHTMLView.mm:
3114         (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge.
3115         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
3116         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
3117         (-[WebHTMLView _updateTextSizeMultiplier]): Ditto.
3118         (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
3119         (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
3120         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
3121         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
3122         (-[WebHTMLView drawSingleRect:]): Ditto.
3123         (-[WebHTMLView draggedImage:movedTo:]): Ditto.
3124         (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
3125         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
3126         (-[WebHTMLView knowsPageRange:]): Ditto.
3127         (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
3128         (-[WebHTMLView accessibilityFocusedUIElement]): Ditto.
3129         (-[WebHTMLView accessibilityHitTest:]): Ditto.
3130         (-[WebHTMLView _accessibilityParentForSubview:]): Ditto.
3131         (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
3132         (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
3133         (-[WebHTMLView _changeSpellingToWord:]): Ditto.
3134         (-[WebHTMLView startSpeaking:]): Ditto.
3135         (-[WebHTMLView _updateFontPanel]): Ditto.
3136         (-[WebHTMLView _canSmartCopyOrDelete]): Ditto.
3137         (-[WebHTMLView _layoutIfNeeded]): Ditto.
3138         (-[WebHTMLView characterIndexForPoint:]): Ditto.
3139         (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
3140         (-[WebHTMLView selectedRange]): Ditto.
3141         (-[WebHTMLView markedRange]): Ditto.
3142         (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
3143         (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
3144         (-[WebHTMLView insertText:]): Ditto.
3145         (-[WebTextCompleteController _insertMatch:]): Ditto.
3146         (-[WebTextCompleteController doCompletion]): Ditto.
3147         (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto.
3148         (-[WebHTMLView string]): Ditto.
3149         (-[WebHTMLView selectedString]): Ditto.
3150         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
3151         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
3152         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
3153         (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
3154         (-[WebHTMLView unmarkAllTextMatches]): Ditto.
3155         (-[WebHTMLView rectsForTextMatches]): Ditto.
3156         * WebView/WebRenderNode.mm:
3157         (-[WebRenderNode initWithWebFrameView:]): Ditto.
3158         * WebView/WebResource.mm:
3159         (-[WebResource _stringValue]): Ditto.
3160
3161         * WebView/WebScriptDebugDelegate.mm: Removed unneeded include.
3162
3163         * WebView/WebView.mm:
3164         (-[WebView _dashboardRegions]): Use WebFrame instead of bridge.
3165         (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
3166         (-[WebView _setInViewSourceMode:]): Ditto.
3167         (-[WebView _inViewSourceMode]): Ditto.
3168         (-[WebView _executeCoreCommandByName:value:]): Ditto.
3169         (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto.
3170         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
3171         (-[WebView scrollDOMRangeToVisible:]): Ditto.
3172         (-[WebView setSelectedDOMRange:affinity:]): Ditto.
3173         (-[WebView setEditable:]): Ditto.
3174         (-[WebView setTypingStyle:]): Ditto.
3175         (-[WebView typingStyle]): Ditto.
3176         (-[WebView replaceSelectionWithNode:]): Ditto.
3177         (-[WebView replaceSelectionWithText:]): Ditto.
3178         (-[WebView replaceSelectionWithMarkupString:]): Ditto.
3179         (-[WebView replaceSelectionWithArchive:]): Ditto.
3180         (-[WebView _insertNewlineInQuotedContent]): Ditto.
3181         (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto.
3182
3183 2008-03-12  David Hyatt  <hyatt@apple.com>
3184
3185         Make the zoom factor a float and not a percent.
3186
3187         Reviewed by antti
3188
3189         * WebView/WebView.mm:
3190         (-[WebView _setZoomMultiplier:isTextOnly:]):
3191
3192 2008-03-11  David Hyatt  <hyatt@apple.com>
3193
3194         This patch prepares Mac WebKit to handle two different zooming modes (full page zoom and text only zoom).
3195         New API is added that is parallel to the text zoom public API.  You can get/set a pageSizeMultiplier and you
3196         can zoom the page in, out or reset it to the standard size.
3197
3198         In the implementation only one zoom factor is stored, and setting one multiplier will shift you into that mode
3199         and set the common zoom factor.  In other words you can't combine text zoom and page zoom.  One will always
3200         win.
3201
3202         Reviewed by Tim H.
3203
3204         * WebCoreSupport/WebFrameBridge.mm:
3205         (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
3206         * WebView/WebDocumentInternal.h:
3207         * WebView/WebHTMLView.mm:
3208         (-[WebHTMLView viewDidMoveToSuperview]):
3209         * WebView/WebPDFView.h:
3210         * WebView/WebPDFView.mm:
3211         (-[WebPDFView _zoomOut:]):
3212         (-[WebPDFView _zoomIn:]):
3213         (-[WebPDFView _resetZoom:]):
3214         (-[WebPDFView _canZoomOut]):
3215         (-[WebPDFView _canZoomIn]):
3216         (-[WebPDFView _canResetZoom]):
3217         * WebView/WebView.mm:
3218         (-[WebViewPrivate init]):
3219         (-[WebView setTextSizeMultiplier:]):
3220         (-[WebView textSizeMultiplier]):
3221         (-[WebView _setZoomMultiplier:isTextOnly:]):
3222         (-[WebView _zoomMultiplier:]):
3223         (-[WebView _realZoomMultiplier]):
3224         (-[WebView _realZoomMultiplierIsTextOnly]):
3225         (-[WebView _canZoomOut:]):
3226         (-[WebView _canZoomIn:]):
3227         (-[WebView _zoomOut:isTextOnly:]):
3228         (-[WebView _zoomIn:isTextOnly:]):
3229         (-[WebView _canResetZoom:]):
3230         (-[WebView _resetZoom:isTextOnly:]):
3231         (-[WebView canMakeTextSmaller]):
3232         (-[WebView makeTextSmaller:]):
3233         (-[WebView canMakeTextLarger]):
3234         (-[WebView makeTextLarger:]):
3235         (-[WebView canMakeTextStandardSize]):
3236         (-[WebView makeTextStandardSize:]):
3237         (-[WebView setPageSizeMultiplier:]):
3238         (-[WebView pageSizeMultiplier]):
3239         (-[WebView canZoomPageIn]):
3240         (-[WebView zoomPageIn:]):
3241         (-[WebView canZoomPageOut]):
3242         (-[WebView zoomPageOut:]):
3243         (-[WebView canResetPageZoom]):
3244         (-[WebView resetPageZoom:]):
3245         (-[WebView _searchWithSpotlightFromMenu:]):
3246         * WebView/WebViewInternal.h:
3247         * WebView/WebViewPrivate.h:
3248
3249 2008-03-12  Dan Bernstein  <mitz@apple.com>
3250
3251         Reviewed by Darin Adler and Sam Weinig.
3252
3253         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
3254
3255         * WebCoreSupport/WebSystemInterface.m:
3256         (InitWebCoreSystemInterface): Made WKGetCGFontFromNSFont and
3257         WKGetNSFontATSUFontId Tiger-only.
3258
3259 2008-03-12  Darin Adler  <darin@apple.com>
3260
3261         - fix http://bugs.webkit.org/show_bug.cgi?id=17794
3262           REGRESSION (r30980): 23 tests hanging on the Mac buildbot
3263
3264         * WebView/WebFrame.mm:
3265         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added missing call to set
3266         up pointer from the bridge to the frame. (My next check-in removes the bridge
3267         entirely, but we need this until then.)
3268
3269 2008-03-11  Darin Adler  <darin@apple.com>
3270
3271         Reviewed by Sam.
3272
3273         - remove all bridge-related things from WebCore except the bridge itself
3274
3275         * DOM/WebDOMOperations.mm:
3276         (-[DOMNode _bridge]): Reimplemented to not use the bridgeForDOMDocument: method.
3277
3278         * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded include.
3279
3280         * Plugins/WebPluginController.mm: Ditto.
3281
3282         * WebCoreSupport/WebFrameBridge.h: Removed unneeded things, including the
3283         init and close methods. Added a setWebFrame: method.
3284
3285         * WebCoreSupport/WebFrameBridge.mm:
3286         (-[WebFrameBridge setWebFrame:]): Added.
3287
3288         * WebCoreSupport/WebFrameLoaderClient.mm:
3289         (WebFrameLoaderClient::frameLoaderDestroyed): Added an assertion.
3290         (WebFrameLoaderClient::detachedFromParent4): Moved the call to close on the
3291         bridge here. Soon we will be able to remove this entirely!
3292         (WebFrameLoaderClient::createFrame): Rewrote this to use the method moved
3293         into WebFrame from the bridge.
3294
3295         * WebView/WebFrame.mm:
3296         (-[WebFramePrivate dealloc]): Added code to release the bridge, because it's
3297         now owned by the frame.
3298         (-[WebFramePrivate finalize]): Added this missing method. We'd leak the script
3299         debugger under GC without this!
3300         (kit): Rewrote the function that maps from a WebCore::Frame to a WebFrame to
3301         use WebFrameLoaderClient instead of the bridge.
3302         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Added.
3303         This is code that used to live in the bridge's init function.
3304         (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): Ditto.
3305         (+[WebFrame WebCore::_createSubframeWithOwnerElement:frameName:frameView:]): Ditto.
3306         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Retain the bridge, since
3307         the WebView is now the bridge's owner.
3308         (-[WebFrame _updateBackground]): Changed this one call site that was calling the
3309         WebCore::Frame::bridge function directly to use the kit function instead.
3310         (-[WebFrame dealloc]): Added code to clear the WebFrame pointer in the bridge.
3311         This code won't last long -- we're eliminating the bridge soon.
3312         (-[WebFrame finalize]): Ditto.
3313
3314         * WebView/WebFrameInternal.h: Added a coreFrame backpointer and two new methods
3315         for creating frames.
3316
3317         * WebView/WebView.mm:
3318         (-[WebView _commonInitializationWithFrameName:groupName:]): Rewrote this to use
3319         the method moved into WebFrame from the bridge. Gets rid of the unpleasant idiom
3320         where we have to allocate a WebFrameBridge and then immediately release it.
3321
3322 2008-03-11  Darin Adler  <darin@apple.com>
3323
3324         Reviewed by Anders.
3325
3326         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
3327
3328         * WebCoreSupport/WebFrameLoaderClient.mm:
3329         (WebFrameLoaderClient::transitionToCommittedForNewPage): Remove incorrect call
3330         to setView. A couple lines later, there is a call to _install, which sets the
3331         view to the scroll view.
3332
3333         * WebCoreSupport/WebViewFactory.mm: Removed bridgeForView method.
3334
3335         * WebView/WebDynamicScrollBarsView.h: Moved most of the declarations out of
3336         this file, since it's used by Safari.
3337         * WebView/WebDynamicScrollBarsViewInternal.h: Added.
3338         * WebView/WebDynamicScrollBarsView.m:
3339         (-[WebDynamicScrollBarsView updateScrollers]): Ditto.
3340         (-[WebDynamicScrollBarsView setAllowsScrolling:]): Ditto.
3341         (-[WebDynamicScrollBarsView allowsScrolling]): Ditto.
3342         (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): Ditto.
3343         (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): Ditto.
3344         (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): Ditto.
3345         (-[WebDynamicScrollBarsView allowsVerticalScrolling]): Ditto.
3346         (-[WebDynamicScrollBarsView horizontalScrollingMode]): Ditto.
3347         (-[WebDynamicScrollBarsView verticalScrollingMode]): Ditto.
3348         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): Ditto.
3349         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): Ditto.
3350         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): Ditto.
3351         (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): Ditto.
3352         (-[WebDynamicScrollBarsView setScrollingMode:]): Ditto.
3353         (-[WebDynamicScrollBarsView setScrollingMode:andLock:]): Ditto.
3354
3355         * WebView/WebFrameView.mm:
3356         (-[WebFrameView _web_frame]): Added. Replaces the webCoreBridge method.
3357
3358         * WebView/WebView.mm:
3359         (-[WebView setAlwaysShowVerticalScroller:]): Updated for changes to WebCoreFrameView.h.
3360         (-[WebView alwaysShowVerticalScroller]): Ditto.
3361         (-[WebView setAlwaysShowHorizontalScroller:]): Ditto.
3362         (-[WebView alwaysShowHorizontalScroller]): Ditto.
3363
3364 2008-03-11  Darin Adler  <darin@apple.com>
3365
3366         Reviewed by Sam.
3367
3368         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
3369
3370         * WebCoreSupport/WebChromeClient.h: Added new virtual functions that replace
3371         bridge methods.
3372         * WebCoreSupport/WebChromeClient.mm: Added lots of BEGIN_BLOCK_OBJC_EXCEPTIONS
3373         to recently-created functions.
3374         (WebChromeClient::firstResponder): Moved code here from the bridge.
3375         (WebChromeClient::makeFirstResponder): Ditto.
3376         (WebChromeClient::runOpenPanel): Ditto.
3377         (WebChromeClient::willPopUpMenu): Ditto.
3378
3379         * WebCoreSupport/WebFrameBridge.h: Removed almost everything. What's left
3380         is related to creating the bridge and connecting it to WebCore, which will
3381         go next when I eliminate use of the bridge to get to/from the Frame*.
3382         * WebCoreSupport/WebFrameBridge.mm:
3383         (-[WebFrameBridge close]): Moved the code to track the bridge count here
3384         instead of the dealloc and finalize methods.
3385
3386 2008-03-11  Darin Adler  <darin@apple.com>
3387
3388         Reviewed by Mitz.
3389
3390         - update code affected by Range changes
3391
3392         * Misc/WebNSAttributedStringExtras.mm:
3393         (+[NSAttributedString _web_attributedStringFromRange:]): Update for name changes.
3394         * WebView/WebHTMLRepresentation.mm:
3395         (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
3396         Use Range::create.
3397         * WebView/WebHTMLView.mm:
3398         (-[WebHTMLView attributedString]): Ditto.
3399
3400 2008-03-10  Darin Adler  <darin@apple.com>
3401
3402         Reviewed by Sam.
3403
3404         - eliminate keyboard UI mode method from WebCoreFrameBridge
3405
3406         * WebCoreSupport/WebChromeClient.h: Added keyboardUIMode function.
3407         * WebCoreSupport/WebChromeClient.mm:
3408         (WebChromeClient::keyboardUIMode): Ditto. Calls WebView.
3409         * WebCoreSupport/WebFrameBridge.h: Removed unused things, including the
3410         fields for keyboard UI mode.
3411         * WebCoreSupport/WebFrameBridge.mm:
3412         (-[WebFrameBridge dealloc]): Removed unneeded code; eliminated the fini
3413         method.
3414         (-[WebFrameBridge finalize]): Ditto.
3415         * WebView/WebView.mm: Moved the keyboard mode code in here.
3416         (-[WebView _close]): Remove observer from the distributed notification
3417         center as well as the normal one.
3418         (-[WebView _retrieveKeyboardUIModeFromPreferences:]): Added. Code moved
3419         here from the bridge.
3420         (-[WebView _keyboardUIMode]): Ditto.
3421         * WebView/WebViewInternal.h: Added _keyboardUIMode method.
3422
3423 2008-03-10  Darin Adler  <darin@apple.com>
3424
3425         Reviewed by Sam.
3426
3427         - eliminate Java applet methods from WebCoreFrameBridge
3428
3429         * WebCoreSupport/WebChromeClient.mm: Removed unneeded headers and declarations.
3430         * WebCoreSupport/WebFrameBridge.mm: Ditto. Also removed unneeded methods, including
3431         the ones that load Java applets.
3432         * WebCoreSupport/WebFrameLoaderClient.h: Added javaApplet function.
3433         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
3434
3435 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
3436
3437         Reviewed by Darin.
3438
3439         Done with Lars.
3440
3441         Simplified WebViewFactory's refreshPlugins method to only refresh the
3442         plugins and not reload the frames anymore since that's now done in a
3443         platform independent manner by WebCore::Page.
3444
3445         Also removed the now unused pluginNameForMIMEType and
3446         pluginSupportsMIMEType methods.
3447
3448         * WebCoreSupport/WebViewFactory.mm:
3449         * WebView/WebFrame.mm:
3450         * WebView/WebFrameInternal.h:
3451         * WebView/WebView.mm:
3452
3453 2008-03-08  Mark Rowe  <mrowe@apple.com>
3454
3455         Reviewed by Darin Adler.
3456
3457         Fix 64-bit build with GCC 4.2.
3458
3459         * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Use NSUInteger in place of unsigned where required.
3460         * DefaultDelegates/WebDefaultUIDelegate.m: Ditto.
3461         * History/WebHistoryItem.mm: Ditto.
3462         * Misc/WebElementDictionary.mm: Ditto.
3463         * WebCoreSupport/WebFrameLoaderClient.mm:
3464         (WebFrameLoaderClient::objectContentType): Move variable declaration outside of if to avoid warning about the
3465         variable being unused in 64-bit.
3466         * WebCoreSupport/WebInspectorClient.mm: Use NSUInteger in place of unsigned where required.
3467         * WebView/WebHTMLView.mm:
3468         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Use CGFloat in place of float where required.
3469         (-[WebTextCompleteController numberOfRowsInTableView:]): Use NSInteger in place of int where required.
3470
3471 2008-03-08  Darin Adler  <darin@apple.com>
3472
3473         Reviewed by Adele.
3474
3475         - eliminate custom highlight methods from WebCoreFrameBridge
3476
3477         * WebCoreSupport/WebChromeClient.h: Added custom highlight functions.
3478         * WebCoreSupport/WebChromeClient.mm:
3479         (WebChromeClient::customHighlightRect): Moved code here from bridge.
3480         (WebChromeClient::paintCustomHighlight): Ditto.
3481         * WebCoreSupport/WebFrameBridge.mm: Removed code here.
3482
3483 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
3484
3485         Unify concept of enabling Netscape Plug-in API (NPAPI).
3486
3487         Reviewed by Darin.
3488
3489         * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.
3490
3491         * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
3492         ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.
3493
3494         * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
3495         #if ENABLE(NETSCAPE_PLUGIN_API).
3496         * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
3497         * Plugins/WebBaseNetscapePluginView.h: Ditto.
3498         * Plugins/WebBaseNetscapePluginView.mm: Ditto.
3499         * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
3500         * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
3501         * Plugins/WebBasePluginPackage.h: Ditto.
3502         * Plugins/WebBasePluginPackage.m: Ditto.
3503         (+[WebBasePluginPackage pluginWithPath:]):
3504         * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
3505         * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
3506         * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
3507         * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
3508         * Plugins/WebNetscapePluginPackage.h: Ditto.
3509         * Plugins/WebNetscapePluginPackage.m: Ditto.
3510         * Plugins/WebNetscapePluginStream.h: Ditto.
3511         * Plugins/WebNetscapePluginStream.mm: Ditto.
3512         * Plugins/WebPluginDatabase.m: Ditto.
3513         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
3514         * Plugins/npapi.m: Ditto.
3515         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
3516         (WebFrameLoaderClient::objectContentType):
3517         (WebFrameLoaderClient::createPlugin):
3518         * WebView/WebHTMLView.mm: Ditto.
3519         (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
3520         * WebView/WebHTMLViewInternal.h: Ditto.
3521
3522         * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
3523         #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
3524         category to (WebInternal) category so we don't expose the ENABLE() macro
3525         from the private header.
3526         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
3527         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
3528         * WebView/WebFrameInternal.h: Ditto.
3529         * WebView/WebFramePrivate.h: Ditto.
3530
3531 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
3532
3533         Reviewed by Darin.
3534
3535         <rdar://problem/5579292> REGRESSION: (safari 2-3): "Default default" encoding for Korean
3536         changed from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites
3537
3538         * WebView/WebPreferences.m:
3539         (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Make encoding name match
3540         the one used in Safari.
3541
3542 2008-03-07  Mark Rowe  <mrowe@apple.com>
3543
3544         Reviewed by Oliver Hunt.
3545
3546         Fix WebKit build with GCC 4.2.
3547
3548         * Plugins/WebBaseNetscapePluginView.mm: Use the correct return type in method signature.
3549
3550 2008-03-07  Darin Adler  <darin@apple.com>
3551
3552         Reviewed by Adam.
3553
3554         - eliminated WebCoreFrameBridge runOpenPanel
3555
3556         * WebCoreSupport/WebChromeClient.h: Added runOpenPanel.
3557         * WebCoreSupport/WebChromeClient.mm:
3558         (WebChromeClient::runOpenPanel): Added.
3559         (-[WebOpenPanelResultListener initWithChooser:]): Added. Used to wrap the
3560         FileChooser so it can get a result from the UI delegate.
3561         (-[WebOpenPanelResultListener dealloc]): Added.
3562         (-[WebOpenPanelResultListener finalize]): Added.
3563         (-[WebOpenPanelResultListener cancel]): Added.
3564         (-[WebOpenPanelResultListener chooseFilename:]): Added.
3565
3566 2008-03-06  Darin Adler  <darin@apple.com>
3567
3568         Reviewed by Mitz.
3569
3570         - fix regression test failures from the visited-link change
3571
3572         * History/WebHistory.mm:
3573         (+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks
3574         to turn off visited links if there is no history object. Also call
3575         removeAllVisitedLinks so we can start over from scratch with the new history.
3576
3577 2008-03-06  Dan Bernstein  <mitz@apple.com>
3578
3579         Reviewed by Darin Adler.
3580
3581         - fix a regression from r30741: a crash under
3582           WebFrameLoaderClient::createPlugin() when showing a Mail message with
3583           an attachment
3584
3585         * WebCoreSupport/WebFrameLoaderClient.mm:
3586         (WebFrameLoaderClient::createPlugin):
3587
3588 2008-03-06  Darin Adler  <darin@apple.com>
3589
3590         - fix Tiger build
3591
3592         * History/WebHistory.mm: Added include of WebTypesInternal.h.
3593
3594 2008-03-06  Darin Adler  <darin@apple.com>
3595
3596         - fix Release build
3597
3598         * History/WebHistory.mm:
3599         (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]): Removed underscore.
3600         (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]): Added #if.
3601         (-[WebHistoryPrivate saveToURL:error:]): Ditto.
3602
3603 2008-03-06  Darin Adler  <darin@apple.com>
3604
3605         Reviewed by Mitz.
3606
3607         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
3608           REGRESSION: iframes are added to Safari's History menu
3609           by separating the visited link machinery from global history
3610
3611         * History/WebHistory.mm: Moved WebHistoryPrivate inside this file.
3612         (-[WebHistoryPrivate removeItemFromDateCaches:]): Removed the underscore from this
3613         method name, since it's on a private object.
3614         (-[WebHistoryPrivate removeItemForURLString:]): Added a call to the
3615         PageGroup::removeAllVisitedLinks function if the last URL was removed.
3616         (-[WebHistoryPrivate addItemToDateCaches:]): Removed the underscore from this
3617         method name, since it's on a private object.
3618         (-[WebHistoryPrivate removeAllItems]): Call PageGroup::removeAllVisitedLinks.
3619         (-[WebHistoryPrivate ageLimitDate]): Removed the underscore from this
3620         method name, since it's on a private object.
3621         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
3622         Ditto.
3623         (-[WebHistoryPrivate saveHistoryGuts:URL:error:]): Ditto. Also changed this
3624         to correctly return the error by using the newer version of writeToURL: and
3625         removed the FIXME about that.
3626         (-[WebHistoryPrivate addVisitedLinksToPageGroup:]): Added. Calls addVisitedLink
3627         for every link in the history.
3628         (-[WebHistory saveToURL:error:]): Removed the FIXME, since we do get the error now.
3629         (-[WebHistory addItem:]): Moved into the WebPrivate category.
3630         (-[WebHistory addItemForURL:]): Ditto.
3631         (-[WebHistory _addItemForURL:title:]): Added. Used for the normal case where we
3632         create an item and already know its title.
3633         (-[WebHistory ageLimitDate]): Moved into the WebPrivate category.
3634         (-[WebHistory containsItemForURLString:]): Ditto.
3635         (-[WebHistory removeItem:]): Ditto.
3636         (-[WebHistory setLastVisitedTimeInterval:forItem:]): Ditto.
3637         (-[WebHistory _itemForURLString:]): Ditto.
3638         (-[WebHistory _addVisitedLinksToPageGroup:]): Added. For use only inside WebKit.
3639
3640         * History/WebHistoryInternal.h: Added.
3641         * History/WebHistoryItemInternal.h: Tweaked formatting and includes.
3642         * History/WebHistoryPrivate.h: Moved the WebHistoryPrivate class out of this header.
3643         Also reorganized what was left behind.
3644
3645         * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks.
3646         * WebCoreSupport/WebChromeClient.mm:
3647         (WebChromeClient::populateVisitedLinks): Added a call to the new
3648         -[WebHistory _addVisitedLinksToPageGroup:] method.
3649
3650         * WebCoreSupport/WebFrameLoaderClient.mm:
3651         (WebFrameLoaderClient::updateGlobalHistory): Changed code to use the new
3652         -[WebHistory _addItemForURL:title:] method.
3653
3654 2008-03-05  Adam Roben  <aroben@apple.com>
3655
3656         Rename WebCoreScriptDebuggerImp.{h,mm} to WebScriptDebugger.{h,mm}
3657
3658         Reviewed by Kevin M.
3659
3660         * WebView/WebFrame.mm:
3661         * WebView/WebScriptDebugDelegate.mm:
3662         * WebView/WebScriptDebugger.h: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.h.
3663         * WebView/WebScriptDebugger.mm: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.mm.
3664
3665 2008-03-05  Adam Roben  <aroben@apple.com>
3666
3667         Rename WebCoreScriptDebuggerImp to WebScriptDebugger
3668
3669         Reviewed by Kevin M.
3670
3671         * WebView/WebCoreScriptDebuggerImp.h:
3672         * WebView/WebCoreScriptDebuggerImp.mm:
3673         * WebView/WebFrame.mm:
3674         (-[WebFrame _attachScriptDebugger]):
3675         * WebView/WebFrameInternal.h:
3676
3677 2008-03-05  Adam Roben  <aroben@apple.com>
3678
3679         Remove WebScriptDebugger
3680
3681         Uses of WebScriptDebugger have been replaced with
3682         WebCoreScriptDebuggerImp.
3683
3684         Reviewed by Kevin M.
3685
3686         * WebView/WebFrame.mm:
3687         (-[WebFramePrivate dealloc]): Use delete instead of release since
3688         WebCoreScriptDebuggerImp is a C++ class.
3689         (-[WebFrame _attachScriptDebugger]): Updated to use early returns and
3690         WebCoreScriptDebuggerImp.
3691         (-[WebFrame _detachScriptDebugger]): Ditto.
3692         * WebView/WebFrameInternal.h:
3693         * WebView/WebScriptDebugDelegate.mm: Removed WebScriptDebugger
3694         * WebView/WebScriptDebugDelegatePrivate.h: Removed.
3695         * WebView/WebView.mm:
3696
3697 2008-03-05  Adam Roben  <aroben@apple.com>
3698
3699         Remove -webFrame and -globalObject from WebScriptDebugger
3700
3701         WebCoreScriptDebuggerImp is now unaware of WebScriptDebugger
3702
3703         Reviewed by Kevin M.
3704
3705         * WebView/WebCoreScriptDebuggerImp.h: Removed WebScriptDebugger*
3706         parameter to the constructor.
3707         * WebView/WebCoreScriptDebuggerImp.mm:
3708         (toWebFrame): Added.
3709         (WebCoreScriptDebuggerImp::sourceParsed): Call toWebFrame.
3710         (WebCoreScriptDebuggerImp::callEvent): Ditto, and get the Frame's
3711         WindowScriptObject ourselves instead of asking WebScriptDebugger for
3712         it.
3713         (WebCoreScriptDebuggerImp::atStatement): Call toWebFrame.
3714         (WebCoreScriptDebuggerImp::returnEvent): Ditto.
3715         (WebCoreScriptDebuggerImp::exception): Ditto.
3716         * WebView/WebScriptDebugDelegate.mm:
3717         (-[WebScriptDebugger initWithWebFrame:]): Updated for change to
3718         WebScriptDebuggerImp's constructor.
3719         * WebView/WebScriptDebugDelegatePrivate.h: Removed
3720         -webFrame/-globalObject.
3721
3722 2008-03-05  Adam Roben  <aroben@apple.com>
3723
3724         Remove -enterFrame: and -leaveFrame from WebScriptDebugger
3725
3726         Reviewed by Kevin M.
3727
3728         * WebView/WebCoreScriptDebuggerImp.h: Changed to store m_topCallFrame
3729         in a RetainPtr, now that WebCoreScriptDebuggerImp is in charge of its
3730         lifetime.
3731         * WebView/WebCoreScriptDebuggerImp.mm:
3732           - Added declaration of -[WebScriptCallFrame
3733             _initWithGlobalObject:caller:state:].
3734           - Changed most uses of m_topCallFrame to m_topCallFrame.get()
3735         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Removed
3736         now-unnecessary initialization of m_topCallFrame.
3737         (WebCoreScriptDebuggerImp::callEvent): Replaced call to enterFrame:
3738         with its implementation. The one difference between this
3739         implementation and the old enterFrame: method is that we don't hand
3740         our reference to m_topCallFrame to _initWithGlobalObject: -- that
3741         method must now retain the passed-in WebScriptCallFrame manually.
3742         (WebCoreScriptDebuggerImp::atStatement):
3743         (WebCoreScriptDebuggerImp::returnEvent): Replaced call to leaveFrame
3744         with its implementation.
3745         (WebCoreScriptDebuggerImp::exception):
3746         * WebView/WebScriptDebugDelegate.mm: Removed declaration of
3747         -[WebScriptCallFrame _initWithGlobalObject:caller:state:].
3748         (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Changed
3749         to retain the passed-in caller.
3750         * WebView/WebScriptDebugDelegatePrivate.h:
3751           - Removed _current ivar
3752           - Removed enterFrame:/leaveFrame declarations.
3753
3754 2008-03-05  Adam Roben  <aroben@apple.com>
3755
3756         Remove -parsedSource: from WebScriptDebugger
3757
3758         Reviewed by Kevin M.
3759
3760         * WebView/WebCoreScriptDebuggerImp.mm:
3761         (WebCoreScriptDebuggerImp::sourceParsed): Moved code here from
3762         -[WebScriptDebugger parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]
3763         * WebView/WebScriptDebugDelegate.mm: Removed -parsedSource:.
3764         * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
3765
3766 2008-03-05  Adam Roben  <aroben@apple.com>
3767
3768         Remove -enteredFrame:, -leavingFrame:, and -exceptionRaised: from WebScriptDebugger
3769
3770         Reviewed by Kevin M.
3771
3772         * WebView/WebCoreScriptDebuggerImp.mm:
3773         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Changed to call
3774         trhough to callEvent instead of duplicating its code here.
3775         (WebCoreScriptDebuggerImp::callEvent): Moved code from
3776         -[WebScriptDebugger enteredFrame:sourceId:line:] here.
3777         (WebCoreScriptDebuggerImp::returnEvent): Moved code from
3778         -[WebScriptDebugger leavingFrame:sourceId:line:] here.
3779         (WebCoreScriptDebuggerImp::exception): Moved code from
3780         -[WebScriptDebugger exceptionRaised:sourceId:line:] here.
3781         * WebView/WebScriptDebugDelegate.mm: Removed -enteredFrame:,
3782         -leavingFrame:, and -exceptionRaised:.
3783         * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
3784
3785 2008-03-05  Adam Roben  <aroben@apple.com>
3786
3787         Remove -[WebScriptDebugger hitStatement:sourceId:line:]
3788
3789         Reviewed by Kevin M.
3790
3791         * WebView/WebCoreScriptDebuggerImp.mm:
3792         (WebCoreScriptDebuggerImp::atStatement): Moved code here from
3793         -[WebScriptDebugger hitStatement:sourceId:line:].
3794         * WebView/WebScriptDebugDelegate.mm:
3795         (-[WebScriptDebugger webFrame]): Added.
3796         * WebView/WebScriptDebugDelegatePrivate.h:
3797
3798 2008-03-05  Adam Roben  <aroben@apple.com>
3799
3800         Remove WebCoreScriptDebugger
3801
3802         Reviewed by Kevin M.
3803
3804         * WebView/WebCoreScriptDebugger.h: Removed.
3805         * WebView/WebCoreScriptDebugger.mm: Removed.
3806         * WebView/WebCoreScriptDebuggerImp.h: Replaced WebCoreScriptDebugger
3807         with WebScriptDebugger.
3808         * WebView/WebCoreScriptDebuggerImp.mm: Ditto, and replaced [m_debugger
3809         delegate] with just m_debugger.
3810         (toNSString): Moved here from WebCoreScriptDebugger.mm.
3811         (toNSURL): Ditto.
3812         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
3813         (WebCoreScriptDebuggerImp::sourceParsed):
3814         (WebCoreScriptDebuggerImp::callEvent):
3815         (WebCoreScriptDebuggerImp::atStatement):
3816         (WebCoreScriptDebuggerImp::returnEvent):
3817         (WebCoreScriptDebuggerImp::exception):
3818         * WebView/WebScriptDebugDelegate.mm:
3819         (-[WebScriptDebugger initWithWebFrame:]): _debugger now holds a
3820         WebCoreScriptDebuggerImp, so initialize it properly.
3821         * WebView/WebScriptDebugDelegatePrivate.h: Changed _debugger to hold a
3822         WebCoreScriptDebuggerImp.
3823
3824 2008-03-05  Adam Roben  <aroben@apple.com>
3825
3826         Move WebCoreScriptDebuggerImp to its own source files
3827
3828         Also changed WebCoreScriptDebuggerImp coding style to match our style
3829         guidelines.
3830
3831         Reviewed by Kevin M.
3832
3833         * WebView/WebCoreScriptDebugger.h: Added declaration of toNSURL
3834         function.
3835         * WebView/WebCoreScriptDebugger.mm: Removed WebCoreScriptDebuggerImp
3836         implementation.
3837         (toNSURL): Made no longer static.
3838         * WebView/WebCoreScriptDebuggerImp.h: Added.
3839         * WebView/WebCoreScriptDebuggerImp.mm: Added. Code was moved here from
3840         WebCoreScriptDebugger.mm and cleaned up.
3841         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
3842         (WebCoreScriptDebuggerImp::sourceParsed):
3843         (WebCoreScriptDebuggerImp::callEvent):
3844         (WebCoreScriptDebuggerImp::atStatement):
3845         (WebCoreScriptDebuggerImp::returnEvent):
3846         (WebCoreScriptDebuggerImp::exception):
3847
3848 2008-03-05  Adam Roben  <aroben@apple.com>
3849
3850         Move -_enterFrame and -_leaveFrame from WebCoreScriptDebugger to WebScriptDebugger
3851
3852         Reviewed by Kevin M.
3853
3854         * WebView/WebCoreScriptDebugger.h:
3855           - Removed newFrameWithGlobalObject:caller:state: from
3856             WebScriptDebugger protocol
3857           - Added enterFrame: and leaveFrame: to WebScriptDebugger protocol
3858           - Removed _current ivar from WebCoreScriptDebugger
3859         * WebView/WebCoreScriptDebugger.mm:
3860         (WebCoreScriptDebuggerImp::callEvent): Changed to call enterFrame on
3861         the delegate.
3862         (WebCoreScriptDebuggerImp::returnEvent): Ditto for leaveFrame.
3863         * WebView/WebScriptDebugDelegate.mm:
3864         (-[WebScriptDebugger dealloc]): Added code to release _current.
3865         (-[WebScriptDebugger enterFrame:]): Added. Code came from
3866         WebCoreScriptDebugger.
3867         (-[WebScriptDebugger leaveFrame]): Ditto.
3868         * WebView/WebScriptDebugDelegatePrivate.h: Added _current ivar.
3869
3870 2008-03-05  Adam Roben  <aroben@apple.com>
3871
3872         Remove WebCoreScriptCallFrame
3873
3874         Reviewed by Tim.
3875
3876         * WebView/WebCoreScriptDebugger.h:
3877           - Replaced WebCoreScriptCallFrame with WebScriptCallFrame
3878           - Replaced -newWrapperForFrame: with
3879             -newFrameWithGlobalObject:caller:state:
3880           - Removed WebCoreScriptCallFrame interface.
3881         * WebView/WebCoreScriptDebugger.mm: Replaced WebCoreScriptCallFrame
3882         with WebScriptCallFrame.
3883         (-[WebCoreScriptDebugger _enterFrame:]): Changed to call
3884         -newFrameWithGlobalObject:caller:state.
3885         (-[WebCoreScriptDebugger _leaveFrame]):
3886         * WebView/WebScriptDebugDelegate.h: Changed WebScriptCallFrame's
3887         _private ivar to be of type WebScriptCallFramePrivate*.
3888         * WebView/WebScriptDebugDelegate.mm:
3889           - Replaced WebCoreScriptCallFrame with WebScriptCallFrame
3890           - Added WebScriptCallFramePrivate
3891         (-[WebScriptDebugger enteredFrame:sourceId:line:]):
3892         (-[WebScriptDebugger hitStatement:sourceId:line:]):
3893         (-[WebScriptDebugger leavingFrame:sourceId:line:]):
3894         (-[WebScriptDebugger exceptionRaised:sourceId:line:]):
3895         (-[WebScriptCallFramePrivate dealloc]): Added.
3896         (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Added.
3897         Code came from WebCoreScriptCallFrame.
3898         (-[WebScriptCallFrame dealloc]): Added a call to release the _private
3899         ivar.
3900         (-[WebScriptCallFrame _convertValueToObjcValue:]): Replaced calls to
3901         _private with direct access of _private's ivars.
3902         (-[WebScriptCallFrame caller]): Ditto.
3903         (-[WebScriptCallFrame scopeChain]): Ditto.
3904         (-[WebScriptCallFrame evaluateWebScript:]): Ditto.
3905
3906 2008-03-05  Adam Roben  <aroben@apple.com>
3907
3908         Move -_convertValueToObjcValue to WebScriptCallFrame
3909
3910         Reviewed by Darin.
3911
3912         * WebView/WebCoreScriptDebugger.h: Removed declaration of
3913         -_convertValueToObjcValue.
3914         * WebView/WebCoreScriptDebugger.mm: Removed -_convertValueToObjcValue.
3915         * WebView/WebScriptDebugDelegate.mm:
3916         (-[WebScriptCallFrame _convertValueToObjcValue:]): Added. Code came
3917         from -[WebCoreScriptCallFrame _convertValueToObjcValue].
3918         (-[WebScriptCallFrame scopeChain]): Changed to call
3919         -_convertValueToObjcValue on self instead of _private.
3920         (-[WebScriptCallFrame exception]): Ditto.
3921         (-[WebScriptCallFrame evaluateWebScript:]): Ditto.
3922
3923 2008-03-05  Adam Roben  <aroben@apple.com>
3924
3925         Move -exception and -evaluateWebScript: to WebScriptCallFrame
3926
3927         Reviewed by Darin.
3928
3929         * WebView/WebCoreScriptDebugger.h: Removed declarations of -exception
3930         and -evaluateWebScript:.
3931         * WebView/WebCoreScriptDebugger.mm: Removed -exception and
3932         -evaluateWebScript:.
3933         * WebView/WebScriptDebugDelegate.mm:
3934         (-[WebScriptCallFrame exception]): Added. Code came from
3935         -[WebCoreScriptCallFrame exception].
3936         (-[WebScriptCallFrame evaluateWebScript:]): Added. Code came from
3937         -[WebCoreScriptCallFrame evaluateWebScript:].
3938
3939 2008-03-05  Adam Roben  <aroben@apple.com>
3940
3941         Move -scopeChain to WebScriptCallFrame
3942
3943         Reviewed by Darin.
3944
3945         * WebView/WebCoreScriptDebugger.h:
3946           - Added declarations of -globalObject and -_convertValueToObjcValue:
3947             to WebCoreScriptCallFrame
3948           - Removed declaration of -scopeChain.
3949         * WebView/WebCoreScriptDebugger.mm: Moved -_convertValueToObjcValue
3950         within the main WebCoreScriptCallFrame implementation.
3951         (-[WebCoreScriptCallFrame globalObject]): Added.
3952         * WebView/WebScriptDebugDelegate.mm:
3953         (-[WebScriptCallFrame scopeChain]): Added. Code came from
3954         -[WebCoreScriptCallFrame scopeChain].
3955
3956 2008-03-05  Adam Roben  <aroben@apple.com>
3957
3958         Move -functionName from WebCoreScriptCallFrame to WebScriptCallFrame
3959
3960         Reviewed by Darin.
3961
3962         * WebView/WebCoreScriptDebugger.h:
3963           - Removed #else case of #ifdef __cplusplus since this file is only
3964             ever used by C++ Objective-C files
3965           - Removed 'using KJS::ExecState' statement since we prefer not to
3966             have using statements in header files
3967           - Consequently prefixed uses of ExecState with KJS::
3968           - Added declaration of toNSString method that takes a const
3969             UString&
3970           - Added declaration of -[WebCoreScriptCallFrame state]
3971           - Removed declaration of -[WebCoreScriptCallFrame functionName]
3972         * WebView/WebCoreScriptDebugger.mm:
3973         (toNSString): Made this no longer static.
3974         (-[WebCoreScriptCallFrame state]): Added.
3975         * WebView/WebScriptDebugDelegate.mm:
3976         (-[WebScriptCallFrame functionName]): Added. Code came from
3977         -[WebCoreScriptCallFrame functionName], though I changed some nested
3978         ifs into early returns.
3979
3980 2008-03-05  Adam Roben  <aroben@apple.com>
3981
3982         Move WebCoreScriptDebugger to WebKit
3983
3984         Reviewed by Darin.
3985
3986         * WebView/WebCoreScriptDebugger.h: Renamed from WebCore/page/mac/WebCoreScriptDebugger.h.
3987         * WebView/WebCoreScriptDebugger.mm: Renamed from WebCore/page/mac/WebCoreScriptDebugger.mm.
3988         (toNSString):
3989         (toNSURL):
3990         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
3991         (WebCoreScriptDebuggerImp::sourceParsed):
3992         (WebCoreScriptDebuggerImp::callEvent):
3993         (WebCoreScriptDebuggerImp::atStatement):
3994         (WebCoreScriptDebuggerImp::returnEvent):
3995         (WebCoreScriptDebuggerImp::exception):
3996         (+[WebCoreScriptDebugger initialize]):
3997         (-[WebCoreScriptDebugger initWithDelegate:]):
3998         (-[WebCoreScriptDebugger dealloc]):
3999         (-[WebCoreScriptDebugger finalize]):
4000         (-[WebCoreScriptDebugger delegate]):
4001         (-[WebCoreScriptDebugger _enterFrame:]):
4002         (-[WebCoreScriptDebugger _leaveFrame]):
4003         (-[WebCoreScriptCallFrame _initWithGlobalObject:caller:state:]):
4004         (-[WebCoreScriptCallFrame _setWrapper:]):
4005         (-[WebCoreScriptCallFrame _convertValueToObjcValue:]):
4006         (-[WebCoreScriptCallFrame dealloc]):
4007         (-[WebCoreScriptCallFrame wrapper]):
4008         (-[WebCoreScriptCallFrame caller]):
4009         (-[WebCoreScriptCallFrame scopeChain]):
4010         (-[WebCoreScriptCallFrame functionName]):
4011         (-[WebCoreScriptCallFrame exception]):
4012         (-[WebCoreScriptCallFrame evaluateWebScript:]):
4013         * WebView/WebScriptDebugDelegate.mm: Updated header path.
4014         * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
4015
4016 2008-03-05  Anders Carlsson  <andersca@apple.com>
4017
4018         Reviewed by Geoff.
4019
4020         Include file changes.
4021         
4022         * Plugins/WebBaseNetscapePluginView.mm:
4023         * Plugins/WebNetscapePluginPackage.m:
4024
4025 2008-03-04  Timothy Hatcher  <timothy@apple.com>
4026
4027         Reviewed by Darin Adler.
4028
4029         <rdar://problem/5720160> Browser windows "do nothing" while modal
4030         dialog or menu is up due to run loop modes (or while scrolling)
4031
4032         Add new API that lets a WebView be scheduled with multiple runloops and modes.
4033         This lets loading continue when in a nested runloop or in a different mode.
4034
4035         * Misc/WebKitVersionChecks.h: Add a new version define:
4036         WEBKIT_FIRST_VERSION_WITH_LOADING_DURING_COMMON_RUNLOOP_MODES.
4037         * WebView/WebView.mm:
4038         (-[WebView _commonInitializationWithFrameName:groupName:]): Schedule in the main runloop and with
4039         the default runloop mode if we are linked on an earlier WebKit version, use common modes otherwise.
4040         (-[WebView scheduleInRunLoop:forMode:]): New API, that calls through to Page.
4041         (-[WebView unscheduleFromRunLoop:forMode:]): Ditto.
4042         * WebView/WebViewPrivate.h: Add the new pending API methods.
4043
4044 2008-03-04  Anders Carlsson  <andersca@apple.com>
4045
4046         Reviewed by Darin.
4047
4048         Fix crash that happens when trying to load a page with a Java applet.
4049         
4050         * WebCoreSupport/WebFrameLoaderClient.mm:
4051         Don't release the names and values array - the kit method returns an autoreleased array.
4052
4053 2008-03-04  Darin Adler  <darin@apple.com>
4054
4055         Reviewed by Adam.
4056
4057         - fix 200+ failing regression tests
4058         - fix http://bugs.webkit.org/show_bug.cgi?id=17668
4059           Vertical scrollbar at slashdot.org is randomly not shown
4060
4061         * WebCoreSupport/WebFrameLoaderClient.mm:
4062         (WebFrameLoaderClient::transitionToCommittedForNewPage): Changed the refcounting
4063         code here to exactly match the way it was before it was moved from WebCore. I had
4064         introduced a storage leak and that was causing problems with scroll bars!
4065
4066 2008-03-04  Darin Adler  <darin@apple.com>
4067
4068         Reviewed by Adam.
4069
4070         - remove WebCoreFrameBridge reapplyStyles method
4071
4072         * WebView/WebHTMLView.mm:
4073         (-[WebHTMLView reapplyStyles]): Moved code to reapply styles here from the bridge.
4074
4075 2008-03-04  Darin Adler  <darin@apple.com>
4076
4077         Reviewed by Adam.
4078
4079         - eliminate WebCoreFrameBridge createFrameViewWithNSView
4080
4081         * WebCoreSupport/WebFrameLoaderClient.mm:
4082         (WebFrameLoaderClient::transitionToCommittedForNewPage):
4083         Moved code here from createFrameViewWithNSView.
4084
4085 2008-03-04  Darin Adler  <darin@apple.com>
4086
4087         Reviewed by Adam.
4088
4089         - removed WebCoreFrameBridge scrollOverflowInDirection
4090
4091         * WebView/WebFrameView.mm:
4092         (-[WebFrameView _scrollOverflowInDirection:granularity:]): Changed to call
4093         EventHandler directly instead of using the bridge.
4094         (-[WebFrameView scrollToBeginningOfDocument:]): Updated to use WebCore enums instead
4095         of the ones from the bridge.
4096         (-[WebFrameView scrollToEndOfDocument:]): Ditto.
4097         (-[WebFrameView _pageVertically:]): Ditto.
4098         (-[WebFrameView _pageHorizontally:]): Ditto.
4099         (-[WebFrameView _scrollLineVertically:]): Ditto.
4100         (-[WebFrameView _scrollLineHorizontally:]): Ditto.
4101
4102 2008-03-04  Darin Adler  <darin@apple.com>
4103
4104         Reviewed by Adam.
4105
4106         - remove WebCoreFrameBridge installInFrame: method
4107
4108         * WebCoreSupport/WebFrameLoaderClient.mm:
4109         (WebFrameLoaderClient::transitionToCommittedForNewPage): Call
4110         -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:].
4111         * WebView/WebFrameView.mm:
4112         (-[WebFrameView _install]): Added. Has code from -[WebCoreFrameBridge installInFrame:].
4113         (-[WebFrameView _setCustomScrollViewClass:]): Used early return idiom so the entire
4114         method isn't nested inside an if statement. Call
4115         -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:].
4116         * WebView/WebFrameViewInternal.h: Added declaration of _install method so it can be
4117         used in WebFrameLoaderClient.mm.
4118
4119 2008-03-04  Darin Adler  <darin@apple.com>
4120
4121         Reviewed by Adam.
4122
4123         - remove WebCoreFrameBridge window method
4124
4125         * WebCoreSupport/WebFrameBridge.mm: Removed window method.
4126
4127 2008-03-04  Darin Adler  <darin@apple.com>
4128
4129         Reviewed by Adam.
4130
4131         - move code from WebFrameBridge into WebFrameLoaderClient
4132
4133         * WebCoreSupport/WebFrameBridge.h: Removed unused fields, changed frame name parameters
4134         to use WebCore::String instead of NSString, add initSubframeWithOwnerElement declaration,
4135         removed viewForPluginWithFrame, viewForJavaAppletWithFrame, createChildFrameNamed,
4136         redirectDataToPlugin, determineObjectFromMIMEType, and windowObjectCleared methods.
4137         * WebCoreSupport/WebFrameBridge.mm:
4138         (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
4139         Changed to use WebCore::String.
4140         (-[WebFrameBridge initMainFrameWithPage:frameName:WebCore::frameView:]): Ditto.
4141         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:WebCore::frameView:]): Ditto.
4142
4143         * WebCoreSupport/WebFrameLoaderClient.mm:
4144         (WebFrameLoaderClient::setOriginalURLForDownload): Removed some dead code I found here
4145         and added a FIXME.
4146         (WebFrameLoaderClient::createFrame): Moved the code from WebFrameBridge here.
4147         (WebFrameLoaderClient::objectContentType): Ditto.
4148         (parameterValue): Added.  Helper function, based on code originally in WebFrameBridge.
4149         (pluginView): Ditto.
4150         (WebFrameLoaderClient::createPlugin): Moved the code from WebFrameBridge here.
4151
4152 2008-03-04  Darin Adler  <darin@apple.com>
4153
4154         Reviewed by Adam.
4155
4156         - remove -[WebCoreFrameBridge dashboardRegionsChanged:]
4157
4158         * WebCoreSupport/WebChromeClient.h:
4159         * WebCoreSupport/WebChromeClient.mm:
4160         (WebChromeClient::dashboardRegionsChanged): Moved code here from the bridge.
4161         The WebCore side now calls this only when there's an actual change.
4162         * WebCoreSupport/WebFrameBridge.h: Removed lastDashboardRegions.
4163         * WebCoreSupport/WebFrameBridge.mm:
4164         (-[WebFrameBridge dealloc]): Removed code to release lastDashboardRegions.
4165         Removed _compareDashboardRegions: and dashboardRegionsChanged: methods.
4166
4167 2008-03-04  Darin Adler  <darin@apple.com>
4168
4169         Reviewed by Adam.
4170
4171         - remove WebCoreFrameBridge issuePasteComand method
4172
4173         * WebCoreSupport/WebFrameBridge.mm: Removed issuePasteCommand method.
4174         * WebView/WebHTMLViewInternal.h: Removed declaration of paste: method.
4175
4176 2008-03-03  Darin Adler  <darin@apple.com>
4177