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