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