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