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