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