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