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