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