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