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