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