bb09fcd337f8fefd6b8348af67a407aa87cdbd93
[WebKit-https.git] / WebKit / mac / ChangeLog
1 2009-03-02  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Mark Rowe.
4
5         Enable Geolocation (except on Tiger and Leopard).
6
7         * Configurations/WebKit.xcconfig:
8
9 2009-03-02  Anders Carlsson  <andersca@apple.com>
10
11         Reviewed by Dan Bernstein.
12
13         WebKit part of <rdar://problem/6638658>.
14         
15         * Plugins/Hosted/NetscapePluginHostManager.h:
16         * Plugins/Hosted/NetscapePluginHostManager.mm:
17         (WebKit::NetscapePluginHostManager::createPropertyListFile):
18         Spawn the plug-in host and wait for it to create the property list.
19         
20         * Plugins/WebBasePluginPackage.mm:
21         (-[WebBasePluginPackage createPropertyListFile]):
22         Factor code out into a new method.
23         
24         (-[WebBasePluginPackage pListForPath:createFile:]):
25         Call the newly added createPropertyListFile method.
26         
27         * Plugins/WebNetscapePluginPackage.mm:
28         (-[WebNetscapePluginPackage createPropertyListFile]):
29         Tell the plug-in host manager to create a property list file for us.
30
31 2009-03-02  Sam Weinig  <sam@webkit.org>
32
33         Reviewed by Geoffrey Garen.
34
35         Fix for <rdar://problem/6507404> Add Geolocation support.
36
37         This is not yet turned on for any Mac platform.
38
39         Add SPI to ask the embedding application whether to allow
40         Geolocation for an origin.
41
42         * WebCoreSupport/WebChromeClient.h:
43         * WebCoreSupport/WebChromeClient.mm:
44         (WebChromeClient::shouldAllowGeolocationForFrame):
45         * WebView/WebUIDelegatePrivate.h:
46
47 2009-03-02  Anders Carlsson  <andersca@apple.com>
48
49         Fix PowerPC build.
50
51         * Plugins/WebNetscapePluginPackage.mm:
52         (-[WebNetscapePluginPackage _tryLoad]):
53
54 2009-03-02  Anders Carlsson  <andersca@apple.com>
55
56         Reviewed by John Sullivan, Ada Chan.
57
58         Factor loading code out into its own method and get rid of a bunch of gotos.
59         
60         * Plugins/WebNetscapePluginPackage.mm:
61         (-[WebNetscapePluginPackage _tryLoad]):
62         (-[WebNetscapePluginPackage load]):
63
64 2009-03-02  Anders Carlsson  <andersca@apple.com>
65
66         Build fix.
67
68         * Plugins/WebNetscapeDeprecatedFunctions.h:
69
70 2009-03-02  Anders Carlsson  <andersca@apple.com>
71
72         Reviewed by John Sullivan.
73
74         Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
75
76         * Plugins/WebNetscapePluginPackage.m: Removed.
77         * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
78
79 2009-03-01  Anders Carlsson  <andersca@apple.com>
80
81         Reviewed by Sam Weinig.
82
83         WebKit side of <rdar://problem/6449689>
84
85         Pass the visible name to the plug-in host.
86         
87         * Plugins/Hosted/NetscapePluginHostManager.mm:
88         (WebKit::NetscapePluginHostManager::spawnPluginHost):
89
90 2009-02-27  Alice Liu  <alice.liu@apple.com>
91
92         Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
93         extension to images that already have .jpg extension
94
95         Reviewed by Oliver Hunt.
96
97         * WebView/WebHTMLView.mm:
98         (-[NSString matchesExtensionEquivalent:]):
99         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
100         Relax the check for the proper extension to allow for known
101         equivalents, special-cased in matchesExtensionEquivalent function.
102
103 2009-02-27  Anders Carlsson  <andersca@apple.com>
104
105         Reviewed by Geoffrey Garen.
106
107         <rdar://problem/6631436>
108         CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
109         
110         Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
111         
112         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
113         (WebKit::NetscapePluginInstanceProxy::evaluate):
114
115 2009-02-27  Anders Carlsson  <andersca@apple.com>
116
117         Reviewed by Geoffrey Garen.
118
119         WebKit side of <rdar://problem/6626814>.
120         
121         * Plugins/Hosted/NetscapePluginHostProxy.mm:
122         (WKPCInvokeDefault):
123         Make InvokeDefault async.
124         
125         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
126         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
127         Handle passing NPObjects back to the plug-in host.
128         
129         * Plugins/Hosted/ProxyInstance.h:
130         (WebKit::ProxyInstance::objectID):
131         Add objectID getter.
132         
133         * Plugins/Hosted/WebKitPluginClient.defs:
134         Make InvokeDefault a simpleroutine.
135
136 2009-02-27  Timothy Hatcher  <timothy@apple.com>
137
138         Fixes an exception by null checking the WebResource before adding it to
139         the subresources array.
140
141         <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
142
143         Reviewed by Geoff Garen and Anders Carlsson.
144
145         * WebView/WebDataSource.mm:
146         (-[WebDataSource subresources]): Null check the WebResource before adding it.
147
148 2009-02-27  Timothy Hatcher  <timothy@apple.com>
149
150         Adds a workaround for Automator creating a WebView from a secondary thread.
151
152         <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
153         secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
154
155         Reviewed by Geoff Garen.
156
157         * WebView/WebView.mm:
158         (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
159
160 2009-02-27  Adam Barth  <abarth@webkit.org>
161
162         Reviewed by Eric Seidel.
163
164         Add a preference to reduce the power of file:// URLs.
165
166         * WebView/WebPreferenceKeysPrivate.h:
167         * WebView/WebPreferences.mm:
168         (+[WebPreferences initialize]):
169         (-[WebPreferences allowUniversalAccessFromFileUrls]):
170         (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
171         * WebView/WebPreferencesPrivate.h:
172         * WebView/WebView.mm:
173         (-[WebView _preferencesChangedNotification:]):
174
175 2009-02-27  Simon Fraser  <simon.fraser@apple.com>
176
177         Reviewed by Anders Carlsson
178
179         https://bugs.webkit.org/show_bug.cgi?id=24242
180         
181         setCursor(), and resetCursorRects() on Tiger, were using global, not local
182         coordinates for elementAtPoint:
183         
184         * WebView/WebHTMLView.mm:
185         (resetCursorRects):
186         (setCursor):
187
188 2009-02-27  Adam Barth  <abarth@webkit.org>
189
190         Reviewed by Eric Seidel.
191
192         Add a preference to reduce the power of file:// URLs.
193
194         * WebView/WebPreferenceKeysPrivate.h:
195         * WebView/WebPreferences.mm:
196         (+[WebPreferences initialize]):
197         (-[WebPreferences allowUniversalAccessFromFileUrls]):
198         (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
199         * WebView/WebPreferencesPrivate.h:
200         * WebView/WebView.mm:
201         (-[WebView _preferencesChangedNotification:]):
202
203 2009-02-26  Adele Peterson  <adele@apple.com>
204
205         Reviewed by Geoff Garen.
206
207         Fix for <rdar://problem/6618166>
208         https://bugs.webkit.org/show_bug.cgi?id=24216
209         (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
210
211         During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
212         we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
213         This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
214
215         In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were 
216         fixed in r36919 and r38570 are still fixed.
217
218         * WebView/WebHTMLView.mm:
219         (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
220         (-[WebHTMLView _isResigningFirstResponder]): Added.
221         * WebView/WebHTMLViewInternal.h:
222         * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
223         if the document view is currently resigning first responder.
224
225 2009-02-25  Anders Carlsson  <andersca@apple.com>
226
227         Reviewed by Kevin Decker.
228
229         Fix <rdar://problem/6623697>.
230         
231         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
232         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
233         (WebKit::NetscapePluginInstanceProxy::print):
234         Ask the plug-in host to print, create a CGImage of the returned bytes and draw
235         the image into the passed in context.
236         
237         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
238         (-[WebHostedNetscapePluginView drawRect:]):
239         When printing, call NetscapePluginInstanceProxy::print.
240         
241         * Plugins/Hosted/WebKitPluginHost.defs:
242
243 2009-02-19  Alexey Proskuryakov  <ap@webkit.org>
244
245         Reviewed by Darin Adler.
246
247         https://bugs.webkit.org/show_bug.cgi?id=24024
248         REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
249         archiving a submission to about:blank
250
251         I don't know how to make an automated test for this bug.
252
253         * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
254         Account for the fact that HTTP method may be non-empty for non-HTTP requests.
255
256 2009-02-25  Chris Fleizach  <cfleizach@apple.com>
257
258         Reviewed by Beth Dakin.
259
260         Naming change from
261         Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
262         https://bugs.webkit.org/show_bug.cgi?id=24143
263
264         * WebView/WebFrame.mm:
265         (-[WebFrame _accessibilityTree]):
266
267 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
268
269         Build fix with ACCELERATED_COMPOSITING turned on.
270         
271         I missed a spot in my last commit in renaming to
272         _stoppedAcceleratedCompositingForFrame:
273         
274         * WebView/WebHTMLView.mm:
275         (-[WebHTMLView close]):
276
277 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
278
279         Reviewed by Dan Bernstein
280
281         https://bugs.webkit.org/show_bug.cgi?id=23854
282
283         Make an observable property, _isUsingAcceleratedCompositing, on
284         WebView that DumpRenderTree can use to specialize behavior.
285         
286         This is implemented via a count of Frames that are using
287         accelerated compositing.
288
289         * WebView/WebHTMLView.mm:
290         (-[WebHTMLViewPrivate clear]):
291         (-[WebHTMLView close]):
292         (-[WebHTMLView attachRootLayer:]):
293         (-[WebHTMLView detachRootLayer]):
294         * WebView/WebView.mm:
295         (+[WebView automaticallyNotifiesObserversForKey:]):
296         (-[WebView _startedAcceleratedCompositingForFrame:]):
297         (-[WebView _stoppedAcceleratedCompositingForFrame:]):
298         (-[WebView _isUsingAcceleratedCompositing]):
299         * WebView/WebViewInternal.h:
300         * WebView/WebViewPrivate.h:
301
302 2009-02-24  Sam Weinig  <sam@webkit.org>
303
304         Reviewed by Geoffrey Garen.
305
306         Related to <rdar://problem/6590295>
307         Allow disabling javascript: urls.
308
309         * WebView/WebView.mm:
310         (-[WebView _setJavaScriptURLsAreAllowed:]):
311         * WebView/WebViewPrivate.h:
312
313 2009-02-24  Mark Rowe  <mrowe@apple.com>
314
315         Reviewed by Oliver Hunt.
316
317         <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
318
319         * Carbon/CarbonUtils.h:
320         * Carbon/HIWebView.h:
321         * Plugins/WebPlugin.h:
322         * Plugins/WebPluginViewFactory.h:
323         * WebView/WebUIDelegate.h:
324
325 2009-02-24  Peter Ammon  <pammon@apple.com>
326
327         Reviewed by Mark Rowe.
328
329         Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
330
331         * WebView/WebHTMLView.mm:
332         (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
333         both the send and return type.  We should also handle a nil send or return type by ignoring
334         the argument and returning whether we can handle the other type passed in.
335
336 2009-02-23  Anders Carlsson  <andersca@apple.com>
337
338         Reviewed by Geoffrey Garen and Darin Adler.
339
340         WebKit side of <rdar://problem/6613151>.
341         
342         Make sure to vm_deallocate all memory we get from MIG callbacks.
343         
344         * Plugins/Hosted/NetscapePluginHostProxy.mm:
345         (DataDeallocator::DataDeallocator):
346         (DataDeallocator::~DataDeallocator):
347         Add a simple deallocator class.
348         
349         (WKPCStatusText):
350         (WKPCLoadURL):
351         (WKPCBooleanAndDataReply):
352         (WKPCEvaluate):
353         (WKPCGetStringIdentifier):
354         (WKPCInvoke):
355         (WKPCInvokeDefault):
356         (WKPCConstruct):
357         (WKPCSetProperty):
358         Use the new deallocator class.
359
360 2009-02-23  Anders Carlsson  <andersca@apple.com>
361
362         Reviewed by Darin Adler.
363
364         Fix <rdar://problem/6450656>.
365         
366         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
367         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
368         (WebKit::NetscapePluginInstanceProxy::insertText):
369         Add insert text which just calls the new WKPH function.
370         
371         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
372         (-[WebHostedNetscapePluginView inputContext]):
373         Get the input context from the shared input panel.
374         
375         (-[WebHostedNetscapePluginView keyDown:]):
376         Let the shared input panel have a go at the event first.
377         
378         * Plugins/Hosted/WebKitPluginHost.defs:
379         Add new InsertText function.
380
381 2009-02-23  Mark Rowe  <mrowe@apple.com>
382
383         Fix the build after r41126.
384
385         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
386         (WebKit::NetscapePluginInstanceProxy::invoke):
387         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
388         (WebKit::NetscapePluginInstanceProxy::construct):
389
390 2009-02-22  Dan Bernstein  <mitz@apple.com>
391
392         Reviewed by Darin Adler.
393
394         - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
395
396         * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
397         in r30741, and assign the height value, rather than the width, to the
398         "height" parameter.
399
400 2009-02-21  Anders Carlsson  <andersca@apple.com>
401
402         Fix build.
403         
404         * Plugins/Hosted/WebTextInputWindowController.m:
405
406 2009-02-20  Anders Carlsson  <andersca@apple.com>
407
408         Reviewed by Dan Bernstein.
409
410         Add a shared floating text input window implementation, to be used by the hosted plug-in view.
411         
412         * Plugins/Hosted/WebTextInputWindowController.h: Added.
413         * Plugins/Hosted/WebTextInputWindowController.m: Added.
414
415 2009-02-20  Kevin Decker  <kdecker@apple.com>
416
417         Reviewed by andersca.
418     
419         <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
420          
421          Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
422          we are trying to set. Depending on what other I/O is going on, it can take some time. 
423
424         * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
425         (setMetaData): Added. Calls WKSetMetadataURL().
426         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread 
427  
428 2009-02-19  Dan Bernstein  <mitz@apple.com>
429
430         Reviewed by Sam Weinig.
431
432         - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
433           Do not send loader callbacks during CSS styling
434
435         * WebView/WebView.mm:
436         (-[WebView _preferencesChangedNotification:]): Reverted the
437         iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
438
439 2009-02-18  Dan Bernstein  <mitz@apple.com>
440
441         Reviewed by Brady Eidson.
442
443         - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
444
445         * WebView/WebView.mm:
446         (-[WebView _preferencesChangedNotification:]): Activate the WebCore
447         workaround for this crash in iChat.
448
449 2009-02-18  Anders Carlsson  <andersca@apple.com>
450
451         Reviewed by Sam Weinig.
452
453         Fix for <rdar://problem/6542390>
454         
455         There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
456         would cause a load to begin.
457         
458         * Plugins/WebNetscapePluginView.mm:
459         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
460
461 2009-02-18  Adam Roben  <aroben@apple.com>
462
463         Add SPI to get WebKit's custom pointing-hand cursor
464
465         Reviewed by John Sullivan.
466
467         * WebView/WebView.mm:
468         (+[WebView _pointingHandCursor]): Added. Returns the custom
469         pointing-hand cursor that WebKit uses.
470         * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
471
472 2009-02-17  Eric Carlson  <eric.carlson@apple.com>
473
474         Reviewed by Antti Koivisto.
475
476         https://bugs.webkit.org/show_bug.cgi?id=23917
477         Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
478         element.
479
480         * Plugins/WebPluginContainerPrivate.h:
481         * Plugins/WebPluginController.mm:
482         (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
483         (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
484         (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
485
486         * WebCoreSupport/WebFrameLoaderClient.mm:
487         (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
488         file extension, only want a match for the new MIME type proxy plug-ins should have.
489
490 2009-02-13  Anders Carlsson  <andersca@apple.com>
491
492         Reviewed by Kevin Decker.
493
494         <rdar://problem/6584834> ESPN radio live stream link hangs Safari 
495
496         When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
497         defer destruction until we're done executing the script.
498         
499         * Plugins/Hosted/NetscapePluginHostProxy.mm:
500         (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
501         (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
502         Add a simple RAII object for deferring destruction of the plug-in instance.
503         
504         (WKPCEvaluate):
505         (WKPCInvoke):
506         (WKPCInvokeDefault):
507         (WKPCConstruct):
508         (WKPCGetProperty):
509         (WKPCSetProperty):
510         (WKPCRemoveProperty):
511         (WKPCHasProperty):
512         (WKPCHasMethod):
513         Use the PluginDestroyDeferrer.
514         
515         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
516         (WebKit::NetscapePluginInstanceProxy::pluginID):
517         Assert that the plug-in ID is not 0 here.
518         
519         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
520         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
521         Initialize the call depth.
522         
523         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
524         Set the plug-in ID to 0 to aid debugging.
525         
526         (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
527         Increment the call depth.
528         
529         (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
530         Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
531         
532         (WebKit::NetscapePluginInstanceProxy::shouldStop):
533         If we're called this with a non-zero call depth, set shouldStopSoon to true.
534         
535         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
536         (-[WebHostedNetscapePluginView shouldStop]):
537         Call the proxy.
538
539 2009-02-12  Brady Eidson  <beidson@apple.com>
540
541         Reviewed by Kevin Decker
542
543         <rdar://problem/6582180> - Wrong HTTP method applied to history item.
544
545         * WebCoreSupport/WebFrameLoaderClient.mm:
546         (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
547           redirected request.
548
549 2009-02-12  Anders Carlsson  <andersca@apple.com>
550
551         Reviewed by Kevin Decker.
552
553         <rdar://problem/6579412> 
554         REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
555         
556         * Plugins/WebNetscapePluginView.h:
557         * Plugins/WebNetscapePluginView.mm:
558         (-[WebNetscapePluginView userAgent]):
559         Apply workaround for Silverlight workaround.
560         
561         (-[WebNetscapePluginView _createPlugin]):
562         Check if the plug-in that we're creating is the silverlight plug-in.
563
564 2009-02-12  Brady Eidson  <beidson@apple.com>
565
566         Reviewed by Darin Adler
567
568         Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
569
570         * History/WebBackForwardList.mm:
571         (-[WebBackForwardList dealloc]): Null check before deref()'ing.
572         (-[WebBackForwardList finalize]): Ditto.
573
574         * Misc/WebIconFetcher.mm:
575         (-[WebIconFetcher dealloc]): Null check before deref()'ing.
576         (-[WebIconFetcher finalize]): Ditto.
577
578         * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
579         (-[WebEditCommand initWithEditCommand:]):
580         (-[WebEditCommand dealloc]):
581         (-[WebEditCommand finalize]):
582         (-[WebEditCommand command]):
583
584         * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
585         (-[WebArchivePrivate init]):
586         (-[WebArchivePrivate initWithCoreArchive:]):
587         (-[WebArchivePrivate coreArchive]):
588         (-[WebArchivePrivate setCoreArchive:]):
589         (-[WebArchivePrivate dealloc]):
590         (-[WebArchivePrivate finalize]):
591
592         * WebView/WebDataSource.mm: 
593         (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
594         (-[WebDataSourcePrivate finalize]): Ditto.
595
596 2009-02-12  Brady Eidson  <beidson@apple.com>
597
598         Reviewed by Kevin Decker
599
600         <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
601
602         NSHTMLReader tries to create a WebArchive from a random chunk of data.  Previously, WebArchive creation would
603         fail and return nil and NSHTMLReader would try something else.  When we changed the behavior to return an invalid
604         WebArchive object, things started getting weird.
605
606         * WebView/WebArchive.mm:
607         (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
608         (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
609         (-[WebArchivePrivate finalize]): Ditto
610         (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
611
612 2009-02-11  Mark Rowe  <mrowe@apple.com>
613
614         Fix the build.
615
616         * History/WebHistory.mm:
617         (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
618
619 2009-02-11  Brady Eidson  <beidson@apple.com>
620
621         Reviewed by Mark Rowe
622
623         <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
624
625         Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed 
626         and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
627         which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
628
629         * History/WebHistory.mm:
630         (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
631         (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
632           if an entry for the URL already exists.  Use that mode when reading the History.plist so only the most
633           recent entry for a given URL will be used.
634         (-[WebHistoryPrivate addItems:]):
635         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): 
636
637 2009-02-11  Dimitri Dupuis-latour  <dupuislatour@apple.com>
638
639         Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
640         This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
641
642         Reviewed by Timothy Hatcher.
643
644         * WebCoreSupport/WebInspectorClient.h:
645         * WebCoreSupport/WebInspectorClient.mm:
646         (WebInspectorClient::hiddenPanels):
647
648 2009-02-11  Alexey Proskuryakov  <ap@webkit.org>
649
650         Reviewed by Darin Adler.
651
652         <rdar://problem/6562920> Pasted text should be normalized to NFC
653
654         * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
655         -[NSString precomposedStringWithCanonicalMapping].
656
657         * WebCoreSupport/WebPasteboardHelper.mm:
658         (WebPasteboardHelper::plainTextFromPasteboard): Ditto. 
659
660         * WebView/WebHTMLView.mm:
661         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
662         Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
663         precomposed already, and the conversion is performed outside WebKit for those anyway.
664
665 2009-02-10  John Sullivan  <sullivan@apple.com>
666
667         Reviewed by Dan Bernstein
668         
669         <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
670         Negative visit counts stored in History.plist aren't corrected.
671         
672         It's not clear how a huge negative visit count ended up in History.plist, but we can't
673         trust data read from disk so we can at least reset this to something sane. WebCore has
674         no guard against a visit count overflowing an int, but that seems very unlikely to have
675         caused this.
676
677         * History/WebHistoryItem.mm:
678         (-[WebHistoryItem initFromDictionaryRepresentation:]):
679         If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
680         weekly visit count is in the dictionary, replace it with 0. 
681
682 2009-02-10  John Sullivan  <sullivan@apple.com>
683
684         Reviewed by Dan Bernstein
685         
686         <https://bugs.webkit.org/show_bug.cgi?id=23891>
687         [WebHistoryItem _setVisitCount:] is unused and should be removed
688
689         * History/WebHistoryItem.mm:
690         (-[WebHistoryItem _setVisitCount:]):
691         removed this unused method, which is a synonym for setVisitCount: that was introduced
692         recently and abandoned even more recently
693
694         * History/WebHistoryItemInternal.h:
695         removed declaration of _setVisitCount:
696
697 2009-02-10  Anders Carlsson  <andersca@apple.com>
698
699         Reviewed by Mark Rowe.
700
701         <rdar://problem/6573916> 
702         CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
703         
704         * Plugins/Hosted/NetscapePluginHostManager.mm:
705         (WebKit::NetscapePluginHostManager::instantiatePlugin):
706         If we failed to instantiate the plug-in, invalidate the instance proxy.
707         
708         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
709         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
710         (WebKit::NetscapePluginInstanceProxy::invalidate):
711         Remove the instance from the plug-in host's set.
712         
713         (WebKit::NetscapePluginInstanceProxy::destroy):
714         Call invalidate().
715
716 2009-02-09  Mark Rowe  <mrowe@apple.com>
717
718         Reviewed by Dan Bernstein.
719
720         Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
721         Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
722
723         * WebView/WebHTMLView.mm:
724         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
725         yet been initialized if this WebHTMLView was loaded from a nib.
726         (-[WebHTMLView _removeSuperviewObservers]): Ditto.
727
728 2009-02-09  Eric Seidel  <eric@webkit.org>
729
730         Reviewed by Dave Hyatt.
731
732         Rename Selection to VisibleSelection to allow us to separate
733         the selections the user works with from the ones used by
734         the JS editing APIs.
735         https://bugs.webkit.org/show_bug.cgi?id=23852
736
737         * WebView/WebFrame.mm:
738         (-[WebFrame _selectNSRange:]):
739         * WebView/WebView.mm:
740         (-[WebView textIteratorForRect:]):
741
742 2009-02-06  Anders Carlsson  <andersca@apple.com>
743
744         Reviewed by Kevin Decker.
745         
746         Fix crash when plug-in host dies.
747         
748         * Plugins/Hosted/HostedNetscapePluginStream.mm:
749         (WebKit::HostedNetscapePluginStream::didFail):
750
751 2009-02-05  Eric Seidel  <eric@webkit.org>
752
753         Reviewed by Justin Garcia.
754
755         DOMSelection.getRangeAt() returns a different range than the selection
756         https://bugs.webkit.org/show_bug.cgi?id=23601
757
758         Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
759
760         * WebView/WebFrame.mm:
761         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
762         (-[WebFrame _markDOMRange]):
763         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
764         (-[WebFrame _selectedNSRange]):
765         * WebView/WebHTMLView.mm:
766         (-[WebHTMLView _selectedRange]):
767         (-[WebTextCompleteController doCompletion]):
768         (-[WebHTMLView selectedAttributedString]):
769         * WebView/WebView.mm:
770         (-[WebView textIteratorForRect:]):
771         (-[WebView selectedDOMRange]):
772
773 2009-02-06  Geoffrey Garen  <ggaren@apple.com>
774
775         Reviewed by Sam Weinig.
776
777         Part III of <rdar://problem/6552272>.
778         
779         Refactored to use the redirect data WebCore makes available, instead of
780         tracking loading state in WebKit.
781         
782         * History/WebHistory.mm:
783         (-[WebHistoryPrivate dealloc]):
784         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
785         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
786         * History/WebHistoryInternal.h:
787         * WebCoreSupport/WebFrameLoaderClient.h:
788         * WebCoreSupport/WebFrameLoaderClient.mm:
789         (WebFrameLoaderClient::updateGlobalHistory):
790         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
791
792 2009-02-06  Anders Carlsson  <andersca@apple.com>
793
794         Reviewed by Sam Weinig.
795
796         <rdar://problem/6562220> 
797         CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
798         
799         Make the handling of crashes in the plug-in host more robust.
800         
801         * Plugins/Hosted/NetscapePluginHostProxy.h:
802         Add m_portSet.
803         
804         * Plugins/Hosted/NetscapePluginHostProxy.mm:
805         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
806         Initialize m_portSet.
807         
808         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
809         Free m_portSet.
810         
811         (WebKit::NetscapePluginHostProxy::processRequests):
812         Listen for messages on the port set. If we get a message to the port death notification port,
813         then call pluginHostDied. Otherwise, process the message.
814         
815         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
816         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
817         (WebKit::NetscapePluginInstanceProxy::cleanup):
818         Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
819         
820         (WebKit::NetscapePluginInstanceProxy::destroy):
821         Call cleanup().
822         
823         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
824         Call cleanup().
825         
826         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
827         Call NetscapePluginHostProxy::processRequests.
828         
829         * Plugins/Hosted/ProxyInstance.mm:
830         (WebKit::ProxyInstance::invalidate):
831         Add a null check for the host proxy.
832
833 2009-02-06  Dan Bernstein  <mitz@apple.com>
834
835         - try to fix the Tiger build
836
837         * Misc/WebNSArrayExtras.h:
838
839 2009-02-06  Anders Carlsson  <andersca@apple.com>
840
841         Reviewed by Dan Bernstein.
842
843         <rdar://problem/6563650> 
844         Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
845                 
846         * Plugins/WebNetscapePluginView.mm:
847         (-[WebNetscapePluginView loadStream]):
848         (-[WebNetscapePluginView pluginView:receivedData:]):
849         (-[WebNetscapePluginView _shouldCancelSrcStream]):
850
851 2009-02-05  Maciej Stachowiak  <mjs@apple.com> and Brady Eidson  <beidson@apple.com>
852
853         Reviewed by Dan Bernstein and Geoff Garen.
854
855         - WebKit code to track per-day and per-week visit counts in history
856
857         For now this data is only exposed via SPI for performance reasons.
858         
859         * History/WebHistoryItem.mm:
860         (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
861         for new data.
862         (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
863         (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
864         (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
865         (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
866         * History/WebHistoryItemInternal.h: Declare new methods.
867         * History/WebHistoryItemPrivate.h: Ditto.
868
869         * History/WebHistory.mm:
870         (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
871         the new _recordInitialVisit method instead of setting visit count to 1.
872
873         * Misc/WebNSArrayExtras.h:
874         * Misc/WebNSArrayExtras.m:
875         (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
876         (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
877         
878 2009-02-05  Aaron Boodman  <aa@chromium.org>
879
880         Reviewed by Dave Hyatt.
881
882         https://bugs.webkit.org/show_bug.cgi?id=23708
883         Adds documentElementAvailable() callback to FrameLoaderClient.
884
885         * WebCoreSupport/WebFrameLoaderClient.h:
886         Stub out documentElementAvailable().
887         * WebCoreSupport/WebFrameLoaderClient.mm:
888         Ditto.
889
890 2009-02-05  Dan Bernstein  <mitz@apple.com>
891
892         - build fix
893
894         * WebView/WebScriptDebugger.mm:
895         (WebScriptDebugger::initGlobalCallFrame):
896
897 2009-02-05  Beth Dakin  <bdakin@apple.com>
898
899         Reviewed by John Sullivan and Brady Eidson.
900
901         Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a 
902         mail note message doesn't display it in Mail's preview pane
903
904         This was failing because revision 36962 removed a version of 
905         setVerticalScrollingMode that mail calls. This patch simply adds 
906         that method back.
907
908         * WebView/WebDynamicScrollBarsView.m:
909         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
910
911 2009-02-04  Anders Carlsson  <andersca@apple.com>
912
913         Build fix fix.
914
915         * WebView/WebScriptDebugger.mm:
916         (WebScriptDebugger::initGlobalCallFrame):
917
918 2009-02-04  Anders Carlsson  <andersca@apple.com>
919
920         Reviewed by Sam Weinig.
921         
922         Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
923         
924         Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
925         
926         * Plugins/Hosted/NetscapePluginHostProxy.mm:
927         (WKPCEvaluate):
928         (WKPCInvoke):
929         (WKPCGetProperty):
930         (WKPCHasProperty):
931         (WKPCHasMethod):
932         * Plugins/Hosted/WebKitPluginClient.defs:
933         * Plugins/Hosted/WebKitPluginHost.defs:
934
935 2009-02-04  Anders Carlsson  <andersca@apple.com>
936
937         Reviewed by Mark Rowe.
938
939         Fix 64-bit build.
940         
941         * WebView/WebScriptDebugger.mm:
942         (WebScriptDebugger::initGlobalCallFrame):
943
944 2009-02-04  Geoffrey Garen  <ggaren@apple.com>
945
946         Reviewed by Mark Rowe.
947         
948         Part I of <rdar://problem/6552272>.
949
950         Clear the redirectURLs entry when first visiting a site, so sites that
951         only redirect you the first time you visit them can later learn that
952         they don't redirect.
953
954         * History/WebHistory.mm:
955         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
956
957 2009-02-04  Timothy Hatcher  <timothy@apple.com>
958
959         Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
960
961         <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
962
963         Reviewed by Oliver Hunt.
964
965         * WebView/WebScriptDebugDelegate.h:
966
967 2009-02-04  Timothy Hatcher  <timothy@apple.com>
968
969         Switched over from using the WebSafeForwarder for the Script Debug
970         delegate and added high performance CallScriptDebugDelegate functions.
971
972         <rdar://problem/6508457> Launching widget in Dashcode debugger is
973         super-slow due forwardInvocation: calling debug delegate
974
975         Reviewed by Oliver Hunt.
976
977         * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
978         * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
979         * WebView/WebScriptDebugger.mm:
980         (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
981         (WebScriptDebugger::sourceParsed): Ditto.
982         (WebScriptDebugger::callEvent): Ditto.
983         (WebScriptDebugger::atStatement): Ditto.
984         (WebScriptDebugger::returnEvent): Ditto.
985         (WebScriptDebugger::exception): Ditto.
986         * WebView/WebView.mm:
987         (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
988         (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
989         method implementations for the script debug delegate. Also caches what
990         didParseSource method to use.
991         (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
992         WebScriptDebugDelegateImplementations structure.
993         (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
994         (CallDelegate): Added more overloaded versions that take different arguments.
995         (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
996         * WebView/WebViewInternal.h:
997
998 2009-02-03  Simon Fraser  <simon.fraser@apple.com>
999
1000         Reviewed by Dave Hyatt
1001
1002         https://bugs.webkit.org/show_bug.cgi?id=23365
1003         
1004         Hook up accelerated compositing layers the native
1005         view system on Mac.
1006
1007         * WebCoreSupport/WebChromeClient.h:
1008         * WebCoreSupport/WebChromeClient.mm:
1009         (WebChromeClient::attachRootGraphicsLayer):
1010         (WebChromeClient::setNeedsOneShotDrawingSynchronization):
1011         New methods to hook up the root GraphicsLayer to the native
1012         view system, and to synchronize layer changes with view-based
1013         drawing when layers come and go.
1014
1015         * WebView/WebHTMLView.mm:
1016         (-[WebHTMLViewPrivate clear]):
1017         Clear the pointer to layerHostingView.
1018
1019         (-[WebHTMLView _setAsideSubviews]):
1020         (-[WebHTMLView willRemoveSubview:]):
1021         Keep the special layer-hosting view in the subviews even 
1022         when the rest of the subviews are ripped out for
1023         painting.
1024
1025         (-[WebHTMLView _isUsingAcceleratedCompositing]):
1026         New utility method for DumpRenderTree to know if we're
1027         hosting layers.
1028
1029         (-[WebHTMLView drawRect:]):
1030         Call -disableScreenUpdatesUntilFlush if we have to
1031         synchronize layer changes with painting.
1032
1033         (-[WebHTMLView attachRootLayer:]):
1034         (-[WebHTMLView detachRootLayer]):
1035         Attach and detach the root GraphicsLayer.
1036
1037         * WebView/WebViewInternal.h:
1038         * WebView/WebHTMLViewInternal.h:
1039         * WebView/WebHTMLViewPrivate.h:
1040         New method declarations.
1041         
1042         * WebView/WebView.mm:
1043         (-[WebView _needsOneShotDrawingSynchronization]):
1044         (-[WebView _setNeedsOneShotDrawingSynchronization:]):
1045         Set the flag to say if we need to synchronize layer
1046         changes and painting on the next -drawRect: call.
1047
1048         (-[WebView viewWillMoveToWindow:]):
1049         (-[WebView viewDidMoveToWindow]):
1050         Call new notifications that the view was added to or removed from
1051         the window, which are required by the layer hosting mechanism.
1052
1053 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
1054
1055         Build fix.
1056
1057         * Plugins/WebPluginController.mm:
1058         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
1059
1060 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
1061
1062         Reviewed by Sam Weinig.
1063
1064         Track redirects in global history.
1065
1066         * History/WebHistory.mm:
1067         (-[WebHistoryPrivate dealloc]):
1068         (-[WebHistoryPrivate lastVisitedEntry]):
1069         (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
1070         entry in case we're asked to add redirect information to it later.
1071
1072         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1073         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
1074         information in global history.
1075
1076         * History/WebHistoryInternal.h:
1077         * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
1078
1079         * WebCoreSupport/WebFrameLoaderClient.mm:
1080         (WebFrameLoaderClient::updateGlobalHistory):
1081         (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
1082         information in global history.
1083
1084         * WebView/WebFrame.mm:
1085         (-[WebFrame loadRequest:]):
1086         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1087         * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
1088
1089 2009-02-02  Anders Carlsson  <andersca@apple.com>
1090
1091         Reviewed by Dan Bernstein.
1092
1093         Work around a limitation in MIG where two functions can't have the same name even if they're
1094         not in the same subsystem.
1095         
1096         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1097         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1098         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1099         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1100         * Plugins/Hosted/WebKitPluginClient.defs:
1101         * Plugins/Hosted/WebKitPluginHost.defs:
1102
1103 2009-02-02  Anders Carlsson  <andersca@apple.com>
1104
1105         Reviewed by Sam Weinig.
1106
1107         Implement WKPCGetPluginElementObject.
1108         
1109         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1110         (WKPCGetPluginElementNPObject):
1111         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1112         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1113         (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
1114         * Plugins/Hosted/WebKitPluginClient.defs:
1115         * Plugins/WebBaseNetscapePluginView.h:
1116         * Plugins/WebBaseNetscapePluginView.mm:
1117         (-[WebBaseNetscapePluginView WebCore::]):
1118
1119 2009-02-02  Anders Carlsson  <andersca@apple.com>
1120
1121         Build fix.
1122         
1123         * WebView/WebHTMLView.mm:
1124
1125 2009-02-02  Anders Carlsson  <andersca@apple.com>
1126
1127         Reviewed by Dan Bernstein.
1128
1129         Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
1130         
1131         * Plugins/Hosted/WebHostedNetscapePluginView.h:
1132         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1133         (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1134         * Plugins/WebBaseNetscapePluginView.h:
1135         * Plugins/WebBaseNetscapePluginView.mm:
1136         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1137         (-[WebBaseNetscapePluginView _windowClipRect]):        
1138         (-[WebBaseNetscapePluginView visibleRect]):
1139         (-[WebBaseNetscapePluginView dataSource]):
1140         * Plugins/WebKitPluginContainerView.h: Removed.
1141         * Plugins/WebKitPluginContainerView.mm: Removed.
1142         * Plugins/WebNetscapePluginView.h:
1143         * Plugins/WebNetscapePluginView.mm:
1144         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1145         (-[WebNetscapePluginView getVariable:value:]):
1146         * WebCoreSupport/WebFrameLoaderClient.mm:
1147         (WebFrameLoaderClient::createPlugin):
1148
1149 2009-02-02  Anders Carlsson  <andersca@apple.com>
1150
1151         Reviewed by Dan Bernstein.
1152
1153         Update for changes to WebCore.
1154         
1155         * WebCoreSupport/WebFrameLoaderClient.h:
1156         * WebCoreSupport/WebFrameLoaderClient.mm:
1157         (WebFrameLoaderClient::createPlugin):
1158
1159 2009-02-02  Anders Carlsson  <andersca@apple.com>
1160
1161         Reviewed by Oliver Hunt.
1162
1163         When a new Web View was not created, report back to the plug-in host.
1164         
1165         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1166         (WebKit::NetscapePluginInstanceProxy::performRequest):
1167         * Plugins/Hosted/WebKitPluginHost.defs:
1168
1169 2009-02-02  Anders Carlsson  <andersca@apple.com>
1170
1171         Reviewed by Kevin Decker.
1172
1173         Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
1174         
1175         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1176         (-[WebHostedNetscapePluginView drawRect:]):
1177
1178 2009-02-02  Holger Hans Peter Freyther  <zecke@selfish.org>
1179
1180         Reviewed by Darin Adler.
1181
1182         Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
1183
1184         https://bugs.webkit.org/show_bug.cgi?id=23428
1185
1186         FrameView::forceLayout could be killed but the comment might
1187         contain a value over the the plain FrameView::layout...
1188
1189         Adjust the WebCore/WebKit consumers of these methods.
1190
1191         * WebView/WebFrame.mm:
1192         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1193         * WebView/WebHTMLView.mm:
1194         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1195         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
1196
1197 2009-01-31  John Sullivan  <sullivan@apple.com>
1198
1199         https://bugs.webkit.org/show_bug.cgi?id=23665
1200
1201         Cleaned up code to add/remove NSNotification observers, to avoid performance hit
1202         of calling removeObserver with unspecified notifications, or calling removeObserver
1203         multiple times for the same notification.
1204
1205         Reviewed by Darin Adler
1206
1207         * WebView/WebHTMLView.mm:
1208         added observingMouseMovedNotifications, observingSuperviewNotifications, and 
1209         observingWindowNotifications as BOOL ivars of _private object
1210         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
1211         moved to file-internal section of file, added leading underscore, now bails out
1212         if we aren't observing the relevant notifications, now records that we are no longer
1213         observing the relevant notifications
1214         (-[WebHTMLView _removeSuperviewObservers]):
1215         ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
1216         (-[WebHTMLView _removeWindowObservers]):
1217         ditto
1218         (-[WebHTMLView close]):
1219         replace general removeObserver: call with three specific calls for all the notifications
1220         that this class actually observes
1221         (-[WebHTMLView addMouseMovedObserver]):
1222         bail out if already observing relevant notifications, now records that we are observing
1223         the relevant notifications
1224         (-[WebHTMLView removeMouseMovedObserver]):
1225         updated for name change
1226         (-[WebHTMLView addSuperviewObservers]):
1227         bail out if already observing relevant notifications, now records that we are observing
1228         the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var 
1229         to avoid objc dispatch
1230         (-[WebHTMLView addWindowObservers]):
1231         ditto
1232         (-[WebHTMLView viewWillMoveToSuperview:]):
1233         updated for name change
1234         (-[WebHTMLView viewWillMoveToWindow:]):
1235         updated for name changes
1236
1237 2009-01-31  Darin Adler  <darin@apple.com>
1238
1239         Reviewed by Mark Rowe.
1240
1241         Fix code that assumes all command selectors end in colons.
1242         rdar://problem/6545874
1243
1244         * WebView/WebHTMLView.mm:
1245         (commandNameForSelector): Don't assert, just return a null string, when
1246         the selector doesn't end in a colon.
1247
1248 2009-01-30  Adam Barth  <abarth@webkit.org>
1249
1250         Reviewed by Sam Weinig.
1251
1252         Add a pref to disable web security.
1253
1254         * WebView/WebPreferenceKeysPrivate.h:
1255         * WebView/WebPreferencesPrivate.h:
1256         * WebView/WebPreferences.mm:
1257         (+[WebPreferences initialize]):
1258         (-[WebPreferences isWebSecurityEnabled]):
1259         (-[WebPreferences setWebSecurityEnabled:]):
1260         * WebView/WebView.mm:
1261         (-[WebView _preferencesChangedNotification:]):
1262
1263 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
1264
1265         Reviewed by Darin Adler.
1266
1267         Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
1268
1269         Carry out the move and catch up in two call sites.
1270
1271         * WebView/WebHTMLView.mm:
1272         (-[WebHTMLView _frameOrBoundsChanged]):
1273
1274 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
1275
1276         Reviewed by Darin Adler.
1277
1278         isFrameSet was moved from Frame to Document. Update the
1279         WebKit usage.
1280
1281         * WebView/WebFrame.mm:
1282         (-[WebFrame _isFrameSet]):
1283         * WebView/WebHTMLView.mm:
1284         (-[WebHTMLView knowsPageRange:]):
1285
1286 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
1287
1288         Build fix.
1289
1290         * WebView/WebFramePrivate.h:
1291
1292 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
1293
1294         Reviewed by Sam Weinig.
1295
1296         Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
1297         preparation for setting them differently during a redirect.
1298
1299         * WebView/WebPDFView.mm:
1300         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1301
1302 2009-01-30  Anders Carlsson  <andersca@apple.com>
1303
1304         Reviewed by Sam Weinig.
1305
1306         Fix <rdar://problem/6544048>
1307         
1308         Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
1309         
1310         When the plug-in instance is destroyed, invalidate all proxy instances.
1311         
1312         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1313         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1314         (WebKit::NetscapePluginInstanceProxy::destroy):
1315         (WebKit::NetscapePluginInstanceProxy::addInstance):
1316         (WebKit::NetscapePluginInstanceProxy::removeInstance):
1317         * Plugins/Hosted/ProxyInstance.h:
1318         * Plugins/Hosted/ProxyInstance.mm:
1319         (WebKit::ProxyInstance::ProxyInstance):
1320         (WebKit::ProxyInstance::~ProxyInstance):
1321         (WebKit::ProxyInstance::invalidate):
1322
1323 2009-01-30  Anders Carlsson  <andersca@apple.com>
1324
1325         Reviewed by Sam Weinig.
1326
1327         Fix <rdar://problem/6490778>.
1328         
1329         Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
1330         validate IdentifierReps before dereferencing them.
1331         
1332         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1333         (WKPCEvaluate):
1334         (WKPCGetStringIdentifier):
1335         (WKPCGetIntIdentifier):
1336         (identifierFromIdentifierRep):
1337         (WKPCInvoke):
1338         (WKPCGetProperty):
1339         (WKPCSetProperty):
1340         (WKPCRemoveProperty):
1341         (WKPCHasProperty):
1342         (WKPCHasMethod):
1343         (WKPCIdentifierInfo):
1344
1345 2009-01-30  Brady Eidson  <beidson@apple.com>
1346
1347         Reviewed by Sam Weinig
1348
1349         Remove FrameLoaderClient code that is now handled by FrameLoader itself
1350
1351         * WebCoreSupport/WebFrameLoaderClient.mm:
1352         (WebFrameLoaderClient::frameLoadCompleted):
1353
1354 2009-01-29  Stephanie Lewis <slewis@apple.com>
1355
1356         RS by Oliver Hunt.
1357
1358         Update the order files.
1359
1360         * WebKit.order:
1361
1362 2009-01-29  Sam Weinig  <sam@webkit.org>
1363
1364         Reviewed by Anders Carlsson.
1365
1366         Second step in tracking the urls a HistoryItem was redirected through
1367         Add SPI to access the array of redirect urls associated with a HistoryItem.
1368
1369         * History/WebHistoryItem.mm:
1370         (-[WebHistoryItem dictionaryRepresentation]):
1371         (-[WebHistoryItem _redirectURLs]):
1372         * History/WebHistoryItemPrivate.h:
1373
1374 2009-01-29  Anders Carlsson  <andersca@apple.com>
1375
1376         Reviewed by Dan Bernstein.
1377
1378         Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
1379         
1380         * Plugins/Hosted/NetscapePluginHostProxy.h:
1381         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1382         (WebKit::NetscapePluginHostProxy::pluginHostDied):
1383         Call endModal here.
1384         
1385         (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
1386         If we're modal, we should always bring the plug-in host process to the front.
1387         
1388         (WebKit::NetscapePluginHostProxy::beginModal):
1389         Add an observer for the NSApplicationWillBecomeActiveNotification callback.
1390         
1391         (WebKit::NetscapePluginHostProxy::endModal):
1392         Remove the observer.
1393
1394 2009-01-29  Sam Weinig  <sam@webkit.org>
1395
1396         Reviewed by Mark Rowe.
1397
1398         First step in tracking the urls a HistoryItem was redirected through.
1399
1400         * History/WebHistoryItem.mm:
1401         (-[WebHistoryItem initFromDictionaryRepresentation:]):
1402         (-[WebHistoryItem dictionaryRepresentation]):
1403         * Misc/WebNSDictionaryExtras.h:
1404         * Misc/WebNSDictionaryExtras.m:
1405         (-[NSDictionary _webkit_arrayForKey:]): Add helper.
1406
1407 2009-01-29  Anders Carlsson  <andersca@apple.com>
1408
1409         Reviewed by Sam Weinig.
1410
1411         Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
1412         
1413         * Plugins/Hosted/NetscapePluginHostManager.h:
1414         * Plugins/Hosted/NetscapePluginHostManager.mm:
1415         (WebKit::NetscapePluginHostManager::hostForPackage):
1416         Get the current PSN and pass it to spawnPluginHost.
1417         
1418         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1419         Pass the PSN to the "check in" function.
1420         
1421         * Plugins/Hosted/NetscapePluginHostProxy.h:
1422         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1423         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1424         
1425         (WebKit::NetscapePluginHostProxy::pluginHostDied):
1426         Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
1427         
1428         (WebKit::NetscapePluginHostProxy::beginModal):
1429         (WebKit::NetscapePluginHostProxy::endModal):
1430         (WebKit::NetscapePluginHostProxy::setModal):
1431         Split out the code that does all of the work into beginModal and endModal methods.
1432         
1433         * Plugins/Hosted/WebKitPluginHost.defs:
1434         * Plugins/WebNetscapePluginView.mm:
1435         (-[WebNetscapePluginView loadStream]):
1436
1437 2009-01-29  David Kilzer  <ddkilzer@apple.com>
1438
1439         Remove semi-colons from the end of ObjC method implementations
1440
1441         Rubber-stamped by Adam Roben.
1442
1443         $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
1444
1445         * DefaultDelegates/WebDefaultUIDelegate.m:
1446         (-[WebDefaultUIDelegate webView:setResizable:]):
1447         (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
1448         (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
1449         (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
1450         * History/WebBackForwardList.mm:
1451         (-[WebBackForwardList addItem:]):
1452         (-[WebBackForwardList backListWithLimit:]):
1453         (-[WebBackForwardList forwardListWithLimit:]):
1454         * History/WebHistoryItem.mm:
1455         (-[WebHistoryItem alternateTitle]):
1456         (-[WebHistoryItem setViewState:]):
1457         * Misc/WebCoreStatistics.mm:
1458         (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
1459         * Misc/WebKitNSStringExtras.m:
1460         (-[NSString _web_drawAtPoint:font:textColor:]):
1461         * Plugins/WebNetscapePluginView.mm:
1462         (-[WebNetscapePluginView setAttributeKeys:andValues:]):
1463         * WebCoreSupport/WebEditorClient.mm:
1464         (-[WebEditCommand command]):
1465         * WebView/WebFrame.mm:
1466         (-[WebFrame _getVisibleRect:]):
1467         * WebView/WebHTMLRepresentation.mm:
1468         (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
1469         * WebView/WebHTMLView.mm:
1470         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
1471         * WebView/WebPreferences.mm:
1472         (-[WebPreferences setAllowsAnimatedImages:]):
1473         (-[WebPreferences setAutosaves:]):
1474         (-[WebPreferences PDFDisplayMode]):
1475         * WebView/WebView.mm:
1476         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1477         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1478         (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
1479         (+[WebView _registerViewClass:representationClass:forURLScheme:]):
1480         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
1481         (-[WebView _insertNewlineInQuotedContent]):
1482
1483 2009-01-28  Geoffrey Garen  <ggaren@apple.com>
1484
1485         Reviewed by Sam Weinig.
1486
1487         Updated for WebCore rename.
1488         
1489         * WebView/WebView.mm:
1490         (-[WebView setCustomTextEncodingName:]):
1491
1492 2009-01-28  David Kilzer  <ddkilzer@apple.com>
1493
1494         Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
1495
1496         Reviewed by Dan Bernstein.
1497
1498         * Misc/WebNSURLExtras.h:
1499         (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
1500         declaration after the implementation was added in r9258.
1501
1502 2009-01-28  Sam Weinig  <sam@webkit.org>
1503
1504         Reviewed by Geoff Garen.
1505
1506         Fix for <rdar://problem/6129678>
1507         REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
1508
1509         * WebView/WebScriptDebugDelegate.mm:
1510         (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
1511
1512 2009-01-27  Anders Carlsson  <andersca@apple.com>
1513
1514         Reviewed by Oliver Hunt.
1515
1516         Fix two bugs with Core Animation based plug-ins.
1517         
1518         1. The plug-in view was marked as opaque even though it's not. 
1519            (This would leave garbage in the plug-in view).
1520         2. The plug-in layer needs to have autoresizing turned on.
1521         
1522         * Plugins/WebNetscapePluginView.mm:
1523         (-[WebNetscapePluginView setLayer:]):
1524
1525 2009-01-27  Brady Eidson  <beidson@apple.com>
1526
1527         Reviewed by Dan Bernstein
1528
1529         Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
1530
1531         * History/WebHistoryItem.mm:
1532
1533         * WebCoreSupport/WebFrameLoaderClient.h:
1534         * WebCoreSupport/WebFrameLoaderClient.mm:
1535         (WebFrameLoaderClient::savePlatformDataToCachedFrame):
1536         (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1537         * WebKit.order:
1538
1539 2009-01-26  Anders Carlsson  <andersca@apple.com>
1540
1541         Reviewed by Dan Bernstein.
1542
1543         Add the ability for plug-ins to make WebKit operate in "modal mode"
1544         
1545         * Plugins/Hosted/NetscapePluginHostProxy.h:
1546         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1547         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1548         (WebKit::NetscapePluginHostProxy::pluginHostDied):
1549         If the plug-in crashes while we're modal, make sure to leave the modal mode.
1550         
1551         (WebKit::NetscapePluginHostProxy::setModal):
1552         (WKPCSetModal):
1553         * Plugins/Hosted/WebKitPluginClient.defs:
1554
1555 2009-01-26  John Sullivan  <sullivan@apple.com>
1556
1557         fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets 
1558         stuck in the Name field rather than cycling around
1559
1560         Reviewed by Dan Bernstein
1561
1562         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
1563         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
1564         The two static text fields and the last button all had their "next key view" outlets set to the
1565         name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
1566         selectable view have exactly one "next key view" set to it.
1567
1568 2009-01-26  Anders Carlsson  <andersca@apple.com>
1569
1570         Reviewed by Sam Weinig.
1571
1572         Add the ability for a plug-in to show or hide the menu bar.
1573         
1574         * Plugins/Hosted/NetscapePluginHostProxy.h:
1575         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1576         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1577         (WebKit::NetscapePluginHostProxy::pluginHostDied):
1578         (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
1579         (WKPCSetMenuBarVisible):
1580         * Plugins/Hosted/WebKitPluginClient.defs:
1581
1582 2009-01-26  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1583
1584         Reviewed by Gavin Barraclough.
1585
1586         Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
1587         <https://bugs.webkit.org/show_bug.cgi?id=23552>
1588         <rdar://problem/6398839>
1589
1590         Dashcode will crash when using the evaluator because it saves a global call
1591         frame, even after global code has finished executing, and then uses this as
1592         a launching pad to execute new JS in the evaluator. The fix is to detect
1593         when Dashcode is attempting to do this and execute code from a global call
1594         frame instead.        
1595
1596         * ForwardingHeaders/runtime/Protect.h: Added.
1597         * WebView/WebScriptDebugDelegate.mm:
1598         (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
1599         Added debugger, a WebScriptDebugger* argument.
1600         (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
1601         a stale WebScriptCallFrame to execute new JS and evaluate it starting from
1602         the global object's global call frame instead.
1603         * WebView/WebScriptDebugger.h:
1604         (WebScriptDebugger::globalObject): Added.
1605         (WebScriptDebugger::globalCallFrame): Added.
1606         * WebView/WebScriptDebugger.mm:
1607         (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
1608         (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
1609         so that the global call frame can be saved immediately after being created.
1610         (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
1611         WebScriptCallFrame's _initWithGlobalObject method.
1612
1613 2009-01-26  Anders Carlsson  <andersca@apple.com>
1614
1615         Reviewed by Oliver Hunt.
1616
1617         Make WKPCInvoke a simpleroutine.
1618         
1619         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1620         (WKPCInvoke):
1621         * Plugins/Hosted/WebKitPluginClient.defs:
1622
1623 2009-01-26  Anders Carlsson  <andersca@apple.com>
1624
1625         Reviewed by Sam Weinig.
1626
1627         Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
1628         
1629         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1630         (WKPCBooleanAndDataReply):
1631         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1632         (WebKit::NetscapePluginInstanceProxy::Reply::):
1633         (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
1634         Rename NPObjectInvokeReply to BooleanAndDataReply.
1635         
1636         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1637         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1638         Fix a cut and paste error.
1639         
1640         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1641         Handle NPObjects.
1642         
1643         * Plugins/Hosted/ProxyInstance.h:
1644         * Plugins/Hosted/ProxyInstance.mm:
1645         (WebKit::ProxyField::valueFromInstance):
1646         (WebKit::ProxyField::setValueToInstance):
1647         Call the ProxyInstance method.
1648         
1649         (WebKit::ProxyInstance::~ProxyInstance):
1650         Release the NPObject.
1651         
1652         (WebKit::ProxyInstance::supportsConstruct):
1653         Ask the plug-in host if an instance supports construct.
1654         
1655         (WebKit::ProxyInstance::fieldValue):
1656         (WebKit::ProxyInstance::setFieldValue):
1657         Call the plug-in host methods.
1658         
1659         * Plugins/Hosted/WebKitPluginHostTypes.h:
1660         Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
1661
1662 2009-01-26  Mark Rowe  <mrowe@apple.com>
1663
1664         Fix the build.
1665
1666         Remove -Wformat=2 from the warning flags as newer versions of GCC emit
1667         warnings about non-literal format strings for uses of our UI_STRING macro.
1668
1669         * Configurations/Base.xcconfig:
1670
1671 2009-01-26  Mark Rowe  <mrowe@apple.com>
1672
1673         Rubber-stamped by Sam Weinig.
1674
1675         Clean up after r40240.
1676
1677         * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
1678         * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
1679         is back in the build.
1680
1681 2009-01-25  Darin Adler  <darin@apple.com>
1682
1683         * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
1684
1685 2009-01-25  Darin Adler  <darin@apple.com>
1686
1687         Discussed with Mark Rowe; not sure he reviewed it.
1688
1689         * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
1690         -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
1691
1692 2009-01-25  Mark Rowe  <mrowe@apple.com>
1693
1694         Rubber-stamped by Dan Bernstein.
1695
1696         Improve the consistency of settings in our .xcconfig files.
1697
1698         * Configurations/Base.xcconfig: Only dead code strip the normal variant.
1699         Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
1700
1701 2009-01-25  Darin Adler  <darin@apple.com>
1702
1703         Reviewed by Sam Weinig.
1704
1705         Bug 23522: use checked casts for render tree
1706         https://bugs.webkit.org/show_bug.cgi?id=23522
1707
1708         Step one: RenderText.
1709
1710         * WebView/WebRenderNode.mm:
1711         (copyRenderNode): Use toRenderText.
1712
1713 2009-01-23  Brady Eidson  <beidson@apple.com>
1714
1715         Rubberstamped by Darin Adler
1716
1717         Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
1718
1719         * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
1720         (WebCachedFramePlatformData::WebCachedFramePlatformData):
1721         * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
1722
1723         * WebCoreSupport/WebFrameLoaderClient.mm:
1724         (WebFrameLoaderClient::savePlatformDataToCachedPage):
1725         (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
1726
1727         * WebKit.order:
1728
1729 2009-01-23  Adele Peterson  <adele@apple.com>
1730
1731         Build fix.
1732
1733         Use new linesBoundingBox method instead of
1734         boundingBoxWidth and boundingBoxHeight for RenderText objects.
1735
1736         * WebView/WebRenderNode.mm: (copyRenderNode):
1737
1738 2009-01-23  Anders Carlsson  <andersca@apple.com>
1739
1740         Fix 64-bit build.
1741         
1742         * Plugins/Hosted/ProxyInstance.mm:
1743         (WebKit::proxyClass):
1744
1745 2009-01-23  Anders Carlsson  <andersca@apple.com>
1746
1747         Fix GCC 4.0 build.
1748         
1749         * Configurations/Base.xcconfig:
1750
1751 2009-01-23  Anders Carlsson  <andersca@apple.com>
1752
1753         Reviewed by Sam Weinig.
1754
1755         Turn on -Wmissing-prototypes and fix the resulting warnings.
1756
1757         * Configurations/Base.xcconfig:
1758         * History/WebHistory.mm:
1759         (timeIntervalForBeginningOfDay):
1760         * History/WebHistoryItem.mm:
1761         (historyItemWrappers):
1762         * Misc/WebNSPasteboardExtras.mm:
1763         (imageFromElement):
1764         * WebView/WebFrame.mm:
1765         * WebView/WebScriptDebugger.mm:
1766         (toNSString):
1767
1768 2009-01-22  Mark Rowe  <mrowe@apple.com>
1769
1770         Rubber-stamped by Anders Carlsson.
1771
1772         Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
1773
1774         Current versions of Xcode only respect it for C and Objective-C files,
1775         and our code doesn't currently compile if it is applied to C++ and
1776         Objective-C++ files.
1777
1778         * Configurations/Base.xcconfig:
1779
1780 2009-01-22  Anders Carlsson  <andersca@apple.com>
1781
1782         Reviewed by Sam Weinig.
1783
1784         Add support for Invoke and InvokeDefault. Clean up code.
1785         
1786         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1787         (WKPCBooleanReply):
1788         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1789         (WebKit::NetscapePluginInstanceProxy::Reply::):
1790         (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
1791         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1792         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1793         * Plugins/Hosted/ProxyInstance.h:
1794         * Plugins/Hosted/ProxyInstance.mm:
1795         (WebKit::ProxyInstance::invoke):
1796         (WebKit::ProxyInstance::invokeMethod):
1797         (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
1798         (WebKit::ProxyInstance::invokeDefaultMethod):
1799         (WebKit::ProxyInstance::methodsNamed):
1800         (WebKit::ProxyInstance::fieldNamed):
1801         * Plugins/Hosted/WebKitPluginClient.defs:
1802         * Plugins/Hosted/WebKitPluginHost.defs:
1803         * Plugins/Hosted/WebKitPluginHostTypes.h:
1804
1805 2009-01-22  Eric Roman  <eroman@chromium.og>
1806
1807         Reviewed by Eric Seidel.
1808
1809         https://bugs.webkit.org/show_bug.cgi?id=20806
1810         Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
1811
1812         * History/WebHistoryItem.mm:
1813         (-[WebHistoryItem RSSFeedReferrer]):
1814         (-[WebHistoryItem setRSSFeedReferrer:]):
1815
1816 2009-01-22  Anders Carlsson  <andersca@apple.com>
1817
1818         Reviewed by Kevin Decker.
1819
1820         Don't crash or hang when we fail to instantiate a plug-in.
1821         
1822         * Plugins/Hosted/NetscapePluginHostManager.mm:
1823         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1824         Return 0 on failure.
1825         
1826         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1827         (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1828         Null check for the proxy member.
1829
1830 2009-01-21  David Hyatt  <hyatt@apple.com>
1831
1832         Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
1833
1834         Reviewed by Eric Seidel and Darin Adler
1835
1836         * WebView/WebRenderNode.mm:
1837         (copyRenderNode):
1838
1839 2009-01-21  Anders Carlsson  <andersca@apple.com>
1840
1841         Reviewed by Sam Weinig.
1842
1843         More browser->plug-in scripting support.
1844         
1845         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1846         (WKPCNPObjectHasPropertyReply):
1847         (WKPCNPObjectHasMethodReply):
1848         (WKPCNPObjectInvokeReply):
1849         MIG reply functions.
1850         
1851         (WKPCIdentifierInfo):
1852         Return information about an identifier given its 64-bit value.
1853         
1854         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1855         Add new reply structs.
1856         
1857         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1858         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1859         Split out code that adds values to the arrays from marshalValue.
1860         
1861         (WebKit::NetscapePluginInstanceProxy::marshalValue):
1862         Call addValueToArray.
1863     
1864         (WebKit::NetscapePluginInstanceProxy::marshalValues):
1865         Marshal a list of values.
1866         
1867         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1868         Actually create a proxy instance.
1869         
1870         * Plugins/Hosted/ProxyInstance.h:
1871         * Plugins/Hosted/ProxyInstance.mm:
1872         (WebKit::ProxyClass::methodsNamed):
1873         (WebKit::ProxyClass::fieldNamed):
1874         Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
1875         
1876         (WebKit::proxyClass):
1877         Shared proxyClass getter.
1878         
1879         (WebKit::ProxyField::ProxyField):
1880         (WebKit::ProxyField::valueFromInstance):
1881         (WebKit::ProxyField::setValueToInstance):
1882         Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
1883         
1884         (WebKit::ProxyMethod::ProxyMethod):
1885         (WebKit::ProxyMethod::serverIdentifier):
1886         (WebKit::ProxyMethod::numParameters):
1887         Add a dummy ProxyMethod class.
1888         
1889         (WebKit::ProxyInstance::invokeMethod):
1890         Call _WKPHNPObjectInvoke.
1891         
1892         (WebKit::ProxyInstance::defaultValue):
1893         (WebKit::ProxyInstance::stringValue):
1894         (WebKit::ProxyInstance::numberValue):
1895         (WebKit::ProxyInstance::booleanValue):
1896         (WebKit::ProxyInstance::valueOf):
1897         Add dummy implementations (taken from CInstance).
1898         
1899         (WebKit::ProxyInstance::methodsNamed):
1900         Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
1901         
1902         (WebKit::ProxyInstance::fieldNamed):
1903         Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
1904         
1905         * Plugins/Hosted/WebKitPluginClient.defs:
1906         * Plugins/Hosted/WebKitPluginHost.defs:
1907         Add new MIG definitions.
1908
1909 2009-01-21  Mark Rowe  <mrowe@apple.com>
1910
1911         Reviewed by Tim Hatcher.
1912
1913         Clean up how we force invocations of API that happened on background threads over to the main thread.
1914
1915         This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
1916         and return values back from the function.  The new approach is to use a proxy object that forwards an
1917         NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
1918         call site.
1919
1920         * Misc/WebNSObjectExtras.h:
1921         * Misc/WebNSObjectExtras.mm:
1922         (-[WebMainThreadInvoker initWithTarget:]):
1923         (-[WebMainThreadInvoker forwardInvocation:]):
1924         (-[WebMainThreadInvoker methodSignatureForSelector:]):
1925         (-[WebMainThreadInvoker handleException:]):
1926         (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
1927         raised back to the WebMainThreadInvoker.
1928         (-[NSObject _webkit_invokeOnMainThread]):
1929
1930         The following methods are updated to use the proxy object to forward methods to the main thread:
1931
1932         * WebView/WebArchive.mm:
1933         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
1934         (-[WebArchive mainResource]):
1935         (-[WebArchive subresources]):
1936         (-[WebArchive subframeArchives]):
1937         * WebView/WebResource.mm:
1938         (-[WebResource data]):
1939         (-[WebResource URL]):
1940         (-[WebResource MIMEType]):
1941         (-[WebResource textEncodingName]):
1942         (-[WebResource frameName]):
1943         (-[WebResource _ignoreWhenUnarchiving]):
1944         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
1945         (-[WebResource _initWithData:URL:response:]):
1946         (-[WebResource _suggestedFilename]):
1947         (-[WebResource _response]):
1948         (-[WebResource _stringValue]):
1949         * WebView/WebView.mm:
1950         (-[WebView initWithFrame:frameName:groupName:]):
1951         (-[WebView initWithCoder:]):
1952
1953 2009-01-20  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1954
1955         Reviewed by George Staikos.
1956
1957         Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
1958
1959         Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
1960         WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
1961
1962         * WebCoreSupport/WebEditorClient.mm:
1963         (WebEditorClient::textFieldDidBeginEditing):
1964         (WebEditorClient::textFieldDidEndEditing):
1965         (WebEditorClient::textDidChangeInTextField):
1966         (WebEditorClient::doTextFieldCommandFromEvent):
1967         (WebEditorClient::textWillBeDeletedInTextField):
1968         (WebEditorClient::textDidChangeInTextArea):
1969
1970 2009-01-19  Anders Carlsson  <andersca@apple.com>
1971
1972         Reviewed by Sam Weinig.
1973
1974         Add and implement GetScriptableNPObject.
1975         
1976         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1977         (WKPCGetScriptableNPObjectReply):
1978         Create a new reply struct and set it as the current reply.
1979         
1980         (WKPCEvaluate):
1981         Get rid of an unused variable.
1982         
1983         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1984         (WebKit::NetscapePluginInstanceProxy::Reply::):
1985         (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
1986         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1987         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1988         Call _WKPHGetScriptableNPObject and wait for a reply.
1989         
1990         * Plugins/Hosted/ProxyInstance.h: Added.
1991         * Plugins/Hosted/ProxyInstance.mm: Added.
1992         Add empty files.
1993         
1994         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1995         (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1996         Call NetscapePluginInstanceProxy::createBindingsInstance.
1997         
1998         * Plugins/Hosted/WebKitPluginClient.defs:
1999         * Plugins/Hosted/WebKitPluginHost.defs:
2000         Add new declarations.
2001
2002 2009-01-19  Sam Weinig  <sam@webkit.org>
2003
2004         Rubber-stamped by Gavin Barraclough.
2005
2006         Remove temporary operator-> from JSValuePtr.
2007
2008         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2009         (WebKit::NetscapePluginInstanceProxy::invoke):
2010         (WebKit::NetscapePluginInstanceProxy::hasMethod):
2011         (WebKit::NetscapePluginInstanceProxy::marshalValue):
2012         * WebView/WebFrame.mm:
2013         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2014         * WebView/WebView.mm:
2015         (aeDescFromJSValue):
2016
2017 2009-01-19  Anders Carlsson  <andersca@apple.com>
2018
2019         Reviewed by Sam Weinig.
2020
2021         Make Evaluate an asynchronous method that has a reply method.
2022         
2023         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2024         (WKPCEvaluate):
2025         * Plugins/Hosted/WebKitPluginClient.defs:
2026         * Plugins/Hosted/WebKitPluginHost.defs:
2027
2028 2009-01-19  Brady Eidson  <beidson@apple.com>
2029
2030         Rubberstamped by Tim Hatcher
2031
2032         Fix long standing typo.
2033
2034         * History/WebBackForwardList.h:
2035
2036 2009-01-19  Mark Rowe  <mrowe@apple.com>
2037
2038         Fix the build!
2039
2040         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2041         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2042         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2043
2044 2009-01-18  Mark Rowe  <mrowe@apple.com>
2045
2046         Reviewed by Anders Carlsson.
2047
2048         Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
2049         Bug 23414: Reproducible crash accessing View menu with plugins disabled
2050
2051         * WebView/WebFrame.mm:
2052         (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
2053
2054 2009-01-17  David Hyatt  <hyatt@apple.com>
2055
2056         Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
2057         are done in WebCore instead.
2058
2059         Reviewed by Oliver Hunt
2060
2061         * WebView/WebFrame.mm:
2062         (-[WebFrame _selectedString]):
2063         (-[WebFrame _stringForRange:]):
2064
2065 2009-01-17  Eric Carlson  <eric.carlson@apple.com>
2066
2067         Reviewed by Adele Peterson
2068
2069         Complete <rdar://problem/6293969>
2070
2071         * WebCoreSupport/WebSystemInterface.m:
2072         (InitWebCoreSystemInterface): Remove UseSharedMediaUI
2073
2074 2009-01-15  Brady Eidson  <beidson@apple.com>
2075
2076         Reviewed by Dan Bernstein
2077
2078         Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
2079
2080         * History/WebHistory.mm:
2081         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
2082           flag for all loads with an HTTP Method
2083
2084 2009-01-14  Anders Carlsson  <andersca@apple.com>
2085
2086         Reviewed by Sam Weinig.
2087
2088         Implement InvokeDefault, Construct, GetProperty and SetProperty.
2089         
2090         Fully implement marshalValue.
2091         
2092         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2093         (WKPCInvokeDefault):
2094         (WKPCConstruct):
2095         (WKPCGetProperty):
2096         (WKPCSetProperty):
2097         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2098         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2099         (WebKit::NetscapePluginInstanceProxy::evaluate):
2100         (WebKit::NetscapePluginInstanceProxy::invoke):
2101         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2102         (WebKit::NetscapePluginInstanceProxy::construct):
2103         (WebKit::NetscapePluginInstanceProxy::getProperty):
2104         (WebKit::NetscapePluginInstanceProxy::setProperty):
2105         (WebKit::NetscapePluginInstanceProxy::marshalValue):
2106         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2107         * Plugins/Hosted/WebKitPluginClient.defs:
2108
2109 2009-01-14  Anders Carlsson  <andersca@apple.com>
2110
2111         Reviewed by Sam Weinig.
2112
2113         Demarshal arguments and pass them to the JS call.
2114         
2115         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2116         (WKPCInvoke):
2117         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2118         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2119         (WebKit::NetscapePluginInstanceProxy::invoke):
2120         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2121         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2122
2123 2009-01-14  Mark Rowe  <mrowe@apple.com>
2124
2125         Reviewed by Timothy Hatcher.
2126
2127         <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
2128
2129         Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
2130         that WebView uses.
2131
2132         * WebView/WebArchive.mm:
2133         (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
2134         (-[WebArchive _initWithArguments:]):
2135         * WebView/WebResource.mm:
2136         (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
2137
2138 2009-01-14  Darin Adler  <darin@apple.com>
2139
2140         Reviewed by Oliver Hunt.
2141
2142         Fix crash I ran into while printing. I was unable to reproduce it, but also,
2143         it's clear there's no guarantee that the frame will be non-zero in this case,
2144         so it seems fine to check it.
2145
2146         * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
2147         and don't do anything with it if it's zero.
2148
2149 2009-01-14  Dan Bernstein  <mitz@apple.com>
2150
2151         Reviewed by John Sullivan.
2152
2153         - update copyright
2154
2155         * Info.plist:
2156
2157 2009-01-12  Anders Carlsson  <andersca@apple.com>
2158
2159         Reviewed by Darin Adler.
2160
2161         Add a bunch of methods to WebKitPluginClient.defs, and implement them.
2162         
2163         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2164         (WebKit::fromUTF8WithLatin1Fallback):
2165         If the length isn't specified, get it by calling strlen.
2166         
2167         (WKPCEvaluate):
2168         Evaluate doesn't take any arguments.
2169         
2170         (WKPCGetIntIdentifier):
2171         Call _NPN_GetIntIdentifier.
2172         
2173         (identifierFromServerIdentifier):
2174         New helper function that returns a JSC Identifier from an NPIdentifier.
2175         
2176         (WKPCInvoke):
2177         Call identifierFromServerIdentifier.
2178         
2179         (WKPCRemoveProperty):
2180         (WKPCHasProperty):
2181         (WKPCHasMethod):
2182         Call NetscapePluginInstanceProxy.
2183
2184         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2185         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2186         (WebKit::NetscapePluginInstanceProxy::removeProperty):
2187         (WebKit::NetscapePluginInstanceProxy::hasProperty):
2188         (WebKit::NetscapePluginInstanceProxy::hasMethod):
2189
2190         * Plugins/Hosted/WebKitPluginClient.defs:
2191         Add new definitions.
2192
2193 2009-01-13  Anders Carlsson  <andersca@apple.com>
2194
2195         Fix build.
2196
2197         * WebView/WebView.mm:
2198         (-[WebView _initWithArguments:]):
2199
2200 2009-01-13  Timothy Hatcher  <timothy@apple.com>
2201
2202         Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
2203
2204         <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
2205
2206         Reviewed by Darin Adler.
2207
2208         * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
2209         * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
2210         * Misc/WebNSObjectExtras.mm:
2211         (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
2212         Passes the optional object to the selector.
2213         (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
2214         Put the optional object into the arguments dictionary.
2215         (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
2216         * WebView/WebResource.mm:
2217         (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
2218         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
2219         _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
2220         * WebView/WebView.mm:
2221         (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
2222         (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
2223         (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
2224         to call _initWithArguments: passing the frame, frameName and groupName.
2225         (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
2226
2227 2009-01-12  Gavin Barraclough  <barraclough@apple.com>
2228
2229         Reviewed by Oliver Hunt.
2230
2231         Deprecate JSValuePtr::getNumber() - two ways to get a number should  be enough.
2232
2233         * WebView/WebView.mm:
2234         (aeDescFromJSValue):
2235
2236 2009-01-12  Brady Eidson  <beidson@apple.com>
2237
2238         Reviewed by Darin Adler
2239
2240         <rdar://problem/6468274> - Track Non-get requests in global history
2241
2242         * History/WebHistory.mm:
2243         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
2244         * History/WebHistoryInternal.h:
2245
2246         * History/WebHistoryItem.mm:
2247         (-[WebHistoryItem initFromDictionaryRepresentation:]):
2248         (-[WebHistoryItem dictionaryRepresentation]):
2249         (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
2250         * History/WebHistoryItemPrivate.h:
2251
2252         * WebCoreSupport/WebFrameLoaderClient.mm:
2253         (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
2254
2255 2009-01-12  Anders Carlsson  <andersca@apple.com>
2256
2257         Reviewed by Sam Weinig.
2258
2259         Move marshalling into NetscapePluginInstanceProxy.
2260         
2261         Add support for marshallin strings.
2262         
2263         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2264         (WKPCEvaluate):
2265         (WKPCInvoke):
2266         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2267         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2268         (WebKit::NetscapePluginInstanceProxy::evaluate):
2269         (WebKit::NetscapePluginInstanceProxy::invoke):
2270         (WebKit::NetscapePluginInstanceProxy::marshalValue):
2271         * Plugins/Hosted/WebKitPluginHostTypes.h:
2272
2273 2009-01-12  Anders Carlsson  <andersca@apple.com>
2274
2275         Reviewed by Sam Weinig.
2276
2277         Implement WKPCInvoke.
2278         
2279         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2280         (WKPCEvaluate):
2281         (WKPCInvoke):
2282         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2283         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2284         (WebKit::NetscapePluginInstanceProxy::idForObject):
2285         (WebKit::NetscapePluginInstanceProxy::invoke):
2286         * Plugins/Hosted/WebKitPluginClient.defs:
2287
2288 2009-01-12  Anders Carlsson  <andersca@apple.com>
2289
2290         Reviewed by Sam Weinig.
2291
2292         Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
2293         
2294         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2295         (WKPCEvaluate):
2296         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2297         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2298         (WebKit::NetscapePluginInstanceProxy::marshalValue):
2299         * Plugins/Hosted/WebKitPluginHostTypes.h:
2300
2301 2009-01-12  Julien Chaffraix  <jchaffraix@pleyo.com>
2302
2303         Reviewed by Darin Adler.
2304
2305         Bug 22861: Turn the FontCache into a singleton
2306         https://bugs.webkit.org/show_bug.cgi?id=22861
2307
2308         * Misc/WebCoreStatistics.mm:
2309         (+[WebCoreStatistics cachedFontDataCount]):
2310         (+[WebCoreStatistics cachedFontDataInactiveCount]):
2311         (+[WebCoreStatistics purgeInactiveFontData]):
2312         Redirected all the static calls to the global FontCache
2313         instance.
2314
2315 2009-01-11  Dmitry Titov  <dimich@chromium.org>
2316
2317         Reviewed by Darin Adler.
2318
2319         https://bugs.webkit.org/show_bug.cgi?id=23207
2320         Moved currentTime() to from WebCore to WTF.
2321
2322         * WebView/WebFrame.mm: a different header file included.
2323
2324 2009-01-10  Darin Adler  <darin@apple.com>
2325
2326         Reviewed by Sam Weinig.
2327
2328         <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
2329         because of change to -[HTMLObjectElement data]
2330
2331         * WebView/WebView.mm:
2332         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
2333         violation check because I saw this being done off the main thread while testing Mail, and it
2334         caused problems. Put all the one time initialization under a single guard to make things just
2335         a little faster other times, and to make it clearer which things are one-time. Added a call to
2336         the new patchMailRemoveAttributesMethod function.
2337         (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
2338         because I assumed it would be slightly better to have a public method name in the violation
2339         message. This calls commonInitialization later, so it will hit that one eventually.
2340         (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
2341         (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
2342         a WebKit method and removes the patch again on the way out.
2343         (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
2344         applies the patch that fixes this bug.
2345
2346 2009-01-09  Dan Bernstein  <mitz@apple.com>
2347
2348         Reviewed by Darin Adler.
2349
2350         - fixed <rdar://problem/6234347> Add/change conditional key
2351           bindings for changing paragraph- and character-level writing
2352           direction (to match NSTextView)
2353
2354         * WebView/WebHTMLView.mm:
2355         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
2356         code to validate makeBaseWritingDirectionLeftToRight: and
2357         makeBaseWritingDirectionRightToLeft:.
2358         (writingDirectionKeyBindingsEnabled): Changed this function to
2359         always return YES, except on Tiger and Leopard.
2360         (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
2361         changeBaseWritingDirectionToLTR: to this.
2362         (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
2363         changeBaseWritingDirectionToRTL: to this.
2364         (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
2365         makeBaseWritingDirectionLeftToRight:.
2366         (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
2367         makeBaseWritingDirectionRightToLeft:.
2368         * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
2369         and makeBaseWritingDirectionRightToLeft to
2370         FOR_EACH_RESPONDER_SELECTOR.
2371
2372 2009-01-08  Anders Carlsson  <andersca@apple.com>
2373
2374         Reviewed by Sam Weinig.
2375
2376         Add and implement WKPCGetStringIdentifier.
2377         
2378         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2379         (WKPCGetStringIdentifier):
2380         * Plugins/Hosted/WebKitPluginClient.defs:
2381
2382 2009-01-08  Stephanie Lewis  <slewis@gmail.com>
2383
2384         Fix Tiger build.        
2385
2386         * WebView/WebTextIterator.mm:
2387
2388 2009-01-08  Anders Carlsson  <andersca@apple.com>
2389
2390         Reviewed by Sam Weinig.
2391
2392         Add basic support for evaluating scripts.
2393         
2394         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2395         (WebKit::fromUTF8WithLatin1Fallback):
2396         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2397         (WKPCReleaseObject):
2398         (marshalValue):
2399         (WKPCEvaluate):
2400         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2401         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2402         (WebKit::NetscapePluginInstanceProxy::releaseObject):
2403         (WebKit::NetscapePluginInstanceProxy::evaluate):
2404         * Plugins/Hosted/WebKitPluginClient.defs:
2405         * Plugins/Hosted/WebKitPluginHostTypes.h:
2406
2407 2009-01-08  David Hyatt  <hyatt@apple.com>
2408
2409         Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
2410
2411         Add a new ChromeClient method for handling exposure of scrolled rects.
2412
2413         Reviewed by Oliver Hunt
2414
2415         * WebCoreSupport/WebChromeClient.h:
2416         * WebCoreSupport/WebChromeClient.mm:
2417         (WebChromeClient::scrollRectIntoView):
2418
2419 2009-01-08  Darin Adler  <darin@apple.com>
2420
2421         Reviewed by Tim Hatcher.
2422
2423         Bug 23185: add a currentRange method to the WebTextIterator SPI
2424         https://bugs.webkit.org/show_bug.cgi?id=23185
2425         rdar://problem/6455834
2426
2427         I also noticed a garbage-collection-related threading issue that I fixed, and
2428         that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
2429
2430         * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
2431         category. Added currentTextPointer and currentTextLength.
2432
2433         * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
2434         used _textIterator to be consistent with ObjC rather than C++ naming.
2435         (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
2436         since the finalize method here works with main-thread only WebCore objects. 
2437         (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
2438         (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
2439         since I don't think it provides much value.
2440         (-[WebTextIterator atEnd]): Ditto.
2441         (-[WebTextIterator currentRange]): Added.
2442         (-[WebTextIterator currentTextPointer]): Added.
2443         (-[WebTextIterator currentTextLength]): Added.
2444         (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
2445         (-[WebTextIterator currentText]): Ditto.
2446
2447 2009-01-08  Eric Carlson  <eric.carlson@apple.com>
2448
2449         Reviewed by Adele Peterson.
2450
2451         Simplify Mac interfaces for drawing media controller elements
2452
2453         <rdar://problem/6293969>
2454
2455         * WebCoreSupport/WebSystemInterface.m:
2456         (InitWebCoreSystemInterface): Update for changes to media controller functions
2457
2458 2009-01-07  Anders Carlsson  <andersca@apple.com>
2459
2460         Reviewed by Dan Bernstein.
2461
2462         Fix build.
2463         
2464         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2465         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2466         (WebKit::NetscapePluginInstanceProxy::idForObject):
2467
2468 2009-01-07  Anders Carlsson  <andersca@apple.com>
2469
2470         Reviewed by Dan Bernstein.
2471
2472         Add a way for a plug-in to get a reference to the Window JS object.
2473
2474         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2475         (WKPCGetWindowNPObject):
2476         Call the appropriate instance.
2477         
2478         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2479         Add object ID counter.
2480         
2481         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2482         (WebKit::NetscapePluginInstanceProxy::destroy):
2483         Clear the object ID map.
2484         
2485         (WebKit::NetscapePluginInstanceProxy::idForObject):
2486         New method that returns a unique ID for a given JS object.
2487         
2488         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
2489         Return the object ID for the window JS object.
2490         
2491         * Plugins/Hosted/WebKitPluginClient.defs:
2492         Add GetWindowNPObject.
2493
2494 2009-01-07  Darin Adler  <darin@apple.com>
2495
2496         Reviewed by Oliver Hunt.
2497
2498         Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
2499         https://bugs.webkit.org/show_bug.cgi?id=23160
2500
2501         * WebView/WebView.mm:
2502         (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
2503         (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
2504         * WebView/WebViewPrivate.h: Ditto.
2505
2506 2009-01-05  Gavin Barraclough  <baraclough@apple.com>
2507
2508         Rubber Stamped by Oliver Hunt.
2509
2510         Replace all uses of JSValue* with new wrapper class, JSValuePtr.
2511         See JavaScriptCore/ChangeLog for more detailed description.
2512
2513         * WebView/WebFrame.mm:
2514         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2515         * WebView/WebScriptDebugDelegate.mm:
2516         (-[WebScriptCallFrame _convertValueToObjcValue:]):
2517         (-[WebScriptCallFrame exception]):
2518         (-[WebScriptCallFrame evaluateWebScript:]):
2519         * WebView/WebView.mm:
2520         (aeDescFromJSValue):
2521         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
2522
2523 2009-01-06  Pierre-Olivier Latour  <pol@apple.com>
2524
2525         Reviewed by Darin Adler.
2526
2527         Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
2528
2529         https://bugs.webkit.org/show_bug.cgi?id=23126
2530
2531         * WebView/WebFrame.mm:
2532         (-[WebFrame _numberOfActiveAnimations]):
2533         * WebView/WebFramePrivate.h:
2534
2535 2009-01-05  David Kilzer  <ddkilzer@apple.com>
2536
2537         Add SPI to enable, disable and check state of WebIconDatabase
2538
2539         Reviewed by Darin Adler & Timothy Hatcher.
2540
2541         Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
2542         SPI to make it possible to enable, disable and check the state of
2543         the icon database.
2544
2545         * Misc/WebIconDatabase.mm:
2546         (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
2547         (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
2548         -isEnabled instead of -_isEnabled.
2549         (-[WebIconDatabase iconURLForURL:]): Ditto.
2550         (-[WebIconDatabase retainIconForURL:]): Ditto.
2551         (-[WebIconDatabase releaseIconForURL:]): Ditto.
2552         (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
2553         WebInternal category.
2554         (-[WebIconDatabase setEnabled:]): Added.  Takes care of changing
2555         the enabled/disabled state of the icon database.
2556         (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
2557         instead of -_isEnabled.
2558         (-[WebIconDatabase _startUpIconDatabase]): Added.  Extrated from
2559         -init.
2560         (-[WebIconDatabase _shutDownIconDatabase]): Added.  Remove
2561         observers when the icon database is disabled.
2562         * Misc/WebIconDatabaseInternal.h: Added declarations for
2563         -_startUpIconDatabase and -_shutDownIconDatabase.
2564         * Misc/WebIconDatabasePrivate.h: Added declarations for
2565         -isEnabled and -setEnabled:.
2566
2567 2009-01-05  Brady Eidson  <beidson@apple.com>
2568
2569         Reviewed by Jon Honeycutt
2570
2571         Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
2572
2573         * History/WebHistoryItem.mm:
2574         (-[WebHistoryItem _setLastVisitWasFailure:]):
2575         * History/WebHistoryItemPrivate.h:
2576
2577 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2578
2579         Another blind mac build fix
2580
2581         * WebCoreSupport/WebChromeClient.mm:
2582         (WebChromeClient::contentsSizeChanged):
2583
2584 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2585
2586         Blind mac build fix
2587
2588         * WebCoreSupport/WebChromeClient.mm:
2589
2590 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2591
2592         Fix mac build
2593
2594         * WebCoreSupport/WebChromeClient.h:
2595
2596 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2597
2598         Reviewed by George Staikos.
2599
2600         Build fix for contentsSizeChanged
2601
2602         * WebCoreSupport/WebChromeClient.h:
2603         * WebCoreSupport/WebChromeClient.mm:
2604         (WebChromeClient::contentsSizeChanged):
2605
2606 2009-01-02  Darin Adler  <darin@apple.com>
2607
2608         Reviewed by Sam Weinig.
2609
2610         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
2611         inside its web view when resizing its window
2612         https://bugs.webkit.org/show_bug.cgi?id=23072
2613         rdar://problem/6368028
2614
2615         The first attempt at fixing this did not work.
2616         This time I was able to reproduce the bug and test the fix.
2617
2618         * WebCoreSupport/WebFrameLoaderClient.mm:
2619         (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
2620         function names around a bit to make even less code at the call site.
2621         (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
2622         Dictionary application in here.
2623         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
2624         applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
2625         when the script is cached. This fixes one of the two problems with the initial
2626         patch; the other fix is in WebCore.
2627         (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
2628         applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
2629
2630         * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
2631
2632 2009-01-02  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2633
2634         Reviewed by Darin Adler.
2635
2636         Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
2637         <https://bugs.webkit.org/show_bug.cgi?id=23060>
2638         <rdar://problem/6467830>
2639
2640         After r38629, all keyboard events get sent by Editor to the EditorClient, even
2641         if the selection is not editable. If the event's command is unsupported by
2642         WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
2643         was not. When using the page up / page down keys, the events generated are of
2644         the form scrollPageUp rather than movePageUp, so they are unsupported by
2645         WebHTMLView and cause this bug to occur.
2646
2647         * WebView/WebHTMLView.mm:
2648         (-[WebHTMLView doCommandBySelector:]):
2649
2650 2009-01-02  Darin Adler  <darin@apple.com>
2651
2652         Reviewed by Oliver Hunt.
2653
2654         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
2655         https://bugs.webkit.org/show_bug.cgi?id=23072
2656         rdar://problem/6368028
2657
2658         * WebCoreSupport/WebFrameLoaderClient.mm:
2659         (isAppleDictionaryApplication): Added.
2660         (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
2661         a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
2662         (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
2663         apply the quirk when the relevant script is loaded.
2664
2665 2008-12-26  Dan Bernstein  <mitz@apple.com>
2666
2667         Reviewed by Sam Weinig.
2668
2669         - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
2670           global history after a successful visit
2671
2672         * History/WebHistory.mm:
2673         (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
2674         update the wasFailure flag on the HistoryItem.
2675
2676 2008-12-23  Darin Adler  <darin@apple.com>
2677
2678         Reviewed by Alexey Proskuryakov (a slightly earlier version).
2679
2680         - fix https://bugs.webkit.org/show_bug.cgi?id=22976
2681           crash due to Mail's use of WebArchive and WebResource on non-main thread
2682
2683         * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
2684         WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
2685         * Misc/WebKitLogging.m: Ditto.
2686
2687         * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
2688         main thread workaround.
2689
2690         * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
2691         which performs a selector on the main thread, waits for it to complete, and then
2692         returns the value on the caller thread.
2693         * Misc/WebNSObjectExtras.mm: Added.
2694
2695         * WebView/WebArchive.mm:
2696         (-[WebArchive init]): Added WebCoreThreadViolationCheck.
2697         (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
2698         initialization on main thread if needMailThreadWorkaround is true.
2699         Also added WebCoreThreadViolationCheck.
2700         (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
2701         (-[WebArchive mainResource]): Get property on main thread if
2702         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2703         (-[WebArchive subresources]): Ditto.
2704         (-[WebArchive subframeArchives]): Ditto.
2705         (-[WebArchive data]): Ditto.
2706         (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
2707         (-[WebArchive _coreLegacyWebArchive]): Ditto.
2708         (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
2709         version of initWithMainResource above.
2710
2711         * WebView/WebResource.mm:
2712         (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
2713         (-[WebResource data]): Get property on main thread if
2714         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2715         (-[WebResource URL]): Ditto.
2716         (-[WebResource MIMEType]): Ditto.
2717         (-[WebResource textEncodingName]): Ditto.
2718         (-[WebResource frameName]): Ditto.
2719         (-[WebResource _ignoreWhenUnarchiving]): Ditto.
2720         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2721         Perform initialization on main thread if needMailThreadWorkaround is true.
2722         Also added WebCoreThreadViolationCheck.
2723         (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
2724         (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
2725         getting at coreResource directly.
2726         (-[WebResource _response]): Get property on main thread if
2727         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2728         (-[WebResource _stringValue]): Ditto.
2729         (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
2730         (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
2731         version of _initWithData above.
2732
2733         * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
2734         clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
2735         and the needMainThreadWorkaround helper function.
2736
2737         * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
2738         file. This probably fixes clean builds.
2739         * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
2740
2741         * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
2742         since it's not actually used.
2743         * WebView/WebDataSource.mm: Ditto.
2744         * WebView/WebHTMLRepresentation.mm: Ditto.
2745
2746 2008-12-23  Darin Adler  <darin@apple.com>
2747
2748         Reviewed by Dan Bernstein.
2749
2750         - fix https://bugs.webkit.org/show_bug.cgi?id=22979
2751           crash seen in -[WebView drawsBackground] when quitting
2752           <rdar://problem/6464601>
2753
2754         * WebView/WebView.mm:
2755         (-[WebView drawsBackground]): Added comment and a null check for _private.
2756
2757 2008-12-22  Kevin Decker  <kdecker@apple.com>
2758
2759         Reviewed by Anders Carlsson.
2760
2761         <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
2762         
2763         * Plugins/WebBaseNetscapePluginView.mm:
2764         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
2765
2766 2008-12-19  Geoffrey Garen  <ggaren@apple.com>
2767
2768         Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
2769         
2770         Added SPI for getting an unsorted vector of all items in history.
2771         
2772         * History/WebHistory.h:
2773         * History/WebHistory.mm:
2774         (-[WebHistory allItems]):
2775
2776 2008-12-18  Dan Bernstein  <mitz@apple.com>
2777
2778         Reviewed by Sam Weinig.
2779
2780         - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
2781           a new resource load delegae method.
2782
2783         * WebCoreSupport/WebFrameLoaderClient.h:
2784         * WebCoreSupport/WebFrameLoaderClient.mm:
2785         (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
2786         delegate method. If the method is unimplemented, returns true for
2787         backwards compatibility.
2788         * WebView/WebView.mm: 
2789         (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
2790         shouldUseCredentialStorageFunc member.
2791         (CallResourceLoadDelegateReturningBoolean): Added.
2792         * WebView/WebViewInternal.h:
2793         * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
2794         -webView:resource:shouldUseCredentialStorageForDataSource:.
2795
2796 2008-12-18  Cameron Zwarich  <zwarich@apple.com>
2797
2798         Reviewed by Jonathan Honeycutt.
2799
2800         Fix an apparent typo in r39385 that is causing lots of crashes.
2801
2802         * WebCoreSupport/WebFrameLoaderClient.mm:
2803         (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2804
2805 2008-12-18  Brady Eidson  <beidson@apple.com>
2806
2807         Reviewed by John Sullivan
2808
2809         Initial visit to a website creates history items that start with a visit count of
2810         zero instead of one
2811
2812         * History/WebHistory.mm:
2813         (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
2814
2815         * History/WebHistoryItem.mm:
2816         (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
2817         * History/WebHistoryItemInternal.h:
2818
2819 2008-12-18  Sam Weinig  <sam@webkit.org>
2820
2821         Reviewed by John Sullivan.
2822
2823         Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
2824         a new private frame load delegate method.
2825
2826         * WebCoreSupport/WebFrameLoaderClient.h:
2827         * WebCoreSupport/WebFrameLoaderClient.mm:
2828         (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2829         * WebView/WebView.mm:
2830         (-[WebView _cacheFrameLoadDelegateImplementations]):
2831         * WebView/WebViewInternal.h:
2832         * WebView/WebViewPrivate.h:
2833
2834 2008-12-16  Antti Koivisto  <antti@apple.com>
2835
2836         Reviewed by John Sullivan.
2837         
2838         Add version check for shift-reload behavior.
2839
2840         * Misc/WebKitVersionChecks.h:
2841         * WebView/WebFrame.mm:
2842         (-[WebFrame reload]):
2843
2844 2008-12-16  Anders Carlsson  <andersca@apple.com>
2845
2846         Reviewed by Dan Bernstein.
2847
2848         Start sending keyboard events to the plug-in host.
2849         
2850         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2851         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2852         (WebKit::NetscapePluginInstanceProxy::keyEvent):
2853         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2854         (-[WebHostedNetscapePluginView keyDown:]):
2855         (-[WebHostedNetscapePluginView keyUp:]):
2856         * Plugins/Hosted/WebKitPluginHost.defs:
2857
2858 2008-12-16  Anders Carlsson  <andersca@apple.com>
2859
2860         Reviewed by Kevin Decker.
2861
2862         <rdar://problem/6450538>
2863         
2864         Fix flag enumeration.
2865         
2866         * Plugins/Hosted/WebKitPluginHostTypes.h:
2867
2868 2008-12-16  Anders Carlsson  <andersca@apple.com>
2869
2870         Reviewed by Kevin Decker.
2871
2872         Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
2873         
2874         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2875         (WKPCLoadURL):
2876         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2877         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2878         (WebKit::NetscapePluginInstanceProxy::loadURL):
2879         * Plugins/Hosted/WebKitPluginClient.defs:
2880         * Plugins/Hosted/WebKitPluginHostTypes.h:
2881
2882 2008-12-16  Anders Carlsson  <andersca@apple.com>
2883
2884         Reviewed by Kevin Decker.
2885
2886         Add trailing null to headers to avoid a crash in the plug-in host.
2887         
2888         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2889         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
2890
2891 2008-12-15  Mark Rowe  <mrowe@apple.com>
2892
2893         Rubber-stamped by Cameron Zwarich.
2894
2895         <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
2896
2897         * Configurations/Base.xcconfig:
2898         * Configurations/DebugRelease.xcconfig:
2899
2900 2008-12-15  Stephanie Lewis  <slewis@apple.com>
2901
2902         Fix build.
2903
2904         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2905
2906 2008-12-15  Anders Carlsson  <andersca@apple.com>
2907
2908         Reviewed by Sam Weinig.
2909
2910         Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
2911         back into us while it's being instantiated.
2912         
2913         * Plugins/Hosted/NetscapePluginHostManager.mm:
2914         (WebKit::NetscapePluginHostManager::instantiatePlugin):
2915         * Plugins/Hosted/NetscapePluginHostProxy.h:
2916         (WebKit::NetscapePluginHostProxy::clientPort):
2917         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2918         (WKPCInstantiatePluginReply):
2919         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2920         (WebKit::NetscapePluginInstanceProxy::Reply::):
2921         (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
2922         (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
2923         (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
2924         (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
2925         (WebKit::NetscapePluginInstanceProxy::waitForReply):
2926         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2927         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2928         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
2929         * Plugins/Hosted/WebKitPluginClient.defs:
2930         * Plugins/Hosted/WebKitPluginHost.defs:
2931
2932 2008-12-15  Anders Carlsson  <andersca@apple.com>
2933
2934         Reviewed by Darin Adler.
2935
2936         Let WebKit generate a plug-in ID instead of having the plug-in host do it.
2937
2938         * Plugins/Hosted/NetscapePluginHostManager.mm:
2939         (WebKit::NetscapePluginHostManager::instantiatePlugin):
2940         Create the plug-in proxy before instantiating the plug-in.
2941         
2942         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2943         (WebKit::NetscapePluginInstanceProxy::create):
2944         (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
2945         (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
2946         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2947         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2948         * Plugins/Hosted/WebKitPluginHost.defs:
2949
2950 2008-12-15  Anders Carlsson  <andersca@apple.com>
2951
2952         Reviewed by Sam Weinig.
2953
2954         LoadURL doesn't need to be asynchronous.
2955         
2956         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2957         (WKPCLoadURL):
2958         * Plugins/Hosted/WebKitPluginClient.defs:
2959         * Plugins/Hosted/WebKitPluginHost.defs:
2960
2961 2008-12-15  Antti Koivisto  <antti@apple.com>
2962
2963         Reviewed by Darin Adler.
2964         
2965         - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
2966         - Add corresponding IBAction to WebView.
2967         - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
2968
2969         * WebView/WebFrame.h:
2970         * WebView/WebFrame.mm:
2971         (-[WebFrame reload]):
2972         (-[WebFrame reloadFromOrigin]): 
2973         * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
2974         * WebView/WebView.h:
2975         * WebView/WebView.mm:
2976         (-[WebView reloadFromOrigin:]):
2977
2978 2008-12-14  Dan Bernstein  <mitz@apple.com>
2979
2980         Reviewed by Darin Adler.
2981
2982         - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
2983           should add items to userInfo
2984
2985         * History/WebHistory.mm:
2986         (-[WebHistoryPrivate allItems]): Added this helper method, which returns
2987         all values in the _entriesByURL dictionary.
2988         (-[WebHistory removeAllItems]): Changed to send the array of all items
2989         in the notification.
2990
2991 2008-12-13  Darin Adler  <darin@apple.com>
2992
2993         - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
2994
2995         * WebKit.exp: Added the class. We forgot to export it when we added
2996         the WebTextIterator SPI.
2997
2998 2008-12-12  Darin Adler  <darin@apple.com>
2999
3000         Rubber stamped by Adam Roben.
3001
3002         - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
3003           login sheet after clicking static text, due to AppKit key loop change
3004
3005         * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
3006         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
3007         * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
3008         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
3009         Set nextKeyView of the selectable static texts to the editable text.
3010         Updated nib format.
3011
3012 2008-12-12  Stephanie Lewis  <slewis@apple.com>
3013
3014         Reviewed by Geoff Garen.
3015
3016         Shrink Cache Sizes.
3017
3018         * WebView/WebView.mm:
3019         (+[WebView _setCacheModel:]):
3020
3021 2008-12-12  Anders Carlsson  <andersca@apple.com>
3022
3023         Reviewed by Tim Hatcher.
3024
3025         Don't try to free the dummy "1" port state.
3026         
3027         * Plugins/WebNetscapePluginView.mm:
3028         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3029         (-[WebNetscapePluginView updateAndSetWindow]):
3030
3031 2008-12-11  Cameron Zwarich  <zwarich@apple.com>
3032
3033         Rubber-stamped by Mark Rowe.
3034
3035         Roll out r39212 due to assertion failures during layout tests, multiple
3036         layout test failures, memory leaks, and obvious incorrectness.
3037
3038         * WebView/WebPreferenceKeysPrivate.h:
3039         * WebView/WebPreferences.mm:
3040         (-[WebPreferences fullDocumentTeardownEnabled]):
3041         * WebView/WebPreferencesPrivate.h:
3042
3043 2008-12-11  Stephanie Lewis  <slewis@apple.com>
3044
3045         Fix build.
3046
3047         * WebView/WebView.mm:
3048
3049 2008-12-11  Stephanie Lewis  <slewis@apple.com>
3050
3051         Reviewed by Oliver Hunt.
3052
3053         Empty Web cache before quitting a debug build in order
3054         to report accurate CachedResource leaks.
3055
3056         * WebView/WebView.mm:
3057         (-[WebView _close]):
3058
3059 2008-12-11  Anders Carlsson  <andersca@apple.com>
3060
3061         Fix Tiger build.
3062
3063         * Misc/WebNSDataExtras.h:
3064
3065 2008-12-11  Anders Carlsson  <andersca@apple.com>
3066
3067         Reviewed by Cameron Zwarich.
3068
3069         https://bugs.webkit.org/show_bug.cgi?id=22797
3070         REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
3071
3072         Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
3073         
3074         * Plugins/WebBaseNetscapePluginStream.mm:
3075         (WebNetscapePluginStream::destroyStreamWithReason):
3076
3077 2008-12-10  Glenn Wilson  <gwilson@google.com>
3078
3079         Reviewed by Adam Roben.
3080
3081         Added new methods for overriding default WebPreference values
3082         and for resetting preferences to their defaults.
3083         https://bugs.webkit.org/show_bug.cgi?id=20534
3084
3085         * WebView/WebPreferenceKeysPrivate.h:
3086         * WebView/WebPreferences.mm:
3087         (-[WebPreferences resetToDefaults]): new method
3088         (-[WebPreferences overridePreference:flag:]): new method
3089         * WebView/WebPreferencesPrivate.h: new method signatures
3090
3091 2008-12-10  Anders Carlsson  <andersca@apple.com>
3092
3093         Reviewed by Darin Adler.
3094
3095         Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
3096         
3097         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3098         Add stopAllStreams.
3099         
3100         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3101         (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
3102         Factored out this from ::destroy.
3103         
3104         (WebKit::NetscapePluginInstanceProxy::destroy):
3105         Call stopAllStreams().
3106         
3107         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3108         Ditto.
3109         
3110         (WebKit::NetscapePluginInstanceProxy::loadURL):
3111         Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
3112
3113 2008-12-10  Anders Carlsson  <andersca@apple.com>
3114
3115         Reviewed by Darin Adler.
3116
3117         Move two NSData category methods to WebNSDataExtras.m.
3118         
3119         * Misc/WebNSDataExtras.h:
3120         * Misc/WebNSDataExtras.m:
3121         (-[NSData _web_startsWithBlankLine]):
3122         (-[NSData _web_locationAfterFirstBlankLine]):
3123         * Plugins/WebNetscapePluginView.mm:
3124
3125 2008-12-10  Alice Liu  <alice.liu@apple.com>
3126
3127         fixed https://bugs.webkit.org/show_bug.cgi?id=20685
3128
3129         Reviewed by Darin Adler.
3130
3131         * Misc/WebNSPasteboardExtras.mm:
3132         Ask image for its file extension instead of falling back on MIME type and file path.
3133         Also moved this code to before setting the pasteboard data so as not to set any if
3134         no extension can be determined.
3135         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3136
3137         * WebView/WebHTMLView.mm:
3138         Fixed a separate but related long-standing bug of how the filename for the promised
3139         drag data is determined by asking the image for a proper file extension. 
3140         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3141
3142 2008-12-09  Anders Carlsson  <andersca@apple.com>
3143
3144         Reviewed by Darin Adler.
3145
3146         Fix typecast.
3147
3148         * WebView/WebHTMLView.mm:
3149         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3150
3151 2008-12-09  Anders Carlsson  <andersca@apple.com>
3152
3153         Reviewed by Darin Adler.
3154
3155         Implement software rendering of hosted plug-ins.
3156         
3157         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3158         (WKPCInvalidateRect):
3159         New MiG function. This is called by the plug-in host when it has drawn something.
3160         
3161         * Plugins/Hosted/WebHostedNetscapePluginView.h:
3162         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3163         (-[WebHostedNetscapePluginView createPlugin]):
3164         Create a software renderer.
3165         
3166         (-[WebHostedNetscapePluginView destroyPlugin]):
3167         Destroy the software renderer.
3168         
3169         (-[WebHostedNetscapePluginView drawRect:]):
3170         Draw using the software renderer.
3171         
3172         * Plugins/Hosted/WebKitPluginClient.defs:
3173         Add InvalidateRect.
3174
3175 2008-12-09  Brett Wilson  <brettw@chromium.org>
3176
3177         Reviewed by Dave Hyatt.
3178
3179         https://bugs.webkit.org/show_bug.cgi?id=22177
3180
3181         Add a callback on ChromeClient that the state of form elements on
3182         the page has changed. This is to allow clients implementing session
3183         saving to know when the current state is dirty.
3184
3185         * WebCoreSupport/WebChromeClient.h:
3186         (WebChromeClient::formStateDidChange):
3187
3188 2008-12-09  Anders Carlsson  <andersca@apple.com>
3189
3190         Reviewed by Dan Bernstein.
3191
3192         Make sure to pause null events for hosted plug-ins as well.
3193
3194         * WebView/WebHTMLView.mm:
3195         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3196
3197 2008-12-09  Anders Carlsson  <andersca@apple.com>
3198
3199         Reviewed by Darin Adler.
3200
3201         * Plugins/Hosted/NetscapePluginHostProxy.h:
3202         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3203         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3204         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
3205         Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
3206
3207 2008-12-09  Timothy Hatcher  <timothy@apple.com>
3208
3209         Implement a few methods needed to keep Dictionary.app working on Leopard.
3210
3211         <rdar://problem/6002160> Internal changes to WebKit in Safari 4
3212         Developer Preview might break Dictionary
3213
3214         Reviewed by Dan Bernstein.
3215
3216         * WebView/WebFrame.mm:
3217         (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
3218         (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
3219         * WebView/WebHTMLView.mm:
3220         (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
3221         that Dictionary.app is using.
3222
3223 2008-12-08  Anders Carlsson  <andersca@apple.com>
3224
3225         Reviewed by Darin Adler.
3226
3227         More work towards getting NPN_GetURL working.
3228         
3229         * Plugins/Hosted/HostedNetscapePluginStream.h:
3230         Inherit from NetscapePlugInStreamLoaderClient.
3231         
3232         (WebKit::HostedNetscapePluginStream::streamID):
3233         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3234         (WebKit::HostedNetscapePluginStream::startStream):
3235         Keep track of the resposne URL and the MIME type. Pass the response URL to the 
3236         plug-in host.
3237         
3238         (WebKit::HostedNetscapePluginStream::didFinishLoading):
3239         Disconnect the stream.
3240         
3241         (WebKit::HostedNetscapePluginStream::start):
3242         Create a plug-in stream loader and start loading.
3243         
3244         (WebKit::HostedNetscapePluginStream::stop):
3245         Cancel the load.
3246         
3247         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3248         (WKPCLoadURL):
3249         Fix the parameter order.
3250         
3251         (WKPCCancelLoadURL):
3252         New function that cancels a load of a stream with a given reason.
3253         
3254         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3255         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3256         (WebKit::NetscapePluginInstanceProxy::destroy):
3257         Stop the streams.
3258         
3259         (WebKit::NetscapePluginInstanceProxy::pluginStream):
3260         Return a plug-in stream given a stream ID.
3261         
3262         (WebKit::NetscapePluginInstanceProxy::disconnectStream):
3263         Remove the stream from the streams map.
3264         
3265         (WebKit::NetscapePluginInstanceProxy::loadRequest):
3266         Create a stream and load it.
3267         
3268         * Plugins/Hosted/WebKitPluginClient.defs:
3269         Add CancelLoadURL.
3270         
3271         * Plugins/Hosted/WebKitPluginHost.defs:
3272         Add responseURL to StartStream.
3273         
3274         * Plugins/WebBaseNetscapePluginView.h:
3275         * Plugins/WebBaseNetscapePluginView.mm:
3276         (-[WebBaseNetscapePluginView pluginPackage]):
3277         Move this down to the base class from WebNetscapePluginView.
3278         
3279         * Plugins/WebNetscapePluginView.h:
3280         * Plugins/WebNetscapePluginView.mm:
3281
3282 2008-12-08  Dan Bernstein  <mitz@apple.com>
3283
3284         Reviewed by John Sullivan.
3285
3286         - WebKit/mac part of tracking the global history item for a WebView
3287
3288         * WebView/WebView.mm:
3289         (-[WebView _globalHistoryItem]): Added. Returns the page's global
3290         history item.
3291         * WebView/WebViewPrivate.h:
3292
3293 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
3294
3295         Reviewed by Dave Hyatt
3296
3297         https://bugs.webkit.org/show_bug.cgi?id=15671
3298
3299         VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
3300         
3301         * WebView/WebFrame.mm:
3302         (-[WebFrame _caretRectAtNode:offset:affinity:]):
3303
3304 2008-12-06  David Kilzer  <ddkilzer@apple.com>
3305
3306         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
3307
3308         <https://bugs.webkit.org/show_bug.cgi?id=22666>
3309
3310         Reviewed by Darin Adler.
3311
3312         * DOM/WebDOMOperations.mm:
3313         (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
3314         ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
3315
3316 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
3317
3318         Reviewed by Darin Adler.
3319
3320         <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
3321         in Safari before opening a mail message in Mail
3322
3323         * Carbon/CarbonWindowAdapter.m: Removed.
3324         * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
3325         (+[CarbonWindowAdapter initialize]):
3326         * History/WebBackForwardList.mm:
3327         (+[WebBackForwardList initialize]):
3328         * History/WebHistoryItem.mm:
3329         (+[WebHistoryItem initialize]):
3330         * Misc/WebElementDictionary.mm:
3331         (+[WebElementDictionary initialize]):
3332         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3333         (+[WebHostedNetscapePluginView initialize]):
3334         * Plugins/WebBaseNetscapePluginView.mm:
3335         * Plugins/WebBasePluginPackage.m: Removed.
3336         * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
3337         (+[WebBasePluginPackage initialize]):
3338         * Plugins/WebNetscapePluginView.mm:
3339         (+[WebNetscapePluginView initialize]):
3340         * WebCoreSupport/WebEditorClient.mm:
3341         (+[WebEditCommand initialize]):
3342         * WebCoreSupport/WebFrameLoaderClient.mm:
3343         * WebView/WebArchive.mm:
3344         (+[WebArchivePrivate initialize]):
3345         * WebView/WebDataSource.mm:
3346         (+[WebDataSourcePrivate initialize]):
3347         * WebView/WebHTMLView.mm:
3348         (+[WebHTMLViewPrivate initialize]):
3349         (+[WebHTMLView initialize]):
3350         * WebView/WebResource.mm:
3351         (+[WebResourcePrivate initialize]):
3352         * WebView/WebView.mm:
3353         (+[WebViewPrivate initialize]):
3354         Call JSC::initializeThreading();
3355
3356 2008-12-04  Stephanie Lewis  <slewis@apple.com>
3357
3358         Fix build.
3359
3360         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3361         (WKPCLoadURL):
3362
3363 2008-12-04  Anders Carlsson  <andersca@apple.com>
3364
3365         Reviewed by Sam Weinig.
3366
3367         More work on streams.
3368         
3369         * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
3370         (WebKit::HostedNetscapePluginStream::create):
3371         * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
3372         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
3373         (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
3374         (WebKit::HostedNetscapePluginStream::startStream):
3375         (WebKit::HostedNetscapePluginStream::didReceiveData):
3376         (WebKit::HostedNetscapePluginStream::didFinishLoading):
3377         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3378         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3379         (WebKit::NetscapePluginInstanceProxy::pluginView):
3380         (WebKit::NetscapePluginInstanceProxy::hostProxy):
3381         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3382         (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
3383         (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
3384         (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
3385         (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
3386         (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
3387         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3388         (WebKit::NetscapePluginInstanceProxy::performRequest):
3389         (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
3390         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3391         (WebKit::NetscapePluginInstanceProxy::loadRequest):
3392         * Plugins/Hosted/WebKitPluginHost.defs:
3393
3394 2008-12-04  Anders Carlsson  <andersca@apple.com>
3395
3396         Reviewed by Sam Weinig.
3397
3398         Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
3399         but once we have a more complete implementation of NPStreams we can start refactoring things so that the
3400         implementations can share more code.
3401         
3402         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3403         (WKPCLoadURL):
3404         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3405         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3406         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3407         (WebKit::NetscapePluginInstanceProxy::loadURL):
3408         (WebKit::NetscapePluginInstanceProxy::performRequest):
3409         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3410         (WebKit::NetscapePluginInstanceProxy::loadRequest):
3411         * Plugins/Hosted/WebKitPluginClient.defs:
3412         * Plugins/Hosted/WebKitPluginHost.defs:
3413
3414 2008-12-04  Anders Carlsson  <andersca@apple.com>
3415
3416         Reviewed by Dan Bernstein.
3417         
3418         Move requestWithURLCString to WebBaseNetscapePluginView.
3419         
3420         * Plugins/WebBaseNetscapePluginView.h:
3421         * Plugins/WebBaseNetscapePluginView.mm:
3422         (-[WebBaseNetscapePluginView requestWithURLCString:]):
3423         * Plugins/WebNetscapePluginView.mm:
3424
3425 2008-12-03  Anders Carlsson  <andersca@apple.com>
3426
3427         Reviewed by Sam Weinig.
3428
3429         Move WebPluginRequest to its own file.
3430         
3431         * Plugins/WebNetscapePluginView.mm:
3432         * Plugins/WebPluginRequest.h: Added.
3433         * Plugins/WebPluginRequest.m: Added.
3434         (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
3435         (-[WebPluginRequest dealloc]):
3436         (-[WebPluginRequest request]):
3437         (-[WebPluginRequest frameName]):
3438         (-[WebPluginRequest isCurrentEventUserGesture]):
3439         (-[WebPluginRequest sendNotification]):
3440         (-[WebPluginRequest notifyData]):
3441
3442 2008-12-03  Anders Carlsson  <andersca@apple.com>
3443
3444         Handle the CA model.
3445
3446         * Plugins/WebNetscapePluginView.mm:
3447         (-[WebNetscapePluginView setWindowIfNecessary]):
3448
3449 2008-12-03  Anders Carlsson  <andersca@apple.com>
3450
3451         Reviewed by Kevin Decker.
3452         
3453         <rdar://problem/6412293>
3454         Call NPP_SetWindow for CA plug-ins.
3455         
3456         * Plugins/WebNetscapePluginView.mm:
3457         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3458         (-[WebNetscapePluginView restorePortState:]):
3459         (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
3460         (-[WebNetscapePluginView updateAndSetWindow]):
3461         (-[WebNetscapePluginView setWindowIfNecessary]):
3462
3463 2008-12-03  Anders Carlsson  <andersca@apple.com>
3464
3465         Fix the release build.
3466
3467         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3468         (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
3469
3470 2008-12-03  Anders Carlsson  <andersca@apple.com>
3471
3472         Reviewed by Dan Bernstein.
3473
3474         <rdar://problem/6412234>
3475         Don't crash if we can't launch the plug-in host.
3476
3477         * Plugins/Hosted/NetscapePluginHostManager.mm:
3478         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3479
3480 2008-12-02  Anders Carlsson  <andersca@apple.com>
3481
3482         Reviewed by Dan Bernstein.
3483
3484         Start processing messages sent to the client port.
3485         
3486         * Plugins/Hosted/NetscapePluginHostProxy.h:
3487         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3488         Add a map from ports to plug-in proxies. Turn the set of instances into a map from
3489         pluginID to instance proxy.
3490         
3491         (WKPCStatusText):
3492         Look up the right instance proxy and call status().
3493         
3494         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3495         (WebKit::NetscapePluginInstanceProxy::pluginID):
3496         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3497         (WebKit::NetscapePluginInstanceProxy::status):
3498         Implement this.
3499         
3500         * Plugins/Hosted/WebKitPluginClient.defs:
3501         Add the plug-in ID to StatusText.
3502
3503 2008-12-02  Gregory Hughes  <ghughes@apple.com>
3504
3505         Reviewed by Beth Dakin.
3506
3507         Bug 22513: ZOOM: text selection does not send correct zoom bounds
3508
3509         When zoomed, text selection must send the zoom bounds in flipped
3510         screen coordinates.
3511
3512         * WebCoreSupport/WebViewFactory.mm:
3513         (-[WebViewFactory accessibilityConvertScreenRect:]):
3514
3515 2008-12-02  Anders Carlsson  <andersca@apple.com>
3516
3517         Reviewed by Dan Bernstein.
3518
3519         Create a client mach port and pass it to the plug-in host.
3520         
3521         * Plugins/Hosted/NetscapePluginHostManager.h:
3522         * Plugins/Hosted/NetscapePluginHostManager.mm:
3523         (WebKit::NetscapePluginHostManager::hostForPackage):
3524         (WebKit::NetscapePluginHostManager::spawnPluginHost):
3525         * Plugins/Hosted/NetscapePluginHostProxy.h:
3526         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3527         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3528         * Plugins/Hosted/WebKitPluginHost.defs:
3529
3530 2008-12-02  Anders Carlsson  <andersca@apple.com>
3531
3532         Reviewed by Sam Weinig.
3533
3534         Let the plug-in views know if the plug-in host crashes.
3535         
3536         * Plugins/Hosted/NetscapePluginHostManager.h:
3537         * Plugins/Hosted/NetscapePluginHostManager.mm:
3538         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3539         * Plugins/Hosted/NetscapePluginHostProxy.h:
3540         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3541         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3542         (WebKit::NetscapePluginHostProxy::addPluginInstance):
3543         (WebKit::NetscapePluginHostProxy::removePluginInstance):
3544         
3545         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3546         (WebKit::NetscapePluginInstanceProxy::create):
3547         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3548         Keep a pointer to the host proxy.
3549         
3550         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3551         Add the instance to the host set.
3552         
3553         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
3554         Remove the instance form the host set.
3555         
3556         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3557         Tell the plug-in view that the plug-in died.
3558
3559         * Plugins/Hosted/WebHostedNetscapePluginView.h:
3560         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3561         (-[WebHostedNetscapePluginView createPlugin]):
3562         Pass the plug-in view to the instantiatePlugin.
3563         
3564         (-[WebHostedNetscapePluginView pluginHostDied]):
3565         Handle the plug-in host crashing.
3566         
3567         (-[WebHostedNetscapePluginView drawRect:]):
3568         Fill the plug-in view with a nice red shade if the plug-in crashes.
3569
3570 2008-12-01  Anders Carlsson  <andersca@apple.com>
3571
3572         Reviewed by Dan Bernstein.
3573
3574         Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
3575         
3576         * Plugins/Hosted/NetscapePluginHostManager.h:
3577         * Plugins/Hosted/NetscapePluginHostManager.mm:
3578         (WebKit::NetscapePluginHostManager::pluginHostDied):
3579         Remove the plug-in host from the map.
3580         
3581         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3582         NetscapePluginHostProxy is no longer refcounted.
3583
3584         * Plugins/Hosted/NetscapePluginHostProxy.h:
3585         This is no longer refcounted. Add a set of plug-in instances (unused for now).
3586         
3587         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3588         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3589         Create a death notification port.
3590         
3591         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3592         Tell the manager that we're gone and delete ourselves.
3593         
3594         (WebKit::NetscapePluginHostProxy::deathPortCallback):
3595         New CFMachPort callback.
3596
3597 2008-12-01  Anders Carlsson  <andersca@apple.com>
3598
3599         Reviewed by Dan Bernstein.
3600
3601         Move instantiatePlugin to NetscapePluginHostManager.
3602