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