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