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