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